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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x45e274]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
push esi
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x88], edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x42ada6
mov eax, 0x1000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042f25f
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x3c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x42adcb
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0042f25f
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea edx, [ebp - 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x5c]
push ecx
call edi
lea edx, [ebp - 0x80]
push edx
lea eax, [ebp - 0x4c]
push eax
call edi
mov eax, dword [ebp - 0x78]
sub eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x74]
sbb ecx, dword [ebp - 0x7c]
sub dword [ebp - 0x28], eax
sbb dword [ebp - 0x24], ecx
sub dword [ebp - 0x30], eax
sbb dword [ebp - 0x2c], ecx
sub dword [ebp - 0x38], eax
sbb dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x3c]
mov eax, ecx
xor edi, edi
and eax, 1
je 0x42ae2d
mov dword [ebp - 0x60], 1
mov edi, dword [ebp - 0x60]
test cl, 2
je 0x42ae35
or edi, 2
test cl, 4
je 0x42ae3d
or edi, 4
mov edx, ecx
and edx, 0x10
je 0x42ae47
or edi, 0x10
test cl, 0x20
je 0x42ae4f
or edi, 0x20
test edx, edx
je 0x42ae5b
or edi, 0x40000000
jmp 0x42ae61
or edi, 0x80000000
or edi, 0x1000000
mov dword [ebp - 0x60], edi
test eax, eax
jne 0x42ae77
or edi, 0x800000
mov dword [ebp - 0x60], edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x6c], eax
cmp eax, 0x28
jbe 0x42af21
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 - 0x70]
push ecx
push 2
lea edx, [ebp - 0x64]
push edx
push esi
call ebx
push 0
push 0
push 0x24
push esi
call edi
push 0
lea eax, [ebp - 0x70]
push eax
push 4
lea ecx, [ebp - 0x7c]
push ecx
push esi
call ebx
mov edx, 0x54ad
cmp word [ebp - 0x64], dx
jne 0x42af1b
mov eax, dword [ebp - 0x7c]
lea ecx, [eax + 0x34]
cmp dword [ebp - 0x6c], ecx
jbe 0x42af1b
push 0
push 0
push eax
push esi
call edi
push 0
lea edx, [ebp - 0x70]
push edx
push 4
lea eax, [ebp - 0x74]
push eax
push esi
call ebx
mov eax, dword [ebp - 0x74]
cmp eax, 0x5a4d
je 0x42af14
cmp eax, 0x454e
je 0x42af14
cmp eax, 0x454c
je 0x42af14
cmp eax, 0x4550
jne 0x42af1b
or dword [ebp - 0x60], 0x400000
mov ebx, dword [ebp - 0x68]
mov edi, dword [ebp - 0x60]
mov eax, dword [ebp - 0x84]
test eax, eax
je 0x42af2d
mov dword [eax], edi
mov eax, dword [ebp - 0x8c]
test eax, eax
je 0x42af3c
mov ecx, dword [ebp - 0x6c]
mov dword [eax], ecx
test ebx, ebx
je 0x42af72
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
push edx
push eax
call fcn.0042aca0
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
push ecx
push edx
mov dword [ebx], eax
call fcn.0042aca0
mov ecx, dword [ebp - 0x38]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x34]
push eax
push ecx
call fcn.0042aca0
add esp, 0x18
mov dword [ebx + 8], eax
mov esi, dword [ebp - 0x88]
test esi, esi
je 0x42af9d
lea edx, [ebp - 0x60]
push edx
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx edx, word [ebp - 0x64]
movzx eax, word [ebp - 0x60]
shl edx, 0x10
or edx, eax
mov dword [esi], edx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0042f25f
mov esp, ebp
pop ebp
ret