Function at 0x4012cc
Capabilities:
Allocate or change rwx memory

Disassembly:
pop ecx
call 0x4011e7
dec ecx
pop ecx
add ecx, edi
add ecx, edx
pop ecx
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], 0
mov dword [edi], 0
push ebp
call 0x401204
dec ebp
pop ebp
add ebp, edx
xor ebp, ebp
add ebp, ebp
add ebp, ecx
or ebp, ebx
nop
pop ebp
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 ecx
xor ecx, ebx
or ecx, ebx
and ecx, edx
call 0x40122e
dec ecx
pop ecx
add ecx, ebx
or ecx, ebp
nop
pop ecx
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
call 0x401252
inc edi
pop edi
call 0x401259
inc edi
pop edi
xor edi, edx
sbb edi, edi
pop edi
xor eax, eax
xor edx, edx
cmp ax, word [esi + 8]
jae 0x4012c1
xor edi, edi
jmp 0x401270
push edx
call 0x401277
dec edx
pop edx
call 0x40127e
dec edx
pop edx
and edx, ebp
and edx, eax
pop edx
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 esi
xor esi, esi
call 0x4012a9
dec esi
pop esi
call 0x4012b0
dec esi
pop esi
xor esi, edx
pop esi
inc edx
cmp dx, word [esi + 8]
jb 0x401270
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0xc]
push edx
and edx, ebp
and edx, ecx
call 0x4012cc
dec edx
pop edx
and edx, ecx
sbb edx, edx
or edx, ebp
nop
pop edx
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 eax
call 0x4012f4
inc eax
pop eax
or eax, eax
and eax, esi
cmp eax, eax
jne 0x4012fe
dec eax
sbb eax, esp
pop eax
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 ebx
add ebx, ecx
call 0x401340
dec ebx
pop ebx
call 0x401347
dec ebx
pop ebx
add ebx, edi
pop ebx
xor edx, edx
xor eax, eax
mov dword [ebp - 8], edx
cmp ax, word [esi + 8]
jae 0x4013be
push edi
sbb edi, ecx
call 0x401361
dec edi
pop edi
or edi, edi
or edi, esp
jmp 0x40136a
nop
pop edi
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 ebx
add ebx, eax
or ebx, edi
add ebx, edx
or ebx, esp
or ebx, esp
jmp 0x4013ac
xor ebx, esi
add ebx, ebx
pop ebx
mov edx, dword [ebp - 8]
inc edx
mov dword [ebp - 8], edx
cmp dx, word [esi + 8]
jb 0x401358
push ecx
or ecx, ebp
or ecx, esp
call 0x4013c9
inc ecx
pop ecx
sbb ecx, esp
cmp eax, ecx
jne 0x4013d1
dec ecx
pop ecx
mov eax, dword [edi + 4]
cmp eax, dword [esi + 4]
je 0x401544
push ebp
sbb ebp, esp
add ebp, esp
add ebp, ebx
sbb ebp, ebx
xor ebp, eax
jmp 0x4013ee
and ebp, ecx
nop
pop ebp
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 eax
or eax, esp
call 0x401419
dec eax
pop eax
call 0x401420
dec eax
pop eax
and eax, ebp
pop eax
cmp dword [esi + 0x1c], 0
je 0x401668
cmp dword [esi + 0x20], 0
je 0x401668
push ebx
call 0x40143f
dec ebx
pop ebx
or ebx, ebp
or ebx, ebp
jmp 0x401449
or ebx, edi
pop ebx
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 edx
xor edx, eax
call 0x401469
inc edx
pop edx
call 0x401470
inc edx
pop edx
and edx, eax
pop edx
cmp edx, dword [ebp - 0xc]
jae 0x401530
lea ecx, [ecx]
push esi
sbb esi, edi
or esi, ebx
call 0x40148b
dec esi
pop esi
jmp 0x401491
xor esi, ecx
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 ecx
call 0x4014ae
dec ecx
pop ecx
call 0x4014b5
dec ecx
pop ecx
or ecx, eax
add ecx, ebx
pop ecx
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 ebp
call 0x4014ef
dec ebp
pop ebp
call 0x4014f6
dec ebp
pop ebp
sbb ebp, ebx
xor ebp, ebx
pop ebp
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 ebx
xor ebx, edx
call 0x401516
inc ebx
pop ebx
sbb ebx, ebp
cmp eax, ebx
jne 0x40151e
dec ebx
xor ebx, ebx
pop ebx
cmp edx, dword [ebp - 0xc]
jb 0x401480
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push edi
call 0x401537
dec edi
pop edi
and edi, esp
xor edi, esi
jmp 0x401541
add edi, eax
pop edi
push edx
call 0x40154b
dec edx
pop edx
sbb edx, esi
call 0x401554
dec edx
pop edx
sbb edx, edi
pop edx
cmp dword [esi + 0x14], 0
je 0x4016f3
cmp dword [esi + 0x18], 0
je 0x4016f3
push esi
call 0x401573
dec esi
pop esi
sbb esi, ecx
sbb esi, edi
and esi, edi
jmp 0x40157e
nop
pop esi
mov edx, dword [edi + 4]
add edx, dword [esi + 0x14]
mov dword [ebp - 8], edx
push ebx
call 0x401590
inc ebx
pop ebx
call 0x401597
inc ebx
pop ebx
and ebx, edi
and ebx, esi
pop ebx
cmp dword [edx + 0xc], 0
je 0x4016dc
push eax
call 0x4015ae
dec eax
pop eax
call 0x4015b5
dec eax
pop eax
and eax, ecx
xor eax, edi
pop eax
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 ebx
call 0x4015da
dec ebx
pop ebx
call 0x4015e1
dec ebx
pop ebx
add ebx, esp
sbb ebx, edi
pop ebx
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 edi
and edi, ebx
and edi, eax
call 0x401604
dec edi
pop edi
add edi, edi
jmp 0x40160b
nop
pop edi
mov eax, dword [edx]
test eax, eax
je 0x4016c4
mov esi, dword [edi + 4]
add esi, eax
push ebp
call 0x401623
inc ebp
pop ebp
xor ebp, esp
add ebp, edi
cmp eax, ebp
jne 0x40162d
dec ebp
sbb ebp, edx
pop ebp
push ecx
call 0x401637
dec ecx
pop ecx
call 0x40163e
dec ecx
pop ecx
xor ecx, edi
sbb ecx, ebp
pop ecx
sub dword [ebp + 0xc], esi
push ebp
and ebp, esi
xor ebp, esi
call 0x401652
dec ebp
pop ebp
or ebp, edx
or ebp, edi
add ebp, eax
inc ebp
pop ebp
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 eax
add eax, esi
sbb eax, esi
or eax, esp
xor eax, ebx
sbb eax, ebx
and eax, eax
sbb eax, esp
add eax, ecx
add eax, edi
pop eax
add esi, 4
jmp 0x401647
push esi
call 0x4016ac
inc esi
pop esi
or esi, edx
call 0x4016b5
inc esi
pop esi
or esi, ebp
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 edx
sbb edx, edx
call 0x4016e5
dec edx
pop edx
add edx, ebp
add edx, esi
or edx, esp
or edx, esi
inc edx
pop edx
mov esi, dword [ebp + 8]
push esi
or esi, ecx
call 0x4016fc
dec esi
pop esi
or esi, esi
add esi, edx
sbb esi, esi
add esi, eax
inc esi
pop esi
mov dword [ebp - 4], 0
push ecx
call 0x401715
dec ecx
pop ecx
xor ecx, edx
call 0x40171e
dec ecx
pop ecx
add ecx, edi
pop ecx
xor edx, edx
xor eax, eax
mov dword [ebp + 0xc], edx
cmp ax, word [esi + 8]
jae 0x40181b
push edi
xor edi, ebp
and edi, ecx
sbb edi, eax
call 0x401740
inc edi
pop edi
xor edi, eax
sbb edi, esp
inc edi
pop edi
movzx eax, dx
lea eax, [eax + eax*4]
add eax, dword [esi + 0xc]
lea edx, [esi + eax*4]
push ebx
or ebx, ebp
or ebx, ecx
or ebx, esp
call 0x401760
dec ebx
pop ebx
and ebx, ebx
or ebx, esi
inc ebx
pop ebx
mov eax, dword [edx + 0x34]
test al, 0x20
je 0x401776
or eax, 0x60000000
mov dword [edx + 0x34], eax
push edi
call 0x40177d
dec edi
pop edi
call 0x401784
dec edi
pop edi
sbb edi, ebp
and edi, edx
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 edx
call 0x4017ce
dec edx
pop edx
xor edx, eax
add edx, esp
jmp 0x4017d7
add edx, esp
nop
pop edx
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 eax
and eax, eax
sbb eax, edi
call 0x401801
inc eax
pop eax
add eax, ecx
and eax, edi
xor eax, ebx
inc eax
pop eax
mov edx, dword [ebp + 0xc]
inc edx
mov dword [ebp + 0xc], edx
cmp dx, word [esi + 8]
jb 0x401733
push ebp
call 0x401822
dec ebp
pop ebp
call 0x401829
dec ebp
pop ebp
sbb ebp, eax
and ebp, eax
pop ebp
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