Skip to content

Instantly share code, notes, and snippets.

@looterz
Created December 18, 2013 06:25
Show Gist options
  • Save looterz/8018091 to your computer and use it in GitHub Desktop.
Save looterz/8018091 to your computer and use it in GitHub Desktop.
Starbind Early API Hook code
Detours::tChat__startChat Detours::oChat__startChat = NULL;
void __stdcall Detours::hChat__startChat(void)
{
// Preserve ECX
PBYTE *pThis = NULL;
__asm mov pThis, ecx
// Log that we were called
Output::Msg("hChat__startChat called!\n");
// Return to original function
__asm
{
mov ecx, pThis
CALL oChat__startChat
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment