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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2c], eax
push 0x428
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x1004fc72
xor eax, eax
jmp 0x1004fe71
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x1004fc96
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1004fe71
push 0
lea eax, [ebp - 0x14]
push eax
push 0xe
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1004fcba
jmp 0x1004fe4c
cmp dword [ebp - 0x14], 0xe
je 0x1004fcca
jmp 0x1004fe4c
movzx eax, word [ebp - 0x24]
cmp eax, 0x4d42
je 0x1004fcdf
jmp 0x1004fe4c
push 0
lea ecx, [ebp - 0x14]
push ecx
push 0x28
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1004fd03
jmp 0x1004fe4c
cmp dword [ebp - 0x14], 0x28
je 0x1004fd13
jmp 0x1004fe4c
mov ecx, dword [ebp - 8]
cmp dword [ecx], 0xc
jne 0x1004fd25
jmp 0x1004fe4c
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x20]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x1004fd51
mov ecx, dword [ebp - 8]
movzx edx, word [ecx + 0xe]
cmp edx, 0x18
je 0x1004fd51
mov eax, dword [ebp - 8]
movzx ecx, word [eax + 0xe]
mov edx, 1
shl edx, cl
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 8]
cmp dword [eax + 0x20], 0
jne 0x1004fd63
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x28]
mov dword [ecx + 0x20], edx
mov eax, dword [ebp - 8]
cmp dword [eax + 0x14], 0
jne 0x1004fd90
mov ecx, dword [ebp - 8]
movzx edx, word [ecx + 0xe]
mov eax, dword [ebp - 8]
imul edx, dword [eax + 4]
add edx, 0x1f
and edx, 0xffffffe0
shr edx, 3
mov ecx, dword [ebp - 8]
imul edx, dword [ecx + 8]
mov eax, dword [ebp - 8]
mov dword [eax + 0x14], edx
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 0
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x28]
lea edx, [eax + ecx*4]
mov eax, dword [ebp - 8]
add edx, dword [eax + 0x14]
push edx
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x1004fdcd
jmp 0x1004fe56
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 8], eax
push 0
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x28]
shl edx, 2
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
add ecx, dword [eax]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x28]
lea eax, [ecx + edx*4]
mov dword [ebp - 4], eax
cmp dword [ebp - 0x1a], 0
je 0x1004fe26
push 0
push 0
mov ecx, dword [ebp - 0x1a]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1004fe4c
jmp 0x1004fe64
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1004fe71
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret