add CallProtectedHandler on BB

This commit is contained in:
Martin Michelsen
2024-05-11 22:31:09 -07:00
parent 251a9ecd0a
commit 2ed97974e0
4 changed files with 45 additions and 17 deletions
@@ -7,8 +7,8 @@ reloc0:
.offsetof start
start:
.include CallProtectedHandlerXB
.data 0x007237E8
.data 0x002DE000
.data 0x007237E8 # should_allow_protected_commands
.data 0x002DE000 # handle_6x(void* data @ ecx, uint32_t size @ eax)
size:
.data 0x00000000
data:
@@ -0,0 +1,36 @@
.meta hide_from_patches_menu
.meta name="CallProtectedHandler"
.meta description=""
entry_ptr:
reloc0:
.offsetof start
start:
jmp get_data_addr
resume:
xchg ebx, [esp]
mov edx, [ebx]
mov dword [edx], 1
mov edx, [ebx + 4]
push dword [ebx + 8]
lea ecx, [ebx + 0x0C]
push ecx
call edx # RcvPsoData2(data, size)
add esp, 8
mov edx, [ebx]
mov dword [edx], 0
pop ebx
ret
get_data_addr:
call resume
.data 0x00AAECF0 # should_allow_protected_commands
.data 0x00800860 # RcvPsoData2(void* data @ stack, uint32_t size @ stack)
size:
.data 0x00000000
data: