Function at 0x4011d0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, ecx
push edi
mov dword [ebp - 8], eax
nop
nop
nop
nop
nop
nop
nop
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x401580
mov edi, dword [eax + 0x3c]
add edi, eax
mov dword [ebp - 0x14], edi
cmp dword [edi], 0x4550
jne 0x401580
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push dword [edi + 0x50]
push dword [edi + 0x34]
call esi
mov dword [ebp - 4], eax
test eax, eax
jne 0x401246
push 4
push 0x3000
push dword [edi + 0x50]
push eax
call esi
mov dword [ebp - 4], eax
test eax, eax
jne 0x401246
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push ebx
nop
nop
nop
nop
nop
nop
nop
push 0x24
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x401290
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [ebp - 4]
push 0x8000
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop ebx
pop esi
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
push 4
push 0x1000
mov dword [ebx + 4], eax
mov dword [ebx + 0xc], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0x401180
mov dword [ebx + 0x18], 0x4011a0
mov dword [ebx + 0x1c], 0x4011c0
mov dword [ebx + 0x20], 0
push dword [edi + 0x54]
push eax
call esi
push dword [edi + 0x54]
mov esi, eax
push dword [ebp - 8]
push esi
call fcn.00403b20
mov eax, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], 0
mov eax, dword [eax + 0x3c]
add eax, esi
xor esi, esi
mov dword [ebx], eax
mov dword [eax + 0x34], ecx
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0xc], ecx
movzx edx, word [eax + 0x14]
add edx, 0x28
cmp si, word [eax + 6]
jae 0x4013a1
lea edi, [edx + eax]
nop word [eax + eax]
cmp dword [edi], 0
jne 0x401358
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 0x38]
test esi, esi
jle 0x40138a
mov eax, dword [edi - 4]
push 4
push 0x1000
push esi
add eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
nop
nop
nop
nop
nop
nop
nop
push esi
push 0
push eax
mov dword [edi - 8], eax
call fcn.00403250
jmp 0x401384
nop
nop
nop
mov eax, dword [edi - 4]
push 4
push 0x1000
push dword [edi]
add eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push dword [edi]
mov ecx, dword [edi + 4]
mov esi, eax
add ecx, dword [ebp - 8]
push ecx
push esi
call fcn.00403b20
mov dword [edi - 8], esi
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov eax, dword [ebx]
add edi, 0x28
mov esi, dword [ebp - 0x10]
inc esi
mov dword [ebp - 0x10], esi
movzx eax, word [eax + 6]
cmp esi, eax
jl 0x401320
mov edi, dword [ebp - 0x14]
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [ebp - 4]
sub eax, dword [edi + 0x34]
mov dword [ebp - 0x10], eax
je 0x40142d
mov edi, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0xc], ecx
cmp dword [edi + 0xa4], 0
jbe 0x40142d
mov edi, dword [edi + 0xa0]
add edi, ecx
mov eax, dword [edi]
test eax, eax
je 0x40142d
add eax, ecx
lea edx, [edi + 8]
mov ecx, dword [edi + 4]
xor esi, esi
mov dword [ebp - 0x14], eax
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x40141e
mov ebx, dword [ebp - 0x14]
nop dword [eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x40140e
mov ecx, dword [ebp - 0x10]
and eax, 0xfff
add dword [eax + ebx], ecx
mov ecx, dword [edi + 4]
inc esi
add edx, 2
lea eax, [ecx - 8]
shr eax, 1
cmp esi, eax
jb 0x4013f0
mov eax, dword [edi + ecx]
add edi, ecx
mov ecx, dword [ebp - 0xc]
test eax, eax
jne 0x4013d2
mov ebx, dword [ebp - 0x18]
mov ecx, ebx
call section..text
test eax, eax
je 0x401560
mov eax, dword [ebx]
movzx esi, word [eax + 0x14]
add esi, eax
nop
nop
nop
mov ecx, dword [ebx]
xor eax, eax
xor edi, edi
cmp ax, word [ecx + 6]
jae 0x401509
add esi, 0x28
nop word [eax + eax]
mov edx, dword [esi + 0x14]
test edx, 0x2000000
je 0x40147d
push 0x4000
push dword [esi]
push dword [esi - 8]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4014f7
nop
nop
nop
nop
nop
mov ecx, edx
mov eax, edx
shr eax, 0x1e
and eax, 1
shr ecx, 0x1d
and ecx, 1
shr edx, 0x1f
lea eax, [eax + ecx*2]
lea eax, [edx + eax*2]
mov edx, dword [esi + 0x14]
mov ecx, dword [eax*4 + 0x418b4c]
mov eax, edx
mov dword [ebp - 8], ecx
or dword [ebp - 8], 0x200
and eax, 0x4000000
mov eax, dword [ebp - 8]
cmove eax, ecx
mov dword [ebp - 8], eax
mov eax, dword [esi]
test eax, eax
jne 0x4014dd
test dl, 0x40
je 0x4014d4
mov eax, dword [ebx]
mov eax, dword [eax + 0x20]
nop
nop
nop
jmp 0x4014dd
test dl, dl
jns 0x4014dd
mov eax, dword [ebx]
mov eax, dword [eax + 0x24]
nop
nop
nop
nop
nop
test eax, eax
je 0x4014f7
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp - 8]
push eax
push dword [esi - 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebx]
inc edi
add esi, 0x28
movzx eax, word [ecx + 6]
cmp edi, eax
jl 0x401460
mov esi, dword [ecx + 0xc0]
mov edi, dword [ebx + 4]
test esi, esi
je 0x401535
mov esi, dword [esi + edi + 0xc]
test esi, esi
je 0x401535
mov eax, dword [esi]
test eax, eax
je 0x401535
push 0
push 1
push edi
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x401524
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [ebx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x401577
mov ecx, dword [ebp - 4]
add eax, ecx
push 0
push 1
push ecx
call eax
test eax, eax
jne 0x401570
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, ebx
call fcn.004015a0
pop ebx
pop esi
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x10], 1
mov eax, ebx
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret