Function at 0x403727
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
cmp dword [ebp + 8], 0
jne 0x403787
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov edx, eax
mov eax, dword [section..bss]
mov dword [esp + 0x14], 0x40b0c8
mov dword [esp + 0x10], 0x40b0d1
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x1c5
mov dword [esp + 4], 0xbb9
mov dword [esp], eax
call fcn.00405dca
jmp 0x4039ad
mov eax, dword [ebp + 8]
movzx eax, word [eax]
test ax, ax
jne 0x4037d1
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov edx, eax
mov eax, dword [section..bss]
mov dword [esp + 0x14], 0x40b0c8
mov dword [esp + 0x10], 0x40b0d1
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x1cb
mov dword [esp + 4], 0xbb9
mov dword [esp], eax
call fcn.00405dca
jmp 0x4039ad
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
call eax
sub esp, 0x1c
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x403859
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov edx, eax
mov eax, dword [section..bss]
mov dword [esp + 0x14], 0x40b0c8
mov dword [esp + 0x10], 0x40b0d1
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x1d2
mov dword [esp + 4], 0xbb9
mov dword [esp], eax
call fcn.00405dca
jmp 0x4039ad
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp eax, 0xffffffff
jne 0x4038bb
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov edx, eax
mov eax, dword [section..bss]
mov dword [esp + 0x14], 0x40b0c8
mov dword [esp + 0x10], 0x40b0d1
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x1d9
mov dword [esp + 4], 0xbb9
mov dword [esp], eax
call fcn.00405dca
jmp 0x4039ad
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.00402588
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x403916
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov edx, eax
mov eax, dword [section..bss]
mov dword [esp + 0x14], 0x40b0c8
mov dword [esp + 0x10], 0x40b0d1
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x1e0
mov dword [esp + 4], 0xbb9
mov dword [esp], eax
call fcn.00405dca
jmp 0x4039ad
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x14]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
call eax
sub esp, 0x14
test eax, eax
jne 0x403999
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov edx, eax
mov eax, dword [section..bss]
mov dword [esp + 0x14], 0x40b0c8
mov dword [esp + 0x10], 0x40b0d1
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x1e6
mov dword [esp + 4], 0xbb9
mov dword [esp], eax
call fcn.00405dca
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004026f2
test eax, eax
je 0x4039a9
mov dword [ebp - 0x10], 0
jmp 0x4039a9
cmp dword [ebp + 0xc], 0
je 0x4039ac
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
jmp 0x4039ad
nop
jmp 0x4039ad
nop
cmp dword [ebp - 0xc], 0xffffffff
je 0x4039c3
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
leave
ret