Function at 0x4034a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42a5e8
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x4382c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2c], edx
mov esi, ecx
cmp dword [esi + 4], 0xffffffff
jne 0x403503
push ecx
push 0
push 0
call fcn.00410590
test al, al
jne 0x403503
cmp dword [0x43aa3c], 1
jl 0x4034ef
call fcn.00406b90
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
push ecx
mov eax, esp
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x44]
mov dword [eax], 0x2000
call fcn.00406c20
lea eax, [ebp - 0x44]
push eax
mov ecx, esi
call fcn.00410660
mov ebx, dword [ebp - 0x44]
test al, al
jne 0x40355e
cmp dword [0x43aa3c], 1
jl 0x403780
mov ecx, str.Error_reading_exe_file
call fcn.00406c90
jmp 0x403780
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x14]
call fcn.00407750
cmp dword [ebp - 0x14], 0x40
jae 0x40358c
cmp dword [0x43aa3c], 1
jl 0x403780
mov ecx, str.No_data_read_from_exe_file
call fcn.00406c90
jmp 0x403780
mov eax, 0x5a4d
cmp ax, word [ebx]
je 0x4035b2
cmp dword [0x43aa3c], 1
jl 0x403780
mov ecx, str.Invalid_magic_number_in_DOS_header
call fcn.00406c90
jmp 0x403780
mov edi, dword [ebx + 0x3c]
mov dword [ebp - 0x24], edi
lea esi, [edi + 0xf8]
cmp esi, edi
jae 0x4035d6
mov al, byte [ebp - 0xd]
mov byte [ebp - 0xd], al
push 0x4352b4
lea eax, [ebp - 0xd]
push eax
call fcn.00418fbb
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x1c], esi
call fcn.00407750
cmp esi, dword [ebp - 0x14]
jbe 0x40362f
cmp dword [0x43aa3c], 1
jl 0x403780
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x14]
call fcn.00407750
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
push ecx
lea edx, [ebp - 0x30]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], 0
call fcn.00406d20
add esp, 8
jmp 0x403780
cmp byte [ebx + edi], 0x50
jne 0x403772
cmp byte [ebx + edi + 1], 0x45
jne 0x403772
cmp byte [ebx + edi + 2], 0
jne 0x403772
cmp byte [ebx + edi + 3], 0
jne 0x403772
lea ecx, [ebx + 4]
add ecx, edi
mov eax, 0xe0
mov dword [ebp - 0x20], ecx
cmp ax, word [ecx + 0x10]
je 0x403689
cmp dword [0x43aa3c], 1
jl 0x403780
mov ecx, str.Invalid_optional_header_size
call fcn.00406c90
jmp 0x403780
mov eax, 0x10b
cmp ax, word [ebx + edi + 0x18]
je 0x4036ac
cmp dword [0x43aa3c], 1
jl 0x403780
call fcn.00406e80
jmp 0x403780
push ecx
mov eax, esp
lea edx, [ebp - 0x14]
mov dword [eax], 0x28
movzx eax, word [ecx + 2]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x14], eax
call fcn.00405e40
add esp, 4
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x14]
call fcn.00407750
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x34]
call fcn.00405e10
mov eax, dword [eax]
add esp, 4
cmp eax, dword [ebp - 0x14]
jbe 0x403703
cmp dword [0x43aa3c], 1
jl 0x403780
call fcn.00406f10
jmp 0x403780
mov ecx, dword [ebp - 0x20]
xor esi, esi
movzx edx, word [ecx + 2]
movzx eax, word [ecx + 0x10]
xor edi, edi
test edx, edx
je 0x403731
add eax, 0x28
add eax, ecx
jmp 0x403720
mov ecx, dword [eax]
cmp ecx, esi
jbe 0x40372b
mov edi, dword [eax - 4]
mov esi, ecx
add eax, 0x28
dec edx
jne 0x403720
mov ecx, dword [ebp - 0x24]
xor edx, edx
mov ecx, dword [ebx + ecx + 0x3c]
mov eax, edi
div ecx
test edx, edx
je 0x403746
sub ecx, edx
add edi, ecx
lea eax, [ebp - 0x24]
push eax
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], esi
call fcn.00405e10
mov ecx, dword [ebp - 0x2c]
mov eax, dword [eax]
add esp, 4
mov dword [ecx], eax
mov dword [ecx + 4], 0
mov byte [ebp - 0xd], 1
jmp 0x403784
cmp dword [0x43aa3c], 1
jl 0x403780
call fcn.00406df0
mov byte [ebp - 0xd], 0
test ebx, ebx
je 0x403791
push ebx
call fcn.00417164
add esp, 4
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret