Function at 0x10173410
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
push dword [ebp + 0xc]
mov edi, ecx
mov dword [ebp - 0x48], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x101734a1
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x10173687
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov ecx, ebx
push 0x10219d7c
mov dword [ebx], eax
call fcn.10004a70
test al, al
jne 0x1017346e
push 0
push 0x10219d7c
mov ecx, ebx
call fcn.10004050
mov edx, dword [ebp + 0xc]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10173673
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
pop edi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10212f74
mov esp, ebp
pop ebp
ret 8
xor eax, eax
push esi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x28]
push eax
push 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x10173624
cmp dword [ebp - 8], 0
je 0x10173624
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x10173687
mov eax, dword [ecx]
call dword [eax + 0xc]
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push dword [ebp + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x40], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
je 0x101735e2
push 0
lea ecx, [ebp - 0x44]
push ecx
push 0xc
lea ecx, [ebp - 0x34]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101735d9
push 0
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x101735d9
mov eax, dword [edi + 0x18]
cmp eax, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
je 0x10173562
cmp eax, dword [ebp - 8]
jae 0x101735d9
push eax
call fcn.10213535
push dword [ebp - 0x2c]
mov dword [ebp - 0x38], eax
push 0
push eax
call fcn.102134e7
add esp, 0x10
lea eax, [ebp - 0x44]
push 0
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101735ce
xor esi, esi
cmp dword [ebp - 0x2c], esi
jbe 0x101735c0
mov ebx, dword [ebp - 0x38]
lea esp, [esp]
cmp dword [edi + 0x14], 0x10
mov ecx, edi
jb 0x101735aa
mov ecx, dword [edi]
mov eax, esi
xor edx, edx
div dword [edi + 0x10]
mov al, byte [edx + ecx]
xor byte [esi + ebx], al
inc esi
cmp esi, dword [ebp - 0x2c]
jb 0x101735a0
mov ebx, dword [ebp - 0x48]
push dword [ebp - 0x38]
lea ecx, [ebp - 0x40]
call fcn.1005bb90
mov esi, dword [ebp - 0x40]
push dword [ebp - 0x38]
call fcn.10213517
add esp, 4
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi - 0x10]
push edi
call fcn.10004ba0
add eax, 0x10
or esi, 0xffffffff
mov dword [ebx], eax
add esp, 4
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1017360a
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x10173672
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10173672
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x10173687
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov ecx, ebx
push 0x10219d7c
mov dword [ebx], eax
call fcn.10004a70
test al, al
jne 0x10173657
push 0
push 0x10219d7c
mov ecx, ebx
call fcn.10004050
mov esi, dword [ebp + 0xc]
or eax, 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10173672
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
pop esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
xor ecx, ebp
pop ebx
call fcn.10212f74
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.100030c0
int3