A proc macro to generate dllmain
dllmain-rs = { git = "https://github.com/zeon256/dllmain-rs" }
winapi = { version = "0.3.9", features = ["minwindef"]}
use std::thread;
use winapi::shared::minwindef::{self, HINSTANCE, DWORD, LPVOID, BOOL};
#[dllmain_rs::entry]
fn real_entry() {
// unsafe { consoleapi::AllocConsole(); }
let base_addr = get_base_addr();
println!("Found base address: {:#X?}", base_addr);
thread::spawn(move || {
// hack thread
});
}