Function at 0x1002b5c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006dedd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
push edi
lea edi, [edx + 0x1f]
mov ebx, ecx
and edi, 0xffffffe0
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x28], edi
jne 0x1002b601
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea esi, [ebx + 4]
push esi
mov dword [ebp - 0x30], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x34], eax
test edx, edx
je 0x1002b72f
nop dword [eax]
mov eax, dword [edx + 0x18]
sub eax, dword [edx + 0x1c]
cmp eax, edi
jb 0x1002b70e
mov ecx, dword [edx + 0x28]
cmp ecx, edi
jae 0x1002b64d
test ecx, ecx
jne 0x1002b70e
mov eax, dword [edx + 0x2c]
xor ecx, ecx
mov edi, dword [edx + 0x24]
xor ebx, ebx
mov dword [ebp - 0x18], eax
mov eax, dword [edx + 0x20]
xor edx, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
dec eax
add eax, edi
div edi
xor edx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x1c], ecx
jbe 0x1002b6f4
mov edi, dword [ebp - 0x18]
nop word [eax + eax]
mov eax, dword [edi]
add edi, 4
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], edi
cmp eax, 0xffffffff
jne 0x1002b69b
cmp ecx, ebx
cmovbe ecx, ebx
mov ebx, ecx
xor ecx, ecx
jmp 0x1002b6e9
lea eax, [edx + 0x20]
mov edi, 0x20
cmp eax, dword [ebp - 0x1c]
jbe 0x1002b6ad
mov edi, dword [ebp - 0x1c]
sub edi, edx
xor eax, eax
lea edx, [eax + 1]
test edi, edi
je 0x1002b6e3
mov esi, dword [ebp - 0x30]
inc eax
test dword [ebp - 0x2c], edx
jne 0x1002b6d4
inc ecx
cmp ecx, dword [ebp - 0x10]
jne 0x1002b6dd
mov edi, dword [ebp - 0x20]
sub eax, ecx
mov ebx, dword [ebp - 0x24]
add edi, eax
jmp 0x1002b850
cmp ecx, ebx
cmovbe ecx, ebx
mov ebx, ecx
xor ecx, ecx
add edx, edx
cmp eax, edi
jb 0x1002b6b6
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
add edx, 0x20
mov dword [ebp - 0x20], edx
cmp edx, dword [ebp - 0x1c]
jb 0x1002b680
mov edx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
mov eax, dword [edx + 0x24]
imul eax, ebx
mov ebx, dword [ebp - 0x14]
mov dword [edx + 0x28], eax
mov edx, dword [edx + 0x14]
mov dword [ebp - 0x24], edx
jmp 0x1002b727
mov ecx, dword [edx + 0x14]
cmp eax, dword [ebp - 0x34]
jae 0x1002b722
cmp edx, dword [ebx + 0x3c]
jne 0x1002b722
test ecx, ecx
je 0x1002b722
mov dword [ebx + 0x3c], ecx
mov edx, ecx
mov dword [ebp - 0x24], ecx
test edx, edx
jne 0x1002b630
mov edi, dword [ebx + 0x1c]
mov eax, dword [ebp - 0x28]
cmp edi, eax
jae 0x1002b745
mov edi, eax
mov eax, dword [ebx + 0x20]
mov ebx, dword [ebx]
mov dword [ebp - 0x24], eax
jmp 0x1002b755
mov eax, dword [ebx + 0x20]
mov ebx, dword [ebx]
mov dword [ebp - 0x24], eax
test edi, edi
je 0x1002b8d6
call fcn.1002add0
test ebx, ebx
jne 0x1002b761
mov ebx, dword [eax + 8]
mov eax, dword [eax]
dec edi
push 0x40
add edi, eax
neg eax
push 0x3000
and edi, eax
push edi
push 0
push ebx
mov dword [ebp - 0x34], edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x1002b8d6
mov eax, edi
xor edx, edx
div dword [ebp - 0x24]
push 0x34
mov dword [ebp - 0x2c], eax
lea edi, [eax + 7]
shr edi, 3
add edi, 3
and edi, 0xfffffffc
mov dword [ebp - 0x18], edi
call fcn.1004f273
mov ebx, eax
lea eax, [edi + edi]
push eax
mov dword [ebp - 0x1c], eax
call fcn.1004f273
add esp, 8
mov edi, eax
mov dword [ebp - 0x10], edi
test ebx, ebx
je 0x1002b896
test edi, edi
je 0x1002b896
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [ebx + 0x20], ecx
mov ecx, dword [ebp - 0x24]
push 0
push edi
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 1
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x24], ecx
mov dword [ebx + 0x28], eax
call fcn.1004c020
mov eax, dword [ebp - 0x18]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
add eax, edi
mov edx, ebx
mov dword [ebx + 0x2c], edi
mov dword [ebx + 0x30], eax
call fcn.1002b020
mov eax, dword [ebp - 0x28]
xor edx, edx
dec eax
mov ecx, dword [ebp - 0x14]
add eax, dword [ebx + 0x24]
xor edi, edi
div dword [ebx + 0x24]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x18]
add dword [ecx + 0x28], eax
push dword [ebp - 0x10]
mov ecx, dword [ebx + 0x2c]
mov edx, edi
call fcn.1002af90
mov eax, dword [ebp - 0x10]
mov edx, edi
mov ecx, dword [ebx + 0x30]
dec eax
push eax
call fcn.1002af90
mov eax, dword [ebx + 0x24]
add esp, 8
imul eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [ebx + 0x28], 0
add dword [ebx + 0x1c], eax
add dword [ecx + 0x2c], eax
mov eax, dword [ebx + 0x24]
imul eax, edi
add eax, dword [ebx + 8]
mov dword [ebp - 0x34], eax
mov edi, eax
jmp 0x1002b8d8
mov edi, dword [ebp - 0x14]
mov edi, dword [edi]
call fcn.1002add0
test edi, edi
jne 0x1002b8a7
mov edi, dword [eax + 8]
mov eax, dword [ebp - 0x20]
push 0x8000
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
test ebx, ebx
je 0x1002b8c6
push ebx
call fcn.1004f1d0
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x1002b8d6
push eax
call fcn.1004f1d0
add esp, 4
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret