Function at 0x10117ba
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x14], edi
je 0x10119e3
cmp dword [ebp + 0xc], edi
je 0x10119e3
mov ecx, dword [0x102d9b4]
lea eax, [ecx + 7]
cdq
and edx, 7
add eax, edx
mov esi, eax
sar esi, 3
lea eax, [esi + 1]
cdq
sub eax, edx
mov ebx, eax
lea eax, [ebp - 4]
sar ebx, 1
push eax
add ebx, ebx
push ecx
mov dword [ebp - 0x10], ebx
call fcn.0100b348
test eax, eax
jl 0x10119e3
lea eax, [ebp - 0x14]
push eax
push dword [0x102d9b0]
call fcn.0100b348
test eax, eax
jl 0x10119e3
lea eax, [ebp - 4]
push eax
push 7
push dword [ebp - 4]
call fcn.0100b371
test eax, eax
jl 0x10119e3
shr dword [ebp - 4], 3
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
mul dword [ebp - 4]
push edx
push eax
call fcn.01011467
test eax, eax
jl 0x10119e3
lea eax, [ebp - 4]
push eax
push 4
push dword [ebp - 8]
mov dword [ebp - 4], edi
call fcn.0100b371
test eax, eax
jl 0x10119e3
mov eax, dword [ebp - 4]
mul dword [ebp + 8]
lea ecx, [ebp - 4]
push ecx
push edx
push eax
call fcn.01011467
test eax, eax
jl 0x10119e3
lea eax, [ebp - 4]
push eax
push 0x100
push dword [ebp - 4]
call fcn.0100b371
test eax, eax
jl 0x10119e3
lea eax, [ebp + 8]
push eax
push dword [ebp - 4]
call fcn.0101143b
test eax, eax
jl 0x10119e3
push edi
push edi
push dword [ebp + 8]
push dword [0x102c380]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp + 8]
jne 0x10119e3
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push dword [0x102c380]
call edi
test eax, eax
je 0x10119e3
cmp dword [ebp - 4], 4
jne 0x10119e3
lea eax, [ebp + 8]
push eax
push dword [ebp + 0x10]
call fcn.0100b348
test eax, eax
jl 0x10119e3
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 8]
mov dword [ebp + 8], ecx
cmp ecx, eax
jb 0x1011920
mov dword [ebp + 8], eax
cmp esi, ebx
je 0x10119f0
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
pop ecx
mov dword [ebp - 0xc], ebx
test ebx, ebx
je 0x10119e3
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push ebx
push dword [0x102c380]
call edi
test eax, eax
je 0x10119ed
mov eax, dword [ebp - 8]
cmp dword [ebp - 4], eax
jne 0x10119ed
mov eax, dword [ebp + 8]
xor edx, edx
div esi
push dword [ebp + 8]
mov edi, ebx
mov ebx, dword [ebp + 0xc]
push 0xff
push ebx
mov dword [ebp - 0x14], eax
call sub.msvcrt.dll_memset
and dword [ebp + 8], 0
add esp, 0xc
cmp dword [ebp - 0x14], 0
jle 0x10119cd
mov ecx, dword [ebp - 0x10]
mov eax, esi
sub eax, ebx
sub ecx, edi
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x18], ecx
jmp 0x10119a4
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x18]
add eax, ebx
cmp eax, dword [ebp + 0x10]
jg 0x10119d9
add ecx, edi
cmp ecx, dword [ebp - 8]
jg 0x10119d9
push esi
push edi
push ebx
call sub.msvcrt.dll_memcpy
add ebx, dword [ebp - 0x10]
add esp, 0xc
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
add edi, esi
cmp eax, dword [ebp - 0x14]
jl 0x101199e
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x1011a10
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0x10
push ebx
jmp 0x10119dc
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [0x102c380]
call edi
test eax, eax
je 0x10119e3
mov eax, dword [ebp + 8]
cmp dword [ebp - 4], eax
jne 0x10119e3
lea ecx, [ebp - 0x1a]
call fcn.01010f2b
mov ecx, dword [ebp + 0x14]
mov word [ecx], ax
xor eax, eax
jmp 0x10119e6