Go Back   Exetools > General > Source Code


Thread Tools Display Modes
Old 01-13-2017, 23:22
sh3dow sh3dow is offline
Join Date: Oct 2014
Posts: 111
Rept. Given: 100
Rept. Rcvd 77 Times in 22 Posts
Thanks Given: 316
Thanks Rcvd at 135 Times in 46 Posts
sh3dow Reputation: 77
SignatureToDetour: Converts IDA Pro signatures to C++ Detours

this tool is helpful when you try to hook functions that aren't in the Win32 API.

Given a signature like the following from IDA Pro:
PHP Code:
char __cdecl sub_1193D40(int a1unsigned int a2signed int *a3_BYTE **a4, const char *a5
SignatureToDetour will output ("InternalFunction" being the user supplied desired name):
PHP Code:
char(__cdecloriginalInternalFunction)(intunsigned intsigned int *, BYTE **, const char *);
char hkInternalFunction(int a1,  unsigned int a2,  signed int *a3,  BYTE **a4,  const char *a5)

originalInternalFunction = (char(__cdecl*)(intunsigned intsigned int *, BYTE **, const char *))DetourFunction((PBYTE)INTERNALFUNCTION_ADDRESS, (PBYTE)hkInternalFunction); 
PHP Code:
Reply With Quote
The Following 7 Users Say Thank You to sh3dow For This Useful Post:
alephz (01-16-2017), Fyyre (08-07-2017), mudlord (01-15-2017), user1 (01-15-2017), WRP (01-14-2017), zeffy (07-27-2017)
Old 01-23-2017, 19:18
΢Цһ ΢Цһ is offline
Join Date: Dec 2006
Location: ....
Posts: 22
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 1
Thanks Rcvd at 4 Times in 4 Posts
΢Цһ Reputation: 1
Good tool. Maybe it's better to Write IDA plugin.
Reply With Quote
Old 01-23-2017, 21:14
Shub-Nigurrath's Avatar
Shub-Nigurrath Shub-Nigurrath is offline
Join Date: Mar 2004
Location: Obscure Kadath
Posts: 820
Rept. Given: 48
Rept. Rcvd 391 Times in 86 Posts
Thanks Given: 24
Thanks Rcvd at 105 Times in 53 Posts
Shub-Nigurrath Reputation: 300-399 Shub-Nigurrath Reputation: 300-399 Shub-Nigurrath Reputation: 300-399 Shub-Nigurrath Reputation: 300-399
very nice, always have to do it manually!
Ŝħůb-Ňìĝùŕřaŧħ ₪)
There are only 10 types of people in the world: Those who understand binary, and those who don't
Reply With Quote

detours, hook, ida pro plugin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Detours Pro v3.0 b30wulf Source Code 38 06-22-2018 10:41

All times are GMT +8. The time now is 02:04.

Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX
( 1998 - 2021 )