Function at 0x4012cf
Capabilities:
Allocate or change rwx memory

Disassembly:
pop esi
call 0x4011e9
dec esi
pop esi
sbb esi, ecx
pop esi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], 0
mov dword [edi], 0
push ecx
add ecx, ebx
or ecx, eax
call 0x401208
dec ecx
pop ecx
add ecx, ebx
add ecx, ecx
xor ecx, ecx
nop
pop ecx
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 esi
call 0x401228
dec esi
pop esi
sbb esi, ebp
sbb esi, edx
jmp 0x401231
sbb esi, esp
nop
pop esi
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 ebx
sbb ebx, edi
call 0x401254
inc ebx
pop ebx
call 0x40125b
inc ebx
pop ebx
add ebx, ebp
pop ebx
xor eax, eax
xor edx, edx
cmp ax, word [esi + 8]
jae 0x4012c1
xor edi, edi
jmp 0x401270
push edi
or edi, edi
call 0x401279
dec edi
pop edi
xor edi, esi
or edi, edi
jmp 0x401282
nop
pop edi
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 edx
call 0x4012a7
dec edx
pop edx
call 0x4012ae
dec edx
pop edx
xor edx, eax
sbb edx, edi
pop edx
inc edx
cmp dx, word [esi + 8]
jb 0x401270
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0xc]
push esi
call 0x4012c8
dec esi
pop esi
call 0x4012cf
dec esi
pop esi
add esi, edx
xor esi, edi
pop esi
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
inc ebx
pop ebx
and ebx, ebx
sbb ebx, ecx
cmp eax, ebx
jne 0x4012fe
dec ebx
add ebx, ebp
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 edi
add edi, ebx
call 0x401340
dec edi
pop edi
xor edi, edx
xor edi, ecx
jmp 0x40134a
pop edi
xor edx, edx
xor eax, eax
mov dword [ebp - 8], edx
cmp ax, word [esi + 8]
jae 0x4013be
push ebx
and ebx, ebx
add ebx, ebx
call 0x401363
dec ebx
pop ebx
xor ebx, esi
jmp 0x40136a
inc ebx
pop ebx
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 edi
xor edi, edx
xor edi, esp
call 0x4013a8
dec edi
pop edi
sbb edi, edx
jmp 0x4013b0
pop edi
mov edx, dword [ebp - 8]
inc edx
mov dword [ebp - 8], edx
cmp dx, word [esi + 8]
jb 0x401358
push ebp
add ebp, edi
or ebp, ecx
and ebp, ebx
call 0x4013cb
inc ebp
pop ebp
sbb ebp, ebx
add ebp, edi
nop
pop ebp
mov eax, dword [edi + 4]
cmp eax, dword [esi + 4]
je 0x401544
push eax
sbb eax, esi
call 0x4013e7
dec eax
pop eax
call 0x4013ee
dec eax
pop eax
xor eax, edi
pop eax
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 ebp
add ebp, ebp
call 0x401419
dec ebp
pop ebp
sbb ebp, eax
and ebp, ebp
or ebp, edi
and ebp, ebx
nop
pop ebp
cmp dword [esi + 0x1c], 0
je 0x401668
cmp dword [esi + 0x20], 0
je 0x401668
push eax
call 0x40143f
dec eax
pop eax
call 0x401446
dec eax
pop eax
and eax, eax
or eax, edx
pop eax
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 esi
sbb esi, ecx
and esi, edi
call 0x40146b
inc esi
pop esi
and esi, ebp
xor esi, ecx
add esi, esi
nop
pop esi
cmp edx, dword [ebp - 0xc]
jae 0x401530
lea ecx, [ecx]
push ecx
or ecx, ecx
call 0x401489
dec ecx
pop ecx
add ecx, esp
or ecx, ecx
or ecx, esp
sbb ecx, eax
nop
pop ecx
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 esi
call 0x4014ae
dec esi
pop esi
call 0x4014b5
dec esi
pop esi
and esi, ebx
sbb esi, eax
pop esi
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 ecx
call 0x4014ef
dec ecx
pop ecx
call 0x4014f6
dec ecx
pop ecx
and ecx, esi
and ecx, eax
pop ecx
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 edi
xor edi, esp
xor edi, ebp
call 0x401518
inc edi
pop edi
and edi, esp
and edi, eax
and edi, esi
nop
pop edi
cmp edx, dword [ebp - 0xc]
jb 0x401480
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push edx
call 0x401537
dec edx
pop edx
sbb edx, esi
add edx, ecx
jmp 0x401540
sbb edx, eax
inc edx
pop edx
push esi
call 0x40154b
dec esi
pop esi
xor esi, ecx
or esi, edx
jmp 0x401555
xor esi, ebp
pop esi
cmp dword [esi + 0x14], 0
je 0x4016f3
cmp dword [esi + 0x18], 0
je 0x4016f3
push edx
or edx, edx
call 0x401575
dec edx
pop edx
call 0x40157c
dec edx
pop edx
add edx, ebx
pop edx
mov edx, dword [edi + 4]
add edx, dword [esi + 0x14]
mov dword [ebp - 8], edx
push eax
or eax, ebp
call 0x401592
inc eax
pop eax
call 0x401599
inc eax
pop eax
xor eax, esi
pop eax
cmp dword [edx + 0xc], 0
je 0x4016dc
push ebp
or ebp, esp
or ebp, ebp
call 0x4015b2
dec ebp
pop ebp
xor ebp, ebp
sbb ebp, edi
sbb ebp, ebp
nop
pop ebp
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
and eax, esp
sbb eax, eax
xor eax, ecx
or eax, ecx
and eax, edi
nop
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 ebx
call 0x401600
dec ebx
pop ebx
and ebx, edi
call 0x401609
dec ebx
pop ebx
and ebx, ecx
pop ebx
mov eax, dword [edx]
test eax, eax
je 0x4016c4
mov esi, dword [edi + 4]
add esi, eax
push ecx
or ecx, eax
call 0x401625
inc ecx
pop ecx
xor ecx, esp
xor ecx, eax
xor ecx, ebx
add ecx, edx
nop
pop ecx
push esi
call 0x401637
dec esi
pop esi
call 0x40163e
dec esi
pop esi
and esi, edi
and esi, ebx
pop esi
sub dword [ebp + 0xc], esi
push ecx
call 0x40164e
dec ecx
pop ecx
call 0x401655
dec ecx
pop ecx
and ecx, edx
or ecx, esp
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 ebp
call 0x401693
dec ebp
pop ebp
call 0x40169a
dec ebp
pop ebp
xor ebp, esp
add ebp, esp
pop ebp
add esi, 4
jmp 0x401647
push edx
call 0x4016ac
inc edx
pop edx
or edx, edx
call 0x4016b5
inc edx
pop edx
xor edx, ecx
pop edx
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 edi
call 0x4016e3
dec edi
pop edi
xor edi, ebp
call 0x4016ec
dec edi
pop edi
sbb edi, ecx
pop edi
mov esi, dword [ebp + 8]
push edx
call 0x4016fa
dec edx
pop edx
xor edx, eax
xor edx, edx
jmp 0x401703
add edx, ebp
inc edx
pop edx
mov dword [ebp - 4], 0
push esi
xor esi, eax
and esi, edx
call 0x401719
dec esi
pop esi
jmp 0x40171e
sbb esi, eax
nop
pop esi
xor edx, edx
xor eax, eax
mov dword [ebp + 0xc], edx
cmp ax, word [esi + 8]
jae 0x40181b
push ebx
call 0x40173a
inc ebx
pop ebx
call 0x401741
inc ebx
pop ebx
sbb ebx, eax
xor ebx, edi
pop ebx
movzx eax, dx
lea eax, [eax + eax*4]
add eax, dword [esi + 0xc]
lea edx, [esi + eax*4]
push edi
call 0x40175a
dec edi
pop edi
xor edi, ebx
call 0x401763
dec edi
pop edi
or edi, edi
pop edi
mov eax, dword [edx + 0x34]
test al, 0x20
je 0x401776
or eax, 0x60000000
mov dword [edx + 0x34], eax
push ebx
add ebx, esp
call 0x40177f
dec ebx
pop ebx
call 0x401786
dec ebx
pop ebx
xor ebx, edi
pop ebx
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 edi
and edi, ebx
sbb edi, ecx
or edi, ebx
or edi, esp
call 0x4017d6
dec edi
pop edi
or edi, eax
nop
pop edi
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 ebp
and ebp, edx
or ebp, esp
sbb ebp, ebp
sbb ebp, esp
call 0x401805
inc ebp
pop ebp
and ebp, esp
nop
pop ebp
mov edx, dword [ebp + 0xc]
inc edx
mov dword [ebp + 0xc], edx
cmp dx, word [esi + 8]
jb 0x401733
push eax
call 0x401822
dec eax
pop eax
xor eax, ebx
call 0x40182b
dec eax
pop eax
xor eax, ebx
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