Function at 0x107170a
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 0x1071924
cmp dword [esi + 0x1708], 0xffffffff
jne 0x107174f
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 0x1071768
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 0x10718e2
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
lea ebx, [esi + 0x1710]
cmp dword [ebx], 0
jne 0x10717f5
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 0x107189e
cmp dword [ebx], 0
je 0x107189e
mov eax, dword [esi + 0x170c]
xor edi, edi
inc edi
cmp dword [esi + 0x1714], 0
je 0x10717d2
mov byte [eax], 1
mov dword [ebp - 0x10], edi
jmp 0x10717d5
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.0106eee0
test eax, eax
je 0x107181b
sub dword [esi + 0x1704], eax
mov ecx, eax
mov dword [ebp - 8], ecx
jmp 0x107181e
mov ecx, dword [ebp - 8]
mov eax, dword [esi + 0x668]
cmp eax, 0x2733
jne 0x1071838
and dword [ebp - 4], 0
mov dword [ebp - 0xc], 1
jmp 0x1071849
test eax, eax
je 0x1071843
mov dword [ebp - 4], 0x80004005
cmp dword [ebp - 4], 0
jl 0x107187e
mov edx, dword [ebx]
lea eax, [edx + 3]
cmp ecx, eax
je 0x107187e
jae 0x1071881
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 0x1071881
and dword [ebx], 0
and dword [ebp - 8], 0
cmp dword [ebp - 0xc], 0
jne 0x107189e
cmp dword [ebp - 4], 0
jl 0x10718eb
cmp dword [ebp - 0x10], 0
jne 0x107189e
xor edi, edi
jmp 0x1071784
cmp dword [ebp - 4], 0
jl 0x10718eb
cmp dword [esi + 0x1704], 0
jne 0x10718d9
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 0x1071923
jmp 0x10718ed
mov dword [ebp - 4], 0x8007000e
jmp 0x10718db
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 0x1071923
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