Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __declspec(naked) void mFunct()
- {
- __asm
- {
- sub esp, 0x20;
- mov al, 1;
- add esp, 0x20;
- }
- __asm
- {
- int 3;
- int 3;
- int 3;
- int 3;
- }
- }
- unsigned long calcFuncSize(void* ptrBase, DWORD timeoutSize)
- {
- for (DWORD i = 0; i < timeoutSize; i+=4)
- {
- if (*(DWORD*)((DWORD)ptrBase + i) == 0xCCCCCCCC)
- return i;
- }
- return 0;
- }
- int _tmain(int argc, _TCHAR* argv[])
- {
- void* x = mFunct;
- printf("FunctionPtr: %X FunctSize: %X", x, calcFuncSize(x, 1024));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment