Function at 0x402000
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x423648
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x42d210]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 4], 0xffffffff
jne 0x402065
push ebx
push ebx
mov eax, edi
call fcn.004078f0
test al, al
jne 0x402065
cmp dword [0x42e25c], 1
jl 0x402338
call fcn.00405eb0
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 - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
push ecx
mov eax, esp
mov dword [ebp - 4], ebx
mov dword [eax], 0x2000
lea eax, [ebp - 0x38]
mov dword [ebp - 0x20], esp
push eax
call fcn.00407c10
lea esi, [ebp - 0x38]
call fcn.004079a0
test al, al
jne 0x4020d0
cmp dword [0x42e25c], 1
jl 0x4020a8
push str.Error_reading_exe_file
call fcn.00405f40
add esp, 4
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x402338
push eax
call fcn.00411259
add esp, 4
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
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x18]
call fcn.00407eb0
cmp dword [ebp - 0x18], 0x40
jae 0x40211f
cmp dword [0x42e25c], 1
jl 0x4020f7
push str.No_data_read_from_exe_file
call fcn.00405f40
add esp, 4
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x402338
push eax
call fcn.00411259
add esp, 4
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 ebx, dword [ebp - 0x38]
mov ecx, 0x5a4d
cmp cx, word [ebx]
je 0x40215f
cmp dword [0x42e25c], 1
jl 0x402142
push str.Invalid_magic_number_in_DOS_header
call fcn.00405f40
add esp, 4
push ebx
call fcn.00411259
add esp, 4
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 esi, dword [ebx + 0x3c]
lea edi, [esi + 0xf8]
cmp edi, esi
jae 0x402180
mov dl, byte [ebp - 0x11]
push 0x42abf4
lea eax, [ebp - 0x11]
push eax
mov byte [ebp - 0x11], dl
call fcn.00411f68
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x20], edi
call fcn.00407eb0
cmp edi, dword [ebp - 0x18]
jbe 0x4021cc
cmp dword [0x42e25c], 1
jl 0x402329
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x18]
call fcn.00407eb0
mov ecx, dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x2c], ecx
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], eax
call fcn.00405fd0
jmp 0x402329
add esi, ebx
cmp byte [esi], 0x50
jne 0x40231b
cmp byte [esi + 1], 0x45
jne 0x40231b
cmp byte [esi + 2], 0
jne 0x40231b
cmp byte [esi + 3], 0
jne 0x40231b
mov edx, 0xe0
cmp dx, word [esi + 0x14]
je 0x40221f
cmp dword [0x42e25c], 1
jl 0x402329
push str.Invalid_optional_header_size
call fcn.00405f40
add esp, 4
jmp 0x402329
mov eax, 0x10b
cmp ax, word [esi + 0x18]
je 0x402241
cmp dword [0x42e25c], 1
jl 0x402329
call fcn.00406130
jmp 0x402329
push ecx
mov eax, esp
mov dword [eax], 0x28
movzx ecx, word [esi + 6]
lea ebx, [ebp - 0x1c]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x18], ecx
call fcn.00404f50
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x18]
call fcn.00407eb0
mov edx, ebx
push edx
lea ecx, [ebp - 0x20]
lea eax, [ebp - 0x28]
call fcn.00404f90
mov eax, dword [eax]
add esp, 4
cmp eax, dword [ebp - 0x18]
jbe 0x402299
cmp dword [0x42e25c], 1
jl 0x402329
call fcn.004061c0
jmp 0x402329
movzx edx, word [esi + 0x14]
lea eax, [edx + esi + 0x2c]
movzx edx, word [esi + 6]
xor edi, edi
xor ecx, ecx
test edx, edx
je 0x4022c1
mov ebx, edx
nop
mov edx, dword [eax]
cmp edx, edi
jbe 0x4022bb
mov ecx, dword [eax - 4]
mov edi, edx
add eax, 0x28
dec ebx
jne 0x4022b0
mov esi, dword [esi + 0x3c]
xor edx, edx
mov eax, ecx
div esi
test edx, edx
je 0x4022d2
sub esi, edx
add ecx, esi
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], ecx
push eax
lea ecx, [ebp - 0x1c]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], edi
call fcn.00404f90
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
add esp, 4
lea esi, [ebp - 0x38]
mov dword [ecx], eax
mov dword [ecx + 4], 0
mov dword [ebp - 4], 0xffffffff
call fcn.00408ba0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x42e25c], 1
jl 0x402329
call fcn.004060a0
lea esi, [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
call fcn.00408ba0
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