Function at 0x42019f
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, 0x437190
push edi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0041f8bd
cmp eax, 0xffffffff
jne 0x4201db
push 3
pop esi
push 0x437190
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x4203be
imul eax, eax, 0x38
add eax, dword [0x4371a8]
mov ecx, eax
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x4203b4
mov edx, dword [ecx + 0x18]
test edx, edx
je 0x4203b4
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 0x420224
push 0xfffffffffffffffe
jmp 0x4201c8
push 0x34
pop eax
call fcn.0042c055
mov esi, eax
test esi, esi
jne 0x420242
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x420220
push 0xc
pop eax
call fcn.0042c055
mov ebx, eax
test ebx, ebx
jne 0x420258
push esi
call fcn.0042c085
jmp 0x420232
mov eax, dword [ebp - 8]
call fcn.0042c055
mov edx, eax
test edx, edx
jne 0x42026e
push ebx
call fcn.0042c085
jmp 0x420250
push 0x34
push 0
push esi
call fcn.0042c138
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.0042c0c1
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, 0x420d80
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 0x4202f6
mov dword [eax], esi
mov edi, 0x437190
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.0041f891
mov ebx, eax
or eax, 0xffffffff
cmp ebx, eax
je 0x4203be
mov eax, dword [esi + 4]
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 4], eax
call fcn.0041ffe7
test ebx, ebx
jns 0x42033b
push 3
pop eax
jmp 0x420390
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 4]
call fcn.0041f8bd
cmp eax, 0xffffffff
jne 0x420358
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x420336
imul eax, eax, 0x38
add eax, dword [0x4371a8]
add dword [eax + 0x20], ebx
mov ecx, dword [eax + 0x20]
cmp ecx, dword [eax + 0x1c]
jb 0x420384
lea esi, [eax + 0x18]
push dword [esi]
call fcn.0042c085
push 0x10
push 0
push esi
call fcn.0042c138
xor esi, esi
jmp 0x420387
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
sub eax, 0
je 0x4203af
dec eax
jne 0x4203bb
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.0042019f
jmp 0x4203be
mov eax, dword [ebp + 0xc]
jmp 0x4203be
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10