Skip to content

Commit

Permalink
[FEATURE] Added running TLS callbacks to template
Browse files Browse the repository at this point in the history
  • Loading branch information
hasherezade committed Feb 17, 2022
1 parent 6fb7f09 commit a6811b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions project_template/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ int load_and_run(LPCTSTR pe_path)
// if the loaded PE needs to access resources, you may need to connect it to the PEB:
peconv::set_main_module_in_peb((HMODULE)my_pe);

// if needed, you can run TLS callbacks before the Entry Point:
peconv::run_tls_callbacks(my_pe, v_size);

//calculate the Entry Point of the manually loaded module
DWORD ep_rva = peconv::get_entry_point_rva(my_pe);
if (!ep_rva) {
Expand Down

0 comments on commit a6811b4

Please sign in to comment.