Function at 0x10009980
Capabilities:
Allocate or change rwx memory
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10045f5d
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x10050400]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4c], edi
cmp byte [ebp + 8], 0
mov ecx, dword [edi + 0x70]
je 0x10009bf9
test ecx, ecx
jne 0x10009bb1
mov ebx, dword [edi]
xor esi, esi
nop dword [eax]
lea eax, [ebp - 0x2c]
push eax
push ebx
call fcn.10041a00
movzx eax, byte [ebp - 0x2c]
add esp, 8
add esi, eax
add ebx, eax
cmp esi, 5
jb 0x100099d0
mov ecx, edi
mov dword [edi + 0x30], esi
call fcn.10007300
mov dword [edi + 0x70], eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
lea eax, [ebp - 0x48]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x39]
call fcn.10004270
mov ebx, dword [ebp - 0x48]
test al, al
je 0x10009b74
mov esi, ebx
cmp esi, dword [ebp - 0x44]
je 0x10009a5c
push dword [esi]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x10009a54
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 4
cmp esi, dword [ebp - 0x44]
jne 0x10009a31
lea eax, [ebp - 0x30]
push eax
push 0x40
push dword [edi + 0x30]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10009b74
push dword [edi + 0x30]
lea eax, [ebp - 0x30]
push eax
call fcn.100022e0
add esp, 8
lea ecx, [edi + 4]
push eax
call fcn.10001840
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10009a9d
push eax
call fcn.10044774
add esp, 4
push dword [edi + 0x30]
push dword [edi]
push dword [edi + 4]
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [edi]
mov edx, dword [edi + 0x70]
sub edx, esi
mov dword [ebp - 0x30], 0xe9
sub edx, 5
mov eax, dword [esi]
cmp al, 0xe8
movzx ecx, al
cmovne ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x37], edx
mov byte [ebp - 0x38], cl
mov eax, dword [ebp - 0x38]
mov dword [esi], eax
mov al, byte [ebp - 0x34]
mov byte [esi + 4], al
mov eax, dword [edi + 0x30]
sub eax, 5
push eax
mov eax, dword [edi]
add eax, 5
push 0x90
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
lea eax, [ebp - 0x30]
push eax
push 0x20
push dword [edi + 0x30]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10009b74
mov esi, ebx
cmp esi, dword [ebp - 0x44]
je 0x10009b3b
push dword [esi]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov edi, eax
test edi, edi
je 0x10009b30
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 4
cmp esi, dword [ebp - 0x44]
jne 0x10009b10
mov edi, dword [ebp - 0x4c]
test ebx, ebx
je 0x10009c1b
mov ecx, dword [ebp - 0x40]
mov eax, ebx
sub ecx, ebx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x10009b65
mov ebx, dword [eax - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10009b9a
push ecx
push ebx
call fcn.1004475d
add esp, 8
jmp 0x10009c1b
test ebx, ebx
je 0x10009baa
mov ecx, dword [ebp - 0x40]
mov eax, ebx
sub ecx, ebx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x10009ba0
mov ebx, dword [eax - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10009ba0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push ebx
call fcn.1004475d
add esp, 8
xor al, al
jmp 0x10009c33
mov eax, dword [edi + 0x68]
mov ebx, dword [edi + 0x3c]
mov edx, dword [edi + 0x38]
mov ecx, edx
mov esi, dword [eax + 0x1c]
mov eax, ebx
shrd ecx, eax, 8
mov eax, ebx
mov byte [esi + 1], cl
mov ecx, edx
shrd ecx, eax, 0x10
mov eax, ebx
mov byte [esi], dl
shrd edx, eax, 0x18
mov eax, ebx
mov byte [esi + 4], bl
shr eax, 8
mov byte [esi + 5], al
mov eax, ebx
shr eax, 0x10
shr ebx, 0x18
mov byte [esi + 2], cl
mov byte [esi + 3], dl
mov byte [esi + 6], al
mov byte [esi + 7], bl
jmp 0x10009c1b
test ecx, ecx
je 0x10009c1b
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [edi + 0x38], eax
mov eax, dword [edi + 0x68]
mov dword [edi + 0x3c], ecx
mov eax, dword [eax + 0x1c]
mov dword [eax], 0x90909090
mov dword [eax + 4], 0x90909090
mov eax, dword [edi + 0x68]
push dword [eax + 0x20]
push dword [edi + 0x70]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10044a93
mov esp, ebp
pop ebp
ret 4