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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd88
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax], edx
push 0x104
lea eax, [ebp - 0x115]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA_1
test eax, eax
jbe 0x48f65f
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x115]
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x48f65f
xor edx, edx
push ebp
push 0x48f658
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetFileSize
mov edi, eax
cmp edi, 0xffffffff
jne 0x48f423
call fcn.00403fe4
jmp 0x48f65f
push 0
lea eax, [ebp - 0x10]
push eax
push 0x40
lea eax, [ebp - 0x155]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x48f4f0
cmp dword [ebp - 0x10], 0x40
jne 0x48f4f0
cmp word [ebp - 0x155], 0x5a4d
jne 0x48f4f0
cmp dword [ebp - 0x119], 0x40
jl 0x48f4f0
push 1
push 0
mov eax, dword [ebp - 0x119]
sub eax, 0x40
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer
cmp eax, 0xffffffff
je 0x48f4f0
push 0
lea eax, [ebp - 0x10]
push eax
push 0xf8
lea eax, [ebp - 0x24d]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x48f4f0
cmp dword [ebp - 0x10], 0xf8
jne 0x48f4f0
cmp dword [ebp - 0x24d], 0x4550
jne 0x48f4f0
cmp word [ebp - 0x247], 0
jbe 0x48f4f0
movzx eax, word [ebp - 0x239]
cmp eax, 0xe0
jb 0x48f4f0
push 1
push 0
movzx eax, word [ebp - 0x239]
sub eax, 0xe0
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer
cmp eax, 0xffffffff
jne 0x48f4fa
call fcn.00403fe4
jmp 0x48f65f
xor ebx, ebx
mov si, word [ebp - 0x247]
test si, si
jbe 0x48f54b
push 0
lea eax, [ebp - 0x10]
push eax
push 0x28
lea eax, [ebp - 0x275]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x48f52a
cmp dword [ebp - 0x10], 0x28
je 0x48f534
call fcn.00403fe4
jmp 0x48f65f
mov eax, dword [ebp - 0x261]
add eax, dword [ebp - 0x265]
cmp ebx, eax
jae 0x48f546
mov ebx, eax
dec si
jne 0x48f508
test ebx, ebx
ja 0x48f559
call fcn.00403fe4
jmp 0x48f65f
sub edi, ebx
mov dword [ebp - 8], edi
cmp dword [ebp - 8], 0
ja 0x48f56e
call fcn.00403fe4
jmp 0x48f65f
push 4
push 0x1000
mov eax, dword [ebp - 8]
inc eax
push eax
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov edx, dword [ebp - 4]
mov dword [edx], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x48f59d
xor eax, eax
mov dword [ebp - 8], eax
call fcn.00403fe4
jmp 0x48f65f
xor eax, eax
push ebp
push 0x48f619
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
push ebx
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer
cmp eax, 0xffffffff
je 0x48f5e3
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x48f5e3
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
je 0x48f603
push 0x8000
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_VirtualFree_1
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax], edx
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x48f60f
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov edx, dword [ebp - 8]
mov byte [eax + edx], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x48f641
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x48f65f
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
ret
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret