Function at 0x4012cf
Capabilities:
Allocate or change rwx memory

Disassembly:
pop edx
or edx, esi
call 0x4011e9
dec edx
pop edx
xor edx, edx
pop edx
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], 0
mov dword [edi], 0
push edi
call 0x401204
dec edi
pop edi
add edi, esp
sbb edi, ecx
jmp 0x40120e
sbb edi, ebx
pop edi
mov esi, dword [ebp + 8]
test esi, esi
jne 0x401221
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edx
call 0x401228
inc edx
pop edx
add edx, ecx
call 0x401231
inc edx
pop edx
xor edx, ecx
pop edx
mov eax, 0xdead
cmp word [esi], ax
je 0x40124b
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
or edi, edi
call 0x401254
dec edi
pop edi
call 0x40125b
dec edi
pop edi
add edi, eax
pop edi
xor eax, eax
xor edx, edx
cmp ax, word [esi + 8]
jae 0x4012c1
xor edi, edi
jmp 0x401270
push ebx
sbb ebx, eax
sbb ebx, esp
call 0x40127b
dec ebx
pop ebx
xor ebx, esi
sbb ebx, esp
and ebx, ebx
inc ebx
pop ebx
movzx eax, dx
lea eax, [eax + eax*4]
add eax, dword [esi + 0xc]
mov ecx, dword [esi + eax*4 + 0x28]
test ecx, ecx
je 0x4012b4
mov eax, dword [esi + eax*4 + 0x24]
add eax, ecx
cmp edi, eax
cmovbe edi, eax
push eax
call 0x4012a7
dec eax
pop eax
call 0x4012ae
dec eax
pop eax
and eax, ecx
xor eax, esp
pop eax
inc edx
cmp dx, word [esi + 8]
jb 0x401270
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0xc]
push ebx
call 0x4012c8
inc ebx
pop ebx
call 0x4012cf
inc ebx
pop ebx
add ebx, edi
and ebx, ebx
pop ebx
push 0x40
push 0x3000
push dword [ebp - 8]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [edi + 8], eax
mov dword [edi + 4], eax
push ebx
call 0x4012f4
dec ebx
pop ebx
xor ebx, ebp
call 0x4012fd
dec ebx
pop ebx
and ebx, ecx
pop ebx
cmp dword [edi + 8], 0
jne 0x401313
mov eax, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0x10], 0
je 0x401337
movzx eax, word [esi + 8]
lea eax, [eax + eax*4]
add eax, dword [esi + 0xc]
lea eax, [eax*4 + 0x24]
push eax
push esi
push dword [edi + 4]
call fcn.00402140
add esp, 0xc
push eax
call 0x40133e
dec eax
pop eax
xor eax, ebx
call 0x401347
dec eax
pop eax
or eax, eax
pop eax
xor edx, edx
xor eax, eax
mov dword [ebp - 8], edx
cmp ax, word [esi + 8]
jae 0x4013be
push ebp
and ebp, eax
add ebp, ecx
call 0x401363
dec ebp
pop ebp
sbb ebp, ebx
jmp 0x40136a
inc ebp
pop ebp
movzx eax, dx
lea eax, [eax + eax*4]
add eax, dword [esi + 0xc]
mov edx, dword [esi + eax*4 + 0x28]
lea ecx, [esi + eax*4]
cmp dword [ecx + 0x30], edx
cmovb edx, dword [ecx + 0x30]
test edx, edx
je 0x401404
mov eax, dword [ecx + 0x2c]
add eax, esi
push edx
push eax
mov eax, dword [edi + 4]
add eax, dword [ecx + 0x24]
push eax
call fcn.00402140
add esp, 0xc
push ecx
add ecx, ecx
or ecx, ecx
sbb ecx, esi
and ecx, edi
call 0x4013ac
inc ecx
pop ecx
sbb ecx, eax
inc ecx
pop ecx
mov edx, dword [ebp - 8]
inc edx
mov dword [ebp - 8], edx
cmp dx, word [esi + 8]
jb 0x401358
push ebp
call 0x4013c5
dec ebp
pop ebp
call 0x4013cc
dec ebp
pop ebp
or ebp, ebx
xor ebp, eax
pop ebp
mov eax, dword [edi + 4]
cmp eax, dword [esi + 4]
je 0x401544
push ecx
call 0x4013e5
dec ecx
pop ecx
call 0x4013ec
dec ecx
pop ecx
xor ecx, ecx
add ecx, eax
pop ecx
test byte [esi + 2], 1
je 0x401410
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call 0x401417
dec esi
pop esi
call 0x40141e
dec esi
pop esi
xor esi, esi
or esi, edi
pop esi
cmp dword [esi + 0x1c], 0
je 0x401668
cmp dword [esi + 0x20], 0
je 0x401668
push ecx
add ecx, esp
call 0x401441
inc ecx
pop ecx
xor ecx, ebx
and ecx, esi
cmp eax, ecx
jne 0x40144b
dec ecx
pop ecx
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
add edx, dword [edi + 4]
add eax, 0xfffffff8
add eax, edx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], eax
push ecx
or ecx, edx
and ecx, esi
and ecx, ecx
add ecx, edi
call 0x40146f
dec ecx
pop ecx
sbb ecx, esi
inc ecx
pop ecx
cmp edx, dword [ebp - 0xc]
jae 0x401530
lea ecx, [ecx]
push esi
xor esi, edx
call 0x401489
dec esi
pop esi
call 0x401490
dec esi
pop esi
add esi, esi
pop esi
mov edi, dword [edx + 4]
lea eax, [edx + 4]
sub edi, 8
mov dword [ebp - 0x10], eax
shr edi, 1
lea esi, [edx + 8]
je 0x401508
push edx
or edx, ebx
call 0x4014b0
dec edx
pop edx
and edx, ebp
or edx, ebx
jmp 0x4014ba
pop edx
movzx edx, word [esi]
mov eax, edx
and eax, 0xf000
cmp eax, 0x3000
jne 0x4014e8
mov eax, dword [ebp + 0xc]
and edx, 0xfff
mov ebx, dword [ebp + 8]
mov ecx, dword [eax + 4]
add edx, ecx
mov eax, dword [ebp - 8]
sub ecx, dword [ebx + 4]
mov eax, dword [eax]
add dword [edx + eax], ecx
push edi
call 0x4014ef
inc edi
pop edi
call 0x4014f6
inc edi
pop edi
xor edi, edx
sbb edi, esp
pop edi
add esi, 2
dec edi
jne 0x4014a7
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
add edx, dword [eax]
mov dword [ebp - 8], edx
push edx
call 0x401514
dec edx
pop edx
and edx, eax
and edx, ebx
jmp 0x40151d
sbb edx, ebx
nop
pop edx
cmp edx, dword [ebp - 0xc]
jb 0x401480
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push edi
and edi, ebp
call 0x401539
dec edi
pop edi
or edi, ebx
xor edi, edi
jmp 0x401543
pop edi
push ebx
xor ebx, esi
call 0x40154d
dec ebx
pop ebx
call 0x401554
dec ebx
pop ebx
and ebx, edx
pop ebx
cmp dword [esi + 0x14], 0
je 0x4016f3
cmp dword [esi + 0x18], 0
je 0x4016f3
push eax
call 0x401573
inc eax
pop eax
xor eax, eax
or eax, ecx
add eax, edi
cmp eax, eax
jne 0x40157f
dec eax
pop eax
mov edx, dword [edi + 4]
add edx, dword [esi + 0x14]
mov dword [ebp - 8], edx
push eax
sbb eax, esp
call 0x401592
dec eax
pop eax
call 0x401599
dec eax
pop eax
xor eax, esp
pop eax
cmp dword [edx + 0xc], 0
je 0x4016dc
push ebx
call 0x4015ae
dec ebx
pop ebx
sbb ebx, esp
add ebx, ebx
jmp 0x4015b8
add ebx, ebp
pop ebx
mov eax, dword [edi + 4]
add eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4016d0
push eax
call 0x4015da
dec eax
pop eax
or eax, ecx
xor eax, ebx
jmp 0x4015e4
and eax, ebx
pop eax
mov edx, dword [ebp - 8]
mov esi, dword [edx + 0x10]
add esi, dword [edi + 4]
cmp dword [edx + 4], 0
mov dword [ebp + 0xc], esi
je 0x401630
push ebp
add ebp, esi
call 0x401602
inc ebp
pop ebp
call 0x401609
inc ebp
pop ebp
add ebp, edx
pop ebp
mov eax, dword [edx]
test eax, eax
je 0x4016c4
mov esi, dword [edi + 4]
add esi, eax
push ecx
sbb ecx, edi
or ecx, edi
call 0x401627
dec ecx
pop ecx
xor ecx, esp
sbb ecx, esi
sbb ecx, edi
inc ecx
pop ecx
push ebp
add ebp, eax
and ebp, edi
call 0x40163b
dec ebp
pop ebp
add ebp, eax
and ebp, esp
add ebp, ebp
inc ebp
pop ebp
sub dword [ebp + 0xc], esi
push ecx
call 0x40164e
dec ecx
pop ecx
call 0x401655
dec ecx
pop ecx
sbb ecx, edi
add ecx, esi
pop ecx
mov ecx, dword [esi]
test ecx, ecx
je 0x4016a5
jns 0x401674
movzx eax, cx
jmp 0x40167c
mov eax, 5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
add eax, 2
add eax, ecx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + esi], eax
push esi
call 0x401693
inc esi
pop esi
call 0x40169a
inc esi
pop esi
sbb esi, ebp
or esi, esi
pop esi
add esi, 4
jmp 0x401647
push esi
call 0x4016ac
dec esi
pop esi
or esi, ebx
call 0x4016b5
dec esi
pop esi
sbb esi, edx
pop esi
mov edx, dword [ebp - 8]
add edx, 0x14
jmp 0x401586
mov eax, 0xd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
xor ecx, edi
call 0x4016e5
dec ecx
pop ecx
and ecx, ecx
jmp 0x4016ec
and ecx, edx
inc ecx
pop ecx
mov esi, dword [ebp + 8]
push esi
or esi, eax
or esi, esp
or esi, eax
call 0x401700
dec esi
pop esi
xor esi, ebp
xor esi, esp
inc esi
pop esi
mov dword [ebp - 4], 0
push edx
and edx, ecx
call 0x401717
inc edx
pop edx
call 0x40171e
inc edx
pop edx
and edx, eax
pop edx
xor edx, edx
xor eax, eax
mov dword [ebp + 0xc], edx
cmp ax, word [esi + 8]
jae 0x40181b
push edi
call 0x40173a
dec edi
pop edi
call 0x401741
dec edi
pop edi
or edi, ecx
sbb edi, ebx
pop edi
movzx eax, dx
lea eax, [eax + eax*4]
add eax, dword [esi + 0xc]
lea edx, [esi + eax*4]
push edx
call 0x40175a
dec edx
pop edx
call 0x401761
dec edx
pop edx
or edx, esi
xor edx, edx
pop edx
mov eax, dword [edx + 0x34]
test al, 0x20
je 0x401776
or eax, 0x60000000
mov dword [edx + 0x34], eax
push edi
add edi, ebx
and edi, edx
xor edi, ecx
and edi, esp
add edi, ebx
or edi, ecx
xor edi, ebx
add edi, edx
add edi, esp
pop edi
mov eax, dword [edx + 0x34]
shr eax, 0x1d
cmp eax, 6
ja case.0x401795.5
jmp dword [eax*4 + 0x401848]
mov dword [ebp - 4], 0x10
jmp 0x4017c7
mov dword [ebp - 4], 2
jmp 0x4017c7
mov dword [ebp - 4], 0x20
jmp 0x4017c7
mov dword [ebp - 4], 4
jmp 0x4017c7
mov dword [ebp - 4], 0x40
push ebx
and ebx, ebx
call 0x4017d0
inc ebx
pop ebx
add ebx, ebp
add ebx, eax
xor ebx, edx
and ebx, ecx
inc ebx
pop ebx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
mov eax, dword [edx + 0x24]
push dword [edx + 0x28]
add eax, dword [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x401839
push ebx
sbb ebx, ecx
xor ebx, eax
and ebx, eax
or ebx, esp
or ebx, ecx
jmp 0x401806
sbb ebx, eax
inc ebx
pop ebx
mov edx, dword [ebp + 0xc]
inc edx
mov dword [ebp + 0xc], edx
cmp dx, word [esi + 8]
jb 0x401733
push eax
add eax, edx
call 0x401824
dec eax
pop eax
or eax, edi
and eax, edx
jmp 0x40182e
pop eax
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xf
pop ebx
mov esp, ebp
pop ebp
ret