[DiscordArchive] Question for anyone that might know, I'm trying to hook a function at 004D6FC0, but when I do it my
[DiscordArchive] Question for anyone that might know, I'm trying to hook a function at 004D6FC0, but when I do it my
Archived author: Peacy • Posted: 2025-03-19T20:26:48.287000+00:00
Original source
Question for anyone that might know, I'm trying to hook a function at 004D6FC0, but when I do it my client just freezes and I have to force close it. I have it defined to return a DWORD* as a __usercall. Anyone know what might be causing the issue?
Archived author: robinsch • Posted: 2025-03-19T20:31:33.911000+00:00
Original source
> __usercall
Archived author: robinsch • Posted: 2025-03-19T20:31:36.344000+00:00
Original source
there you go, you need to write inline ASM to "hook" it
Archived author: balake • Posted: 2025-03-19T20:36:21.701000+00:00
Original source
from my experience __usercall is usually just a glitch from IDA decompiler that thinks ST registers are pushed as args when they aren't
Archived author: balake • Posted: 2025-03-19T20:36:36.386000+00:00
Original source
it's usually a __thiscall or __fastcall once you remove the faulty ST regsiters
Archived author: robinsch • Posted: 2025-03-19T20:36:48.592000+00:00
Original source
not always true; IDA is pretty good at detecting custom calling coventions
Archived author: robinsch • Posted: 2025-03-19T20:37:16.999000+00:00
Original source
otherwise just look at the ASM, should be pretty clear how args are passed
isable`
Archived author: robinsch • Posted: 2025-03-19T20:38:52.267000+00:00
Original source
but in your very specific example simply detour `~CGObject` or `CGObject:
isable`