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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x557200]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x7c], eax
mov edi, ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x84], eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x439422
mov eax, 0x1000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004b4f32
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x54]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x439447
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004b4f32
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x64]
push eax
call esi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x74]
push eax
call esi
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
sbb ecx, dword [ebp - 0x10]
sub dword [ebp - 0x40], eax
mov ebx, dword [ebp - 0x54]
mov esi, ebx
sbb dword [ebp - 0x3c], ecx
sub dword [ebp - 0x48], eax
sbb dword [ebp - 0x44], ecx
sub dword [ebp - 0x50], eax
mov eax, ebx
sbb dword [ebp - 0x4c], ecx
and esi, 1
mov ecx, esi
or ecx, 2
and al, 2
mov eax, ebx
cmove ecx, esi
mov edx, ecx
or edx, 4
and al, 4
cmove edx, ecx
mov ecx, ebx
and ecx, 0x10
mov eax, edx
or eax, 0x10
mov dword [ebp - 0x10], ecx
test ecx, ecx
cmove eax, edx
mov edx, 0x81000000
mov ecx, eax
or ecx, 0x20
and bl, 0x20
mov ebx, 0x41000000
cmove ecx, eax
mov eax, dword [ebp - 0x10]
test eax, eax
cmove ebx, edx
or ebx, ecx
test esi, esi
jne 0x4394f9
test eax, eax
mov ebx, 0x41800000
mov edx, 0x81800000
cmove ebx, edx
or ebx, ecx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0x28
jbe 0x4395a6
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [ebp - 0xc], ax
jne 0x4395a6
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + 0x34]
cmp esi, eax
jbe 0x4395a6
push 0
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x1c]
cmp eax, 0x5a4d
je 0x4395a0
cmp eax, 0x454e
je 0x4395a0
cmp eax, 0x454c
je 0x4395a0
cmp eax, 0x4550
jne 0x4395a6
or ebx, 0x400000
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x4395af
mov dword [eax], ebx
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x4395b8
mov dword [eax], esi
mov ebx, dword [ebp - 0x80]
test ebx, ebx
je 0x4395eb
push dword [ebp - 0x44]
push dword [ebp - 0x48]
call fcn.00439300
push dword [ebp - 0x3c]
mov dword [ebx], eax
push dword [ebp - 0x40]
call fcn.00439300
push dword [ebp - 0x4c]
mov dword [ebx + 4], eax
push dword [ebp - 0x50]
call fcn.00439300
add esp, 0x18
mov dword [ebx + 8], eax
mov esi, dword [ebp - 0x84]
test esi, esi
je 0x439616
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx ecx, word [ebp - 0xc]
movzx eax, word [ebp - 0x10]
shl ecx, 0x10
or ecx, eax
mov dword [esi], ecx
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b4f32
mov esp, ebp
pop ebp
ret