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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x5a674c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push esi
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x58], edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x42375e
pop esi
mov eax, 0x1000000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525092
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x423782
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525092
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x38]
push edi
mov edx, eax
xor edi, edi
and edx, 1
je 0x423799
mov dword [ebp - 0x3c], 1
mov edi, dword [ebp - 0x3c]
test al, 2
je 0x4237a0
or edi, 2
test al, 4
je 0x4237a7
or edi, 4
mov ecx, eax
and ecx, 0x10
je 0x4237b1
or edi, 0x10
test al, 0x20
je 0x4237b8
or edi, 0x20
test ecx, ecx
je 0x4237c4
or edi, 0x40000000
jmp 0x4237ca
or edi, 0x80000000
or edi, 0x1000000
mov dword [ebp - 0x3c], edi
test edx, edx
jne 0x4237e0
or edi, 0x800000
mov dword [ebp - 0x3c], edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x48], eax
cmp eax, 0x28
jbe 0x42388a
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [ebp - 0x44]
push ecx
push 2
lea edx, [ebp - 0x40]
push edx
push esi
call ebx
push 0
push 0
push 0x24
push esi
call edi
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea ecx, [ebp - 0x50]
push ecx
push esi
call ebx
mov edx, 0x54ad
cmp word [ebp - 0x40], dx
jne 0x423884
mov eax, dword [ebp - 0x50]
lea ecx, [eax + 0x34]
cmp dword [ebp - 0x48], ecx
jbe 0x423884
push 0
push 0
push eax
push esi
call edi
push 0
lea edx, [ebp - 0x44]
push edx
push 4
lea eax, [ebp - 0x60]
push eax
push esi
call ebx
mov eax, dword [ebp - 0x60]
cmp eax, 0x5a4d
je 0x42387d
cmp eax, 0x454e
je 0x42387d
cmp eax, 0x454c
je 0x42387d
cmp eax, 0x4550
jne 0x423884
or dword [ebp - 0x3c], 0x400000
mov edi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x423893
mov dword [eax], edi
mov eax, dword [ebp - 0x54]
pop edi
test eax, eax
je 0x4238a0
mov ecx, dword [ebp - 0x48]
mov dword [eax], ecx
test ebx, ebx
je 0x4238df
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
push edx
push eax
call fcn.00423660
mov ecx, dword [ebp - 0x20]
mov dword [ebx + 4], edx
mov edx, dword [ebp - 0x24]
push ecx
push edx
mov dword [ebx], eax
call fcn.00423660
mov ecx, dword [ebp - 0x34]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x30]
push eax
push ecx
mov dword [ebx + 0xc], edx
call fcn.00423660
add esp, 0x18
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov esi, dword [ebp - 0x58]
test esi, esi
je 0x423907
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx edx, word [ebp - 0x40]
movzx eax, word [ebp - 0x3c]
shl edx, 0x10
or edx, eax
mov dword [esi], edx
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00525092
mov esp, ebp
pop ebp
ret