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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
push 0
push dword [ebx + 0x110]
call sub.KERNEL32.dll_GetFileSize
mov esi, eax
mov eax, dword [ebx + 0x115]
imul dword [ebp + 0xc]
cmp dword [ebx + 0x108], 0
je 0x40f0be
mov edx, dword [ebx + 0x100]
mov byte [edx], 0
cmp dword [ebp + 0xc], 0
je 0x40f0cc
cmp esi, eax
jbe 0x40f0cc
test eax, eax
jne 0x40f0d3
xor eax, eax
jmp 0x40f30b
cmp dword [ebp + 0x10], 0
jne 0x40f17f
cmp dword [ebx + 0x108], 0
jne 0x40f10a
push 0xfa00
call fcn.0041e63c
pop ecx
mov dword [ebx + 0x100], eax
mov edx, dword [ebx + 0x100]
mov byte [edx], 0
mov dword [ebx + 0x108], 0xfa00
cmp byte [ebx + 0x114], 0xe5
jne 0x40f117
mov esi, edi
jmp 0x40f125
push dword [ebp + 0xc]
push ebx
call fcn.0040ef12
add esp, 8
mov esi, eax
test esi, esi
jne 0x40f139
mov eax, dword [ebx + 0x100]
mov byte [eax], 0
xor eax, eax
jmp 0x40f30b
cmp esi, dword [ebx + 0x108]
jbe 0x40f174
push dword [ebx + 0x100]
call fcn.0041e5e4
pop ecx
mov edx, esi
add edx, edx
mov dword [ebx + 0x108], edx
mov ecx, esi
add ecx, ecx
add ecx, 0x14
push ecx
call fcn.0041e63c
pop ecx
mov dword [ebx + 0x100], eax
mov eax, dword [ebx + 0x100]
mov byte [eax], 0
mov edx, dword [ebx + 0x100]
mov dword [ebp + 0x10], edx
jmp 0x40f18a
cmp byte [ebx + 0x114], 0xe5
jne 0x40f18a
mov esi, edi
push 0
push 0
mov eax, dword [ebx + 0x115]
imul dword [ebp + 0xc]
cdq
push edx
push eax
push dword [ebx + 0x110]
call fcn.00401165
add esp, 0x14
mov edi, dword [ebp + 0x10]
xor eax, eax
mov dword [ebp - 8], eax
cmp byte [ebx + 0x114], 0xe5
jne 0x40f1dc
push 0
lea edx, [ebp - 4]
push edx
push esi
push dword [ebp + 0x10]
push dword [ebx + 0x110]
call sub.KERNEL32.dll_ReadFile
mov ecx, dword [ebp + 0x10]
mov byte [ecx + esi], 0
mov eax, esi
jmp 0x40f30b
cmp byte [ebx + 0x114], 0x30
je 0x40f21d
cmp byte [ebx + 0x114], 0x31
je 0x40f21d
cmp byte [ebx + 0x114], 0x32
je 0x40f21d
cmp byte [ebx + 0x114], 0xf5
je 0x40f21d
cmp byte [ebx + 0x114], 0x8b
je 0x40f21d
xor edx, edx
mov dl, byte [ebx + 0x114]
and edx, 7
cmp edx, 4
jne 0x40f2b3
push 0
lea ecx, [ebp - 4]
push ecx
push 8
lea eax, [ebp - 0x10]
push eax
push dword [ebx + 0x110]
call sub.KERNEL32.dll_ReadFile
cmp byte [ebx + 0x114], 0x30
je 0x40f258
cmp byte [ebx + 0x114], 0x31
je 0x40f258
cmp byte [ebx + 0x114], 0x32
je 0x40f258
cmp byte [ebx + 0x114], 0xf5
jne 0x40f265
lea edx, [ebp - 0xc]
push edx
call fcn.0040eaad
pop ecx
mov dword [ebp - 0xc], eax
cmp byte [ebx + 0x114], 0x8b
je 0x40f27e
xor ecx, ecx
mov cl, byte [ebx + 0x114]
and ecx, 7
cmp ecx, 4
jne 0x40f28b
cmp dword [ebp - 0x10], 0x8ffff
jne 0x40f28b
sub dword [ebp - 0xc], 8
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push dword [ebp + 0x10]
push dword [ebx + 0x110]
call sub.KERNEL32.dll_ReadFile
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0xc]
mov byte [edx + ecx], 0
mov eax, dword [ebp - 0xc]
jmp 0x40f30b
xor esi, esi
push 0
lea eax, [ebp - 4]
push eax
push dword [ebx + 0x115]
push edi
push dword [ebx + 0x110]
call sub.KERNEL32.dll_ReadFile
jmp 0x40f2d3
inc esi
inc dword [ebp - 8]
cmp esi, 0x200
jge 0x40f2e4
movsx edx, byte [edi + esi]
cmp edx, 0x1a
jne 0x40f2cf
movsx ecx, byte [edi + esi]
cmp ecx, 0x1a
je 0x40f2f5
add edi, dword [ebx + 0x115]
jmp 0x40f2b3
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 8]
mov byte [eax + edx], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebx + 0x10c], ecx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret