Function at 0x1004fc30
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 0x1004fc62
xor eax, eax
jmp 0x1004fe61
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 0x1004fc86
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x1004fe61
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 0x1004fcaa
jmp 0x1004fe3c
cmp dword [ebp - 0x14], 0xe
je 0x1004fcba
jmp 0x1004fe3c
movzx eax, word [ebp - 0x24]
cmp eax, 0x4d42
je 0x1004fccf
jmp 0x1004fe3c
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 0x1004fcf3
jmp 0x1004fe3c
cmp dword [ebp - 0x14], 0x28
je 0x1004fd03
jmp 0x1004fe3c
mov ecx, dword [ebp - 8]
cmp dword [ecx], 0xc
jne 0x1004fd15
jmp 0x1004fe3c
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x20]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x1004fd41
mov ecx, dword [ebp - 8]
movzx edx, word [ecx + 0xe]
cmp edx, 0x18
je 0x1004fd41
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 0x1004fd53
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 0x1004fd80
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 0x1004fdbd
jmp 0x1004fe46
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 0x1004fe16
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 0x1004fe3c
jmp 0x1004fe54
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 0x1004fe61
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