Function at 0x1002a9d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax]
push 0x1008bd28
xor esi, esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, edi
call fcn.1002a3b0
mov ecx, dword [ebp + 0xc]
mov ebx, eax
call fcn.1002a3b0
push 0x50
lea ecx, [ebp - 0x60]
push esi
push ecx
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
call fcn.100469a0
add esp, 0xc
lea edx, [ebp - 0x68]
push edx
push ebx
call fcn.1002a8f0
mov edi, eax
cmp edi, 5
jb 0x1002ab9f
push ebx
mov ecx, edi
call fcn.1002a740
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x64]
push eax
mov eax, dword [ebp - 0x68]
push ecx
push edx
push eax
mov eax, ebx
call fcn.1002a450
mov esi, eax
xor eax, eax
cmp esi, eax
je 0x1002ab9a
lea ecx, [ebp - 8]
push ecx
push 0x40
push edi
push ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1002ab82
lea edx, [ebp - 4]
push edx
push 0x40
push 0x6c
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1002ab63
lea eax, [esi + 0x2c]
mov dword [ebp - 0xc], 0
test edi, edi
je 0x1002aab3
mov edx, dword [ebp - 0xc]
mov ecx, ebx
sub ecx, eax
mov dword [ebp - 0x10], ecx
jmp 0x1002aaa4
mov ecx, dword [ebp - 0x10]
mov cl, byte [ecx + eax]
mov byte [eax], cl
mov byte [esi + edx + 0x4c], cl
inc edx
inc eax
cmp edx, edi
jb 0x1002aaa1
lea eax, [esi + edi + 0x2c]
lea ecx, [edi + ebx]
lea edx, [eax + 5]
mov dword [ebp - 0x10], ecx
cmp edx, ecx
jbe 0x1002aac8
sub edx, ecx
jmp 0x1002aad2
mov edx, ecx
lea ecx, [eax + 5]
sub edx, ecx
mov ecx, dword [ebp - 0x10]
cmp edx, 0x7fff0000
ja 0x1002aae7
lea edx, [eax + 5]
sub ecx, edx
mov byte [eax], 0xe9
mov dword [eax + 1], ecx
jmp 0x1002aaf4
lea edx, [eax + 6]
mov word [eax], 0x25ff
mov dword [eax + 2], edx
mov dword [edx], ecx
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
jae 0x1002ab01
mov eax, ebx
sub eax, ecx
jmp 0x1002ab05
mov eax, ecx
sub eax, ebx
cmp eax, 0x7fff0000
jbe 0x1002ab2e
lea eax, [esi + 0xc]
call fcn.1002a410
sub eax, esi
sub eax, 0xc
push eax
lea eax, [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea ecx, [esi + 0xc]
mov eax, ebx
call fcn.1002a410
mov eax, dword [ebp + 0xc]
mov dword [esi + 8], eax
push edi
lea eax, [esi + 0x2c]
push eax
mov dword [esi + 4], edi
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [ebp - 4]
lea ecx, [ebp - 4]
push ecx
push edx
push 0x6c
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov ecx, dword [ebp - 8]
lea eax, [ebp - 8]
push eax
push ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi], 0
je 0x1002ab91
mov eax, dword [ebp + 8]
lea edx, [esi + 0x2c]
mov dword [eax], edx
jmp 0x1002ab9a
mov edx, esi
call fcn.1002a570
xor esi, esi
call fcn.1002a6b0
push 0x1008bd28
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
test esi, esi
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret 8