Function at 0x10017c50
Capabilities:
Check if file exists
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x1001937e
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x10021138]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10021138]
xor eax, esp
push eax
lea eax, [esp + 0x238]
mov dword fs:[0], eax
mov esi, ecx
call fcn.10016fe0
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.100024e0
mov dword [esp + 0x240], 0
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
xor esi, esi
test eax, eax
je 0x1001816a
mov edx, dword [0x1002296c]
mov eax, dword [edx + 0xc]
mov ecx, 0x1002296c
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x240], 1
mov edx, dword [0x1002296c]
mov eax, dword [edx + 0xc]
mov ecx, 0x1002296c
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
mov byte [esp + 0x240], 2
cmp dword [ebp - 0xc], esi
jne 0x10017d95
mov eax, dword [esp + 0x1c]
cmp dword [eax - 0xc], esi
jl 0x10017d95
push 0x1001d964
push eax
call fcn.10004b21
add esp, 8
test eax, eax
je 0x10017d95
mov ecx, dword [esp + 0x1c]
sub eax, ecx
sar eax, 1
cmp eax, 1
jne 0x10017d95
lea eax, [ecx - 0x10]
lea esi, [ebp - 0x10]
cmp eax, esi
je 0x10017d7d
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x10017d6c
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x10017d6c
call fcn.10002df0
mov ebp, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x10017d63
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x14], ebp
jmp 0x10017d7d
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x18]
call fcn.10002d00
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10017d95
lea esi, [esp + 0x14]
call fcn.100028b0
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x10017eab
push 0x20a
push eax
lea ecx, [esp + 0x32]
push ecx
mov word [esp + 0x34], ax
call fcn.10007f00
add esp, 0xc
push 0x104
lea edx, [esp + 0x2c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x28]
lea edi, [esp + 0x18]
call fcn.100025b0
mov esi, dword [esp + 0x18]
push 0x5c
push esi
call fcn.10004af1
add esp, 8
test eax, eax
je 0x10017e36
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x10017e36
add eax, 1
lea ecx, [esp + 0x20]
mov edx, edi
call fcn.100026a0
mov byte [esp + 0x240], 3
call fcn.10002b00
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10017e36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
cmp dword [ecx - 0xc], 0
je 0x10017eab
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x24]
push eax
lea ebx, [esp + 0x20]
call fcn.10002710
add esp, 8
lea edi, [esp + 0x14]
mov byte [esp + 0x240], 4
call fcn.10002b00
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10017e8f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10017eab
lea esi, [esp + 0x14]
call fcn.100028b0
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x10017fcb
lea esi, [esp + 0x18]
call fcn.100028b0
push 0x208
lea ecx, [esp + 0x2e]
push 0
push ecx
mov word [esp + 0x34], 0
call fcn.10007f00
add esp, 0xc
push 0x104
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10017ef1
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x28]
mov ebx, eax
push ecx
lea eax, [esp + 0x1c]
call fcn.10002d00
mov edx, dword [esp + 0x18]
cmp dword [edx - 0xc], 0
je 0x10017fcb
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
mov ebx, 0x1001d968
call fcn.100027d0
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x2c]
push ecx
mov ebx, eax
mov byte [esp + 0x250], 5
call fcn.10002710
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x240], 6
call fcn.10002b00
mov byte [esp + 0x240], 5
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10017f87
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10017faf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10017fcb
lea esi, [esp + 0x14]
call fcn.100028b0
mov ebp, dword [esp + 0x14]
cmp dword [ebp - 0xc], 0
jne 0x100180f8
lea esi, [esp + 0x18]
call fcn.100028b0
push 0x208
lea ecx, [esp + 0x2e]
push 0
push ecx
mov word [esp + 0x34], 0
call fcn.10007f00
add esp, 0xc
push 0x104
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10018010
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x28]
mov ebx, eax
push ecx
lea eax, [esp + 0x1c]
call fcn.10002d00
cmp dword [ebp - 0xc], 0
je 0x100180f8
mov edx, dword [esp + 0x18]
cmp dword [edx - 0xc], 0
je 0x100180f4
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ebx, 0x1001d96c
call fcn.100027d0
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x30]
push ecx
mov ebx, eax
mov byte [esp + 0x250], 7
call fcn.10002710
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x240], 8
call fcn.10002b00
mov byte [esp + 0x240], 7
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x100180b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x240], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100180d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100180f4
lea esi, [esp + 0x14]
call fcn.100028b0
mov ebp, dword [esp + 0x14]
cmp dword [ebp - 0xc], 0
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
je 0x10018114
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10018114
push ebp
call edi
mov esi, eax
test esi, esi
jne 0x1001811d
mov ecx, dword [esp + 0x1c]
push ecx
call edi
mov esi, eax
add ebp, 0xfffffff0
mov byte [esp + 0x240], 1
lea edx, [ebp + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x10018142
mov ecx, dword [ebp]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebp
call eax
mov byte [esp + 0x240], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1001816a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x240], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10018195
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x238]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.10004387
add esp, 0x230
ret