mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-26 21:00:50 -04:00
Update addresser.hpp with a bandaid
This commit is contained in:
parent
8dc67c6631
commit
ed4f4e4bf7
1 changed files with 7 additions and 1 deletions
|
@ -102,9 +102,15 @@ namespace geode::addresser {
|
|||
// check if first instruction is a jmp, i.e. if the func is a thunk
|
||||
if (*reinterpret_cast<uint16_t*>(address) == 0x25ff) {
|
||||
// read where the jmp points to and jump there
|
||||
address = *reinterpret_cast<uintptr_t*>(address + 2);
|
||||
address = *reinterpret_cast<uint32_t*>(address + 2);
|
||||
// that then contains the actual address of the func
|
||||
address = *reinterpret_cast<uintptr_t*>(address);
|
||||
|
||||
// used for gd string funcs, pretty temporary
|
||||
if (*reinterpret_cast<uint8_t*>(address) == 0xe9) {
|
||||
// read the offset and add it
|
||||
address += 5 + *reinterpret_cast<uint32_t*>(address + 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue