Function at 0x39f7060
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x188
mov eax, dword [0x3a7682c]
xor eax, esp
mov dword [esp + 0x184], eax
mov eax, dword [esp + 0x190]
push ebx
mov ebx, dword [esp + 0x190]
push ebp
mov ebp, dword [esp + 0x1a0]
push esi
mov esi, dword [esp + 0x1a8]
push edi
mov edi, dword [esp + 0x1a4]
mov dword [esp + 0x18], eax
xor eax, eax
cmp edi, eax
jne 0x39f70a9
lea edi, [esp + 0x5c]
cmp esi, eax
jne 0x39f70b2
mov esi, 0x39f6fe0
push 0x40
lea ecx, [esp + 0x158]
push ecx
lea edx, [esp + 0x18]
push edx
push ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
call esi
add esp, 0x10
test al, al
je 0x39f72d5
mov eax, 0x5a4d
cmp word [esp + 0x154], ax
jne 0x39f72d5
mov eax, dword [esp + 0x190]
test eax, eax
jne 0x39f7116
test ebp, ebp
je 0x39f710c
mov ecx, dword [0x3a56b80]
push ecx
push str._DOS_executable_
mov ecx, ebp
call fcn.039efdd0
mov eax, 1
jmp 0x39f7376
cdq
push 4
mov dword [esp + 0x18], edx
push edi
lea edx, [esp + 0x18]
push edx
push ebx
mov dword [esp + 0x20], eax
call esi
add esp, 0x10
test al, al
jne 0x39f715c
test ebp, ebp
je 0x39f7147
mov eax, dword [0x3a56b80]
push eax
push str._Unable_to_read_executable_type_signature_
mov ecx, ebp
call fcn.039efdd0
push 0xc1
call dword [0x3a5fde0]
mov eax, 1
jmp 0x39f7376
mov eax, dword [edi]
movzx ecx, ax
cmp ecx, 0x454e
jne 0x39f7205
mov edx, dword [esp + 0x190]
mov dword [esp + 0x1c], eax
push 0x3c
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x18]
push ecx
add edx, 4
push ebx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], 0
call esi
add esp, 0x10
test al, al
jne 0x39f71bb
test ebp, ebp
je 0x39f71b4
mov edx, dword [0x3a56b80]
push edx
push str._OS2_signature_found_but_unable_to_load_OS2_header__
mov ecx, ebp
call fcn.039efdd0
xor eax, eax
jmp 0x39f7376
mov al, byte [esp + 0x52]
cmp al, 2
je 0x39f71e4
cmp al, 4
je 0x39f71e4
test ebp, ebp
je 0x39f71dd
mov eax, dword [0x3a56b80]
push eax
push str._Unrecognized_OS2_exetyp__
mov ecx, ebp
call fcn.039efdd0
xor eax, eax
jmp 0x39f7376
test ebp, ebp
je 0x39f71fb
mov ecx, dword [0x3a56b80]
push ecx
push str._Win16_executable_
mov ecx, ebp
call fcn.039efdd0
mov eax, 2
jmp 0x39f7376
cmp eax, 0x4550
je 0x39f7225
test ebp, ebp
je 0x39f7147
mov edx, dword [0x3a56b80]
push edx
push str._Unrecognized_executable_type_signature__
jmp 0x39f7140
mov eax, dword [esp + 0x190]
add eax, 4
mov dword [esp + 0x10], eax
lea eax, [edi + 4]
push 0xf4
push eax
lea ecx, [esp + 0x18]
push ecx
push ebx
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], eax
call esi
add esp, 0x10
test al, al
jne 0x39f7270
test ebp, ebp
je 0x39f7147
mov edx, dword [0x3a56b80]
push edx
push str._Unable_to_read_NT_headers__
jmp 0x39f7140
mov eax, 0x2000
test word [edi + 0x16], ax
je 0x39f72a8
mov ecx, dword [esp + 0x18]
movzx eax, word [ecx]
cmp eax, 0x14c
je 0x39f729e
xor edx, edx
cmp eax, 0x8664
setne dl
dec edx
and edx, 6
mov eax, edx
jmp 0x39f7376
mov eax, 5
jmp 0x39f7376
mov eax, dword [esp + 0x18]
movzx eax, word [eax]
cmp eax, 0x14c
je 0x39f72cb
xor ecx, ecx
cmp eax, 0x8664
setne cl
dec ecx
and ecx, 4
mov eax, ecx
jmp 0x39f7376
mov eax, 3
jmp 0x39f7376
mov edx, dword [esp + 0x18]
push edx
call fcn.039f77f0
mov esi, eax
push str..com
push esi
call fcn.03a012f2
add esp, 8
test eax, eax
jne 0x39f7310
test ebp, ebp
je 0x39f7309
mov eax, dword [0x3a56b80]
push eax
push str._no_valid_DOS_header__.com_extension_
mov ecx, ebp
call fcn.039efdd0
mov eax, 1
jmp 0x39f7376
push str..bat
push esi
call fcn.03a012f2
add esp, 8
test eax, eax
je 0x39f735a
push str..cmd
push esi
call fcn.03a012f2
add esp, 8
test eax, eax
je 0x39f735a
test ebp, ebp
je 0x39f734b
mov ecx, dword [0x3a56b80]
push ecx
push str._no_valid_DOS_header_found__
mov ecx, ebp
call fcn.039efdd0
push 0xc1
call dword [0x3a5fde0]
xor eax, eax
jmp 0x39f7376
test ebp, ebp
je 0x39f7371
mov edx, dword [0x3a56b80]
push edx
push str._no_valid_DOS_header__.bat_or_.cmd_extension_
mov ecx, ebp
call fcn.039efdd0
mov eax, 7
mov ecx, dword [esp + 0x194]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.03a00f6a
add esp, 0x188
ret