Function at 0x4012c4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
push edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x5a4d
je 0x4012fd
push 0
push 0x403024
push str.Not_a_valid_executable_file._n
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x4014fa
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
cmp dword [edx], 0x4550
je 0x40132f
push 0
push 0x40304c
push str.No_PE_header_found._n
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x4014fa
push 4
push 0x2000
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x50]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x34]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40136c
push 4
push 0x2000
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x50]
push edx
push 0
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x401386
push str.Cant_reserve_memory
call fcn.00401502
add esp, 4
xor eax, eax
jmp 0x4014fa
push 0x18
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 4]
mov dword [edx + 0x10], 0
mov eax, dword [ebp - 4]
mov dword [eax + 8], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x14], 0
push 4
push 0x1000
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x50]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
push 4
push 0x1000
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x3c]
mov eax, dword [ebp - 0x10]
add ecx, dword [eax + 0x54]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x1c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
add ecx, dword [eax + 0x3c]
mov edx, dword [ebp - 4]
mov dword [edx], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x20]
mov dword [ecx + 0x34], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004015fc
add esp, 0xc
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 0
je 0x401463
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00401868
add esp, 8
mov ecx, dword [ebp - 4]
push ecx
call fcn.00401940
add esp, 4
test eax, eax
jne 0x401475
jmp 0x4014ef
mov edx, dword [ebp - 4]
push edx
call fcn.004016ff
add esp, 4
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
cmp dword [ecx + 0x28], 0
je 0x4014ea
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x20]
add ecx, dword [eax + 0x28]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jne 0x4014b6
push 0
push 0x403084
push str.Library_has_no_entry_point._n
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4014ef
push 0
push 1
mov edx, dword [ebp - 0x20]
push edx
call dword [ebp - 8]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4014e0
push 0
push 0x4030ac
push str.Cant_attach_library._n
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4014ef
mov eax, dword [ebp - 4]
mov dword [eax + 0x14], 1
mov eax, dword [ebp - 4]
jmp 0x4014fa
mov ecx, dword [ebp - 4]
push ecx
call fcn.00401c68
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4