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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
mov esi, ecx
xor edi, edi
cmp dword [esi + 0x34], 7
mov dword [ebp - 4], edi
jne 0x1071884
cmp dword [esi + 0x1708], 0xffffffff
jne 0x10716af
mov eax, dword [ebp + 8]
push edi
push eax
mov dword [esi + 0x1708], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x1704], eax
mov dword [esi + 0x1700], 1
cmp dword [esi + 0x170c], edi
jne 0x10716c8
push 0x800
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [esi + 0x170c], eax
cmp dword [esi + 0x170c], edi
push ebx
je 0x1071842
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
lea ebx, [esi + 0x1710]
cmp dword [ebx], 0
jne 0x1071755
mov eax, dword [esi + 0x170c]
push 0
push ebx
push 0x7fd
add eax, 3
push eax
push dword [esi + 0x1708]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10717fe
cmp dword [ebx], 0
je 0x10717fe
mov eax, dword [esi + 0x170c]
xor edi, edi
inc edi
cmp dword [esi + 0x1714], 0
je 0x1071732
mov byte [eax], 1
mov dword [ebp - 0x10], edi
jmp 0x1071735
mov byte [eax], 0
mov eax, dword [esi + 0x170c]
mov cl, byte [ebx]
mov byte [eax + 1], cl
mov eax, dword [ebx]
mov ecx, dword [esi + 0x170c]
shr eax, 8
mov byte [ecx + 2], al
add dword [esi + 0x1704], 3
mov eax, dword [ebx]
push 0
push dword [esi + 0x170c]
add eax, 3
push eax
mov ecx, esi
call fcn.0106ee40
test eax, eax
je 0x107177b
sub dword [esi + 0x1704], eax
mov ecx, eax
mov dword [ebp - 8], ecx
jmp 0x107177e
mov ecx, dword [ebp - 8]
mov eax, dword [esi + 0x668]
cmp eax, 0x2733
jne 0x1071798
and dword [ebp - 4], 0
mov dword [ebp - 0xc], 1
jmp 0x10717a9
test eax, eax
je 0x10717a3
mov dword [ebp - 4], 0x80004005
cmp dword [ebp - 4], 0
jl 0x10717de
mov edx, dword [ebx]
lea eax, [edx + 3]
cmp ecx, eax
je 0x10717de
jae 0x10717e1
mov eax, dword [esi + 0x170c]
neg edi
sbb edi, edi
and edi, 3
sub edi, ecx
add edi, edx
push edi
add ecx, eax
push ecx
push eax
call dword [sym.imp.msvcrt.dll_memmove]
mov eax, dword [ebp - 8]
sub dword [ebx], eax
add esp, 0xc
and dword [ebp - 4], 0
jmp 0x10717e1
and dword [ebx], 0
and dword [ebp - 8], 0
cmp dword [ebp - 0xc], 0
jne 0x10717fe
cmp dword [ebp - 4], 0
jl 0x107184b
cmp dword [ebp - 0x10], 0
jne 0x10717fe
xor edi, edi
jmp 0x10716e4
cmp dword [ebp - 4], 0
jl 0x107184b
cmp dword [esi + 0x1704], 0
jne 0x1071839
push dword [esi + 0x170c]
or dword [esi + 0x1708], 0xffffffff
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov edx, dword [esi]
xor eax, eax
pop ecx
push eax
mov ecx, esi
mov dword [esi + 0x170c], eax
mov dword [ebp - 4], eax
mov dword [esi + 0x1700], eax
call dword [edx + 0x50]
xor edi, edi
cmp dword [ebp - 4], edi
jge 0x1071883
jmp 0x107184d
mov dword [ebp - 4], 0x8007000e
jmp 0x107183b
xor edi, edi
push dword [esi + 0x170c]
or dword [esi + 0x1704], 0xffffffff
or dword [esi + 0x1708], 0xffffffff
mov dword [esi + 0x1710], edi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
cmp dword [ebp + 8], 0xffffffff
pop ecx
mov dword [esi + 0x170c], edi
jne 0x1071883
push dword [ebp - 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x50]
pop ebx
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 4