Function at 0x4151bb
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov esi, edx
mov edi, 0x437668
push edi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0041466a
cmp eax, 0xffffffff
jne 0x4151f7
push 3
pop esi
push 0x437668
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x4153da
imul eax, eax, 0x38
add eax, dword [0x437680]
mov ecx, eax
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x4153d0
mov edx, dword [ecx + 0x18]
test edx, edx
je 0x4153d0
mov ecx, dword [ecx + 0x20]
push 0x40
push 0x1000
sub eax, ecx
push 0xa
add ecx, edx
push 0
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
jne 0x415240
push 0xfffffffffffffffe
jmp 0x4151e4
push 0x34
pop eax
call fcn.0042b055
mov esi, eax
test esi, esi
jne 0x41525e
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x41523c
push 0xc
pop eax
call fcn.0042b055
mov ebx, eax
test ebx, ebx
jne 0x415274
push esi
call fcn.0042b085
jmp 0x41524e
mov eax, dword [ebp - 8]
call fcn.0042b055
mov edx, eax
test edx, edx
jne 0x41528a
push ebx
call fcn.0042b085
jmp 0x41526c
push 0x34
push 0
push esi
call fcn.0042b138
push dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
push dword [ebp - 0x10]
mov dword [esi + 0x20], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x28], ecx
mov ecx, dword [ebp + 0x10]
push edx
mov dword [esi + 0x24], eax
mov dword [esi + 0x2c], ecx
call fcn.0042b0c1
mov ecx, dword [eax]
mov dword [ebx], ecx
mov eax, dword [eax + 4]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 4]
mov dword [ebx + 8], edx
and dword [esi + 0x1c], 0
mov dword [esi + 8], eax
mov eax, dword [ebp - 8]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x18], edx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x14], esi
mov dword [esi], esi
mov ecx, dword [eax + 4]
mov dword [esi + 4], ecx
mov dword [eax + 4], edi
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x30], eax
mov eax, 0x415d9c
sub eax, edi
sub eax, 0xa
mov dword [edi + 6], eax
mov eax, dword [ebp + 0x14]
mov byte [edi], 0xb8
mov dword [edi + 1], esi
mov byte [edi + 5], 0xe9
test eax, eax
je 0x415312
mov dword [eax], esi
mov edi, 0x437668
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp + 0x10]
mov eax, dword [ebp - 0xc]
push dword [ebp - 8]
push ebx
push dword [ebp - 4]
push dword [eax + 0x14]
call fcn.0041463e
mov ebx, eax
or eax, 0xffffffff
cmp ebx, eax
je 0x4153da
mov eax, dword [esi + 4]
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 4], eax
call fcn.00415003
test ebx, ebx
jns 0x415357
push 3
pop eax
jmp 0x4153ac
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 4]
call fcn.0041466a
cmp eax, 0xffffffff
jne 0x415374
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x415352
imul eax, eax, 0x38
add eax, dword [0x437680]
add dword [eax + 0x20], ebx
mov ecx, dword [eax + 0x20]
cmp ecx, dword [eax + 0x1c]
jb 0x4153a0
lea esi, [eax + 0x18]
push dword [esi]
call fcn.0042b085
push 0x10
push 0
push esi
call fcn.0042b138
xor esi, esi
jmp 0x4153a3
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
sub eax, 0
je 0x4153cb
dec eax
jne 0x4153d7
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004151bb
jmp 0x4153da
mov eax, dword [ebp + 0xc]
jmp 0x4153da
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10