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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4507f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push ebx
push 0xc0000000
push eax
mov dword [ebp - 0xf8], ebx
mov dword [ebp - 0x104], ebx
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xfc], eax
cmp eax, 0xffffffff
jne 0x40c02d
mov dword [ebp - 0xf8], 0x8000ffff
jmp 0x40c0c6
push esi
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x40c1de
shr eax, 1
mov dword [ebp - 0x100], eax
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00410db5
mov esi, eax
add esp, 4
mov dword [ebp - 0x104], esi
test esi, esi
jne 0x40c07c
mov dword [ebp - 0xf8], 0x8007000e
jmp 0x40c0b7
mov ecx, dword [ebp - 0x100]
xor eax, eax
push eax
lea edx, [ebp - 0x10c]
push edx
push edi
mov word [esi + ecx*2], ax
mov eax, dword [ebp - 0xfc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c0fa
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x40c0ec
call esi
mov dword [ebp - 0xf8], eax
mov ecx, dword [ebp - 0xfc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov edx, dword [ebp - 0x104]
push edx
call fcn.00410dc5
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xf8]
add esp, 4
xor ecx, ebp
pop ebx
call fcn.00434067
mov esp, ebp
pop ebp
ret 8
call esi
and eax, 0xffff
or eax, 0x80070000
jmp 0x40c0b1
cmp edi, dword [ebp - 0x10c]
jne 0x40c1de
mov edx, dword [ebp - 0x100]
xor ecx, ecx
mov word [esi + edx*2], cx
mov dword [ebp - 0x108], esi
cmp dword [ebp + 0xc], ecx
je 0x40c190
mov ecx, 0x16
mov esi, 0x4078b0
lea edi, [ebp - 0xf4]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0xf4]
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x104]
push eax
push esi
call fcn.0043409b
add esp, 8
test eax, eax
je 0x40c1de
add eax, 0x58
mov ebx, eax
sub ebx, esi
sar ebx, 1
cmp word [eax], 0xd
mov dword [ebp - 0x108], eax
je 0x40c190
cmp ebx, dword [ebp - 0x100]
jae 0x40c1de
mov ecx, dword [ebp - 0xfc]
push 0x40790c
push 1
push ecx
mov eax, ebx
call fcn.0040c2f0
mov dword [ebp - 0xf8], eax
test eax, eax
js 0x40c0b7
inc ebx
mov ecx, dword [0x407918]
mov eax, dword [0x407914]
mov edx, dword [0x407910]
mov dword [ebp - 0xc], ecx
mov ecx, 0x20
mov esi, 0x407920
lea edi, [ebp - 0x98]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x104]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], edx
mov edx, dword [0x40791c]
push eax
push ecx
mov dword [ebp - 8], edx
movsw word es:[edi], word [esi]
call fcn.0043409b
add esp, 8
test eax, eax
jne 0x40c1ed
mov dword [ebp - 0xf8], 0x8000ffff
jmp 0x40c0b7
push 0x40
lea edx, [ebp - 0x98]
lea esi, [eax + 0xe]
push edx
push esi
call fcn.004341ad
add esp, 0xc
test eax, eax
je 0x40c27e
test ebx, ebx
je 0x40c23e
cmp ebx, dword [ebp - 0x100]
jae 0x40c1de
mov edi, dword [ebp - 0x108]
mov ecx, dword [ebp - 0xfc]
mov eax, esi
sub eax, edi
push edi
sar eax, 1
push eax
push ecx
mov eax, ebx
call fcn.0040c2f0
mov dword [ebp - 0xf8], eax
test eax, eax
js 0x40c0b7
jmp 0x40c244
mov edi, dword [ebp - 0x108]
mov edx, esi
sub edx, edi
sar edx, 1
add ebx, edx
cmp ebx, dword [ebp - 0x100]
jae 0x40c1de
mov ecx, dword [ebp - 0xfc]
lea eax, [ebp - 0x98]
push eax
push 0x40
push ecx
mov eax, ebx
call fcn.0040c2f0
mov dword [ebp - 0xf8], eax
test eax, eax
js 0x40c0b7
add ebx, 0x40
jmp 0x40c284
mov esi, dword [ebp - 0x108]
test ebx, ebx
je 0x40c2c9
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c290
sub eax, edx
sar eax, 1
cmp ebx, dword [ebp - 0x100]
jae 0x40c1de
mov edx, dword [ebp - 0xfc]
push esi
push eax
push edx
mov eax, ebx
call fcn.0040c2f0
mov dword [ebp - 0xf8], eax
test eax, eax
js 0x40c0b7
mov eax, dword [ebp - 0xfc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x104], 0
jmp 0x40c0c4