Function at 0x4099f7
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
nop
mov eax, 0
push eax
mov eax, pe_nt_image_headers32
push eax
mov eax, 3
push eax
mov eax, 0
push eax
mov eax, 1
push eax
mov eax, 0x80000000
push eax
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp eax, 0xffffffff
jne 0x409a55
mov eax, 0x40e57a
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, 0xffffffff
jmp 0x409dde
mov eax, 0
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [ebp - 8], eax
mov eax, 0
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile
cmp eax, 0
je 0x409a9f
jmp 0x409abe
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffffff
jmp 0x409dde
mov eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax]
cmp ecx, 0x5a4d
je 0x409b03
mov eax, 0x40e590
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffffff
jmp 0x409dde
mov eax, dword [ebp - 0x18]
add eax, 0x3c
mov ecx, dword [eax]
mov eax, dword [ebp - 0x18]
add ecx, eax
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
cmp ecx, 0x4550
je 0x409b51
mov eax, 0x40e5a4
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffffff
jmp 0x409dde
mov eax, dword [ebp - 0x1c]
add eax, 0x18
add eax, 0x60
mov ecx, dword [eax]
cmp ecx, 0
je 0x409b6a
jmp 0x409b97
mov eax, 0x40e5b7
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffffff
jmp 0x409dde
mov eax, dword [ebp - 0x1c]
add eax, 0x18
add eax, 0x60
mov ecx, dword [eax]
push ecx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0040b731
add esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp eax, 0
jne 0x409beb
mov eax, str.This_PE_Doesnt_contain_an_ET_n
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffffff
jmp 0x409dde
mov eax, str.Export_Table:_n
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
add eax, ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
add eax, 0xc
mov ecx, dword [eax]
push ecx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0040b731
add esp, 8
mov ecx, dword [ebp - 8]
add eax, ecx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x20]
add eax, 0x1c
mov ecx, dword [eax]
push ecx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0040b731
add esp, 8
mov ecx, dword [ebp - 8]
add eax, ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
add eax, 0x20
mov ecx, dword [eax]
push ecx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0040b731
add esp, 8
mov ecx, dword [ebp - 8]
add eax, ecx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
add eax, 0x24
mov ecx, dword [eax]
push ecx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0040b731
add esp, 8
mov ecx, dword [ebp - 8]
add eax, ecx
mov dword [ebp - 0x2c], eax
mov eax, 0
mov word [ebp - 0x2e], ax
mov eax, dword [ebp - 0x20]
add eax, 0x14
movzx ecx, word [ebp - 0x2e]
mov edx, dword [eax]
cmp ecx, edx
jae 0x409dc4
jmp 0x409ca7
movzx eax, word [ebp - 0x2e]
mov ecx, eax
inc eax
mov word [ebp - 0x2e], ax
jmp 0x409c81
movzx eax, word [ebp - 0x2e]
shl eax, 2
mov ecx, dword [ebp - 0x24]
add ecx, eax
mov eax, dword [ecx]
cmp eax, 0
jne 0x409cc3
jmp 0x409c9a
mov eax, dword [ebp - 0x20]
add eax, 0x10
movzx ecx, word [ebp - 0x2e]
mov edx, dword [eax]
add ecx, edx
movzx eax, word [ebp - 0x2e]
shl eax, 2
mov edx, dword [ebp - 0x24]
add edx, eax
mov eax, dword [edx]
push eax
push ecx
mov eax, str._nOrd:__04X_nEP:__08X_n
push eax
call sub.msvcrt.dll_printf
add esp, 0xc
mov eax, 0
mov word [ebp - 0x30], ax
mov eax, dword [ebp - 0x20]
add eax, 0x18
movzx ecx, word [ebp - 0x30]
mov edx, dword [eax]
cmp ecx, edx
jae 0x409dbf
jmp 0x409d1e
movzx eax, word [ebp - 0x30]
mov ecx, eax
inc eax
mov word [ebp - 0x30], ax
jmp 0x409cf8
movzx eax, word [ebp - 0x30]
shl eax, 1
mov ecx, dword [ebp - 0x2c]
add ecx, eax
movzx eax, word [ecx]
movzx ecx, word [ebp - 0x2e]
cmp eax, ecx
jne 0x409dba
movzx eax, word [ebp - 0x30]
shl eax, 2
mov ecx, dword [ebp - 0x28]
add ecx, eax
mov eax, dword [ecx]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0040b731
add esp, 8
mov ecx, dword [ebp - 8]
add eax, ecx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
push eax
mov eax, str.Name:__s_n
push eax
call sub.msvcrt.dll_printf
add esp, 8
movzx eax, word [ebp - 0x2e]
shl eax, 2
mov ecx, dword [ebp - 0x24]
add ecx, eax
mov eax, dword [ecx]
push eax
mov eax, dword [ebp - 0x38]
push eax
mov eax, str._dfgdgdg__s___u_:__x_n
push eax
lea eax, [ebp - 0x100]
push eax
call sub.msvcrt.dll_sprintf
add esp, 0x10
lea eax, [ebp - 0x100]
push eax
mov eax, 0
push eax
mov eax, 0x180
push eax
mov eax, dword [0x4105c0]
push eax
call sub.user32.dll_SendMessageA
jmp 0x409dbf
jmp 0x409d11
jmp 0x409c9a
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0
leave
ret