Closed brliron closed 4 years ago
Could also solve potential codecave clashing issues.
https://github.com/thpatch/thcrap/pull/123
One thing I may change is to change the syntax to not require "code": "..."
as that seems redundant
Ok, so... The syntax in c82910ec69c7b87d316f7cb19c2685f31f984160 was
codecave: {
my_codecave: {
"code": "90909090e9[Rx0123456c]"
}
}
and the syntax in b0f392b73571701fb07dcbaacdbe62643c503ccb is now
codecave: {
my_codecave: "90909090e9[Rx0123456c]"
}
Am I right?
Yes. (But codecaves don't actually have any addresses. They get allocated and the address that VirtualAlloc decides to give is added to the same functions list that functions like strings_vsprintf get added to)
Ok
If you don't mind, I'll wait until the restructuring fix release before merging.
Alright
Some modders want to make big binhacks, that don't fit in a few bytes. If would be useful if we could allocate some memory for them.
Proposal syntax:
That doesn't sound hard to do. Codecave: just alloc some executable memory and feed it to the binhack parser. Reference in binhacks: keep a list of all codecaves, strcnmp on "codecave:" around or in the func_get call.