Function at 0x452004
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeac
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x452283
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp + 8]
mov edx, dword [edx]
lea eax, [ebp - 0x59]
mov ecx, 0x40
call fcn.00406db4
cmp word [ebp - 0x59], 0x5a4d
je 0x45204f
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4522a3
mov edx, dword [ebp + 8]
mov edx, dword [edx]
add edx, dword [ebp - 0x1d]
jno 0x45205e
call fcn.004035e0
lea eax, [ebp - 0x151]
mov ecx, 0xf8
call fcn.00406db4
cmp dword [ebp - 0x151], 0x4550
je 0x452087
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4522a3
push 4
push 0x2000
mov eax, dword [ebp - 0x101]
push eax
mov eax, dword [ebp - 0x11d]
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4520d7
cmp byte [ebp + 0x1c], 0
je 0x4520ca
push 4
push 0x2000
mov eax, dword [ebp - 0x101]
push eax
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 0xc], eax
jmp 0x4520d7
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4522a3
cmp dword [ebp - 0xc], 0
jne 0x4520ea
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4522a3
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp - 0x101]
mov dword [eax], edx
push 0x11
push 0
call sub.kernel32.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov dword [eax + 4], edx
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [eax + 8], edx
mov eax, dword [ebp - 8]
mov byte [eax + 0x10], 0
push 4
push 0x1000
mov eax, dword [ebp - 0x101]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 0x10], eax
push 4
push 0x1000
mov eax, dword [ebp - 0xfd]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x1d]
add ecx, dword [ebp - 0xfd]
jae 0x452173
call fcn.004035e0
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov eax, dword [ebp - 0x10]
call fcn.00406db4
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x1d]
jno 0x45218d
call fcn.004035e0
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0x34], edx
mov eax, dword [ebp - 8]
push eax
lea eax, [ebp - 0x151]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call fcn.004519b4
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x11d]
jb 0x4521d3
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x11d]
jae 0x4521ce
call fcn.004035e0
mov dword [ebp - 0x14], eax
jmp 0x4521fa
or eax, 0xffffffff
sub eax, dword [ebp - 0x11d]
jae 0x4521e3
call fcn.004035e0
add eax, dword [ebp - 0xc]
jae 0x4521ed
call fcn.004035e0
add eax, 1
jae 0x4521f7
call fcn.004035e0
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x45220d
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
push eax
call fcn.00451adc
mov eax, dword [ebp - 8]
push eax
call fcn.00451c60
test al, al
jne 0x45221f
call fcn.0040ba10
mov eax, dword [ebp - 8]
push eax
call fcn.00451efc
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp dword [eax + 0x28], 0
je 0x452279
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 0xc]
jae 0x452245
call fcn.004035e0
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x452253
call fcn.0040ba10
push 0
push 1
mov eax, dword [ebp - 0xc]
push eax
call dword [ebp - 0x18]
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
jne 0x452272
call fcn.0040ba10
mov eax, dword [ebp - 8]
mov byte [eax + 0x10], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x45229d
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18