Function at 0x407ef9
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 - 0x28], eax
push 0x428
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x407f2b
xor eax, eax
jmp 0x408121
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x407f4f
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x408121
push 0
lea eax, [ebp - 4]
push eax
push 0xe
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407f6e
jmp 0x40811f
cmp dword [ebp - 4], 0xe
je 0x407f79
jmp 0x40811d
mov eax, dword [ebp - 0x14]
and eax, 0xffff
cmp eax, 0x4d42
je 0x407f8d
jmp 0x40811b
push 0
lea ecx, [ebp - 4]
push ecx
push 0x28
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407fac
jmp 0x408119
cmp dword [ebp - 4], 0x28
je 0x407fb7
jmp 0x408117
mov ecx, dword [ebp - 0x20]
cmp dword [ecx], 0xc
jne 0x407fc4
jmp 0x408115
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x20]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x407ff4
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dx, word [ecx + 0xe]
cmp edx, 8
jle 0x407ff4
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov cx, word [eax + 0xe]
mov edx, 1
shl edx, cl
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x20], 0
jne 0x408006
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov dword [ecx + 0x20], edx
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x14], 0
jne 0x408037
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dx, word [ecx + 0xe]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
imul ecx, edx
add ecx, 0x1f
and ecx, 0xffffffe0
shr ecx, 3
mov edx, dword [ebp - 0x20]
imul ecx, dword [edx + 8]
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x14], ecx
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 0
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x24]
lea edx, [eax + ecx*4]
mov eax, dword [ebp - 0x20]
add edx, dword [eax + 0x14]
push edx
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40806d
jmp 0x408113
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x20], eax
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0x24]
shl edx, 2
push edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
add ecx, dword [eax]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x24]
lea eax, [ecx + edx*4]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0xa], 0
je 0x4080c6
push 0
push 0
mov ecx, dword [ebp - 0xa]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4080ea
jmp 0x408111
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x408121
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x2c]
jmp 0x408121
jmp 0x408102
jmp 0x4080f4
jmp 0x4080ea
jmp 0x4080ea
jmp 0x4080ea
jmp 0x4080ea
jmp 0x4080ea
jmp 0x4080ea
mov esp, ebp
pop ebp
ret