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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [eax], esi
xor ebx, ebx
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
mov edi, 0x80070000
cmp eax, 0xffffffff
je 0x106f123
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x106f13f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x106f134
and eax, 0xffff
or eax, edi
mov ebx, eax
cmp ebx, esi
jl 0x106f13f
mov ebx, 0x80004005
cmp ebx, esi
mov byte [ebp + 0xb], 1
jl 0x106f443
push 2
pop esi
cmp dword [ebp - 0xc], esi
jbe 0x106f29e
push 0
lea eax, [ebp - 0x14]
push eax
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106f18e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f183
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f18e
mov ebx, 0x80004005
cmp dword [ebp - 0x14], esi
je 0x106f198
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f443
mov eax, 0xfeff
cmp word [ebp - 8], ax
jne 0x106f1b7
sub dword [ebp - 0xc], esi
mov byte [ebp + 0xb], 0
jmp 0x106f29e
cmp dword [ebp - 0xc], 3
jbe 0x106f268
mov ecx, esi
mov edi, 0x102ea78
lea esi, [ebp - 8]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x106f1d6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x106f268
xor esi, esi
push esi
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106f217
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x106f20c
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
cmp ebx, esi
jl 0x106f217
mov ebx, 0x80004005
cmp dword [ebp - 0x14], 1
je 0x106f222
mov ebx, 0x80004005
cmp ebx, esi
jl 0x106f443
cmp byte [ebp - 1], 0xbf
jne 0x106f23d
sub dword [ebp - 0xc], 3
mov dword [ebp + 0x14], 0xfde9
jmp 0x106f29e
push esi
push esi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x106f29e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x106f262
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
cmp ebx, esi
jmp 0x106f293
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x106f29e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f28f
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f443
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f443
cmp byte [ebp + 0xb], 0
je 0x106f3c8
mov esi, dword [ebp - 0xc]
lea eax, [esi + 1]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x106f2c9
mov ebx, 0x8007000e
test ebx, ebx
jl 0x106f443
push 0
lea ecx, [ebp + 8]
push ecx
push esi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106f309
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f2fa
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f3bd
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f3bd
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
push eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
push eax
push dword [ebp + 0x14]
call esi
mov edi, eax
cmp edi, 0x7ffffffe
ja 0x106f341
lea eax, [edi + 1]
push eax
call fcn.0106d444
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
jmp 0x106f347
mov eax, dword [ebp + 0xc]
and dword [eax], 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test eax, eax
jne 0x106f355
mov ebx, 0x8007000e
test ebx, ebx
jl 0x106f3bd
and dword [ebp - 8], 0
cmp dword [ebp + 8], 0
jbe 0x106f398
push edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
push 0
push dword [ebp + 0x14]
call esi
mov dword [ebp - 8], eax
test eax, eax
jne 0x106f398
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f38d
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f3b5
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f3b5
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
xor ecx, ecx
mov word [eax + edi*2], cx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x106f3bd
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
jmp 0x106f3bd
push dword [ebp + 0xc]
call fcn.0106d4ab
push dword [ebp - 0xc]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
jmp 0x106f443
mov eax, dword [ebp - 0xc]
shr eax, 1
inc eax
push eax
call fcn.0106d444
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
test eax, eax
jne 0x106f3e2
mov ebx, 0x8007000e
test ebx, ebx
jl 0x106f443
push 0
lea ecx, [ebp + 0xc]
push ecx
push dword [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x106f41c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x106f411
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
test ebx, ebx
jl 0x106f43d
mov ebx, 0x80004005
test ebx, ebx
jl 0x106f43d
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi]
shr eax, 1
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x106f443
mov ecx, dword [ebp + 0xc]
shr ecx, 1
mov dword [eax], ecx
jmp 0x106f443
push esi
call fcn.0106d4ab
cmp dword [ebp - 0x10], 0xffffffff
je 0x106f452
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x10