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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10118deb
mov eax, dword fs:[0]
push eax
sub esp, 0x63c
mov eax, dword [0x1016f070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov esi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x62c], eax
mov eax, dword [0x10173e6c]
cmp eax, 5
jne 0x100053ac
cmp dword [0x10173e5c], 1
jne 0x100054fd
mov eax, 0x50
lea ecx, [eax + 4]
jmp 0x10005427
cmp eax, 6
jne 0x100053dd
mov eax, dword [0x10173e5c]
sub eax, 1
je 0x100053d3
sub eax, 1
je 0x100053c9
sub eax, 1
jne 0x100054fd
mov eax, 0x70
lea ecx, [eax + 4]
jmp 0x10005427
mov eax, 0x6c
lea ecx, [eax + 4]
jmp 0x10005427
cmp eax, 0xa
jne 0x100054fd
cmp dword [0x10173e5c], 0
jne 0x100054fd
mov eax, dword [0x10173e68]
cmp eax, 0x55f0
jae 0x10005409
mov eax, 0x78
lea ecx, [eax + 4]
jmp 0x10005427
je 0x1000541d
cmp eax, 0x585d
je 0x1000541d
cmp eax, 0x5867
jne 0x100054fd
mov eax, 0xd8
mov ecx, 0xe0
cmp dword [esi + ecx], 1
mov edx, dword [esi + eax]
mov dword [ebp - 0x630], edx
jne 0x100054fd
mov esi, dword [esi + eax - 4]
push 0x20a
call fcn.100dabf9
push 0x20a
mov edi, eax
push 0
push edi
call fcn.100f2c30
add esp, 0x10
test esi, esi
je 0x1000549c
push edi
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x1000551c
mov ecx, edi
xor eax, eax
mov word [edi + 0x208], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10005480
sub ecx, edx
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x62c]
push edi
call fcn.10004bf0
mov esi, dword [ebp - 0x630]
push 0x20a
push 0
push edi
mov esi, dword [esi]
call fcn.100f2c30
add esp, 0xc
push edi
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
jne 0x1000557d
lea edx, [edi + 4]
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100054d0
sub ecx, esi
mov esi, dword [ebp - 0x62c]
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.10004bf0
cmp dword [esi + 0x10], 0
push edi
ja 0x10005569
call fcn.100da696
add esp, 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100da624
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x12c]
call fcn.10090d90
cmp dword [ebp - 0x128], 0xa
jb 0x1000549c
lea edx, [edi + 4]
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10005540
sub ecx, esi
mov esi, dword [ebp - 0x62c]
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.10004bf0
cmp dword [esi + 0x10], 0
jbe 0x1000549c
push edi
call fcn.100da696
add esp, 4
mov ecx, ebx
push esi
call fcn.1000c360
xor eax, eax
jmp 0x10005500
mov edx, dword [ebp - 0x62c]
xor eax, eax
mov word [edi + 0x208], ax
mov ecx, edi
cmp dword [edx + 0x10], eax
jne 0x100055a3
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10005596
jmp 0x100055db
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100055a6
sub ecx, esi
sar ecx, 1
je 0x100055ca
dec ecx
cmp word [edi + ecx*2], 0x5c
lea eax, [edi + ecx*2]
je 0x10005765
test ecx, ecx
jne 0x100055b7
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100055d0
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, ebx
call fcn.10004bf0
push edi
call fcn.100da696
add esp, 4
mov eax, ebx
cmp dword [ebx + 0x14], 8
jb 0x100055fb
mov eax, dword [ebx]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1000575e
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x10005614
mov eax, dword [ebx]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0x208
mov esi, eax
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.100f2c30
add esp, 0xc
lea eax, [ebp - 0x628]
push 0
push 2
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x1000575e
test esi, esi
je 0x1000575e
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.100f2c30
add esp, 0xc
xor ecx, ecx
nop
movzx eax, word [ebp + ecx - 0x628]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x422], ax
test ax, ax
jne 0x10005670
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x420]
push esi
push eax
call edi
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100056d0
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100056b2
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.10004bf0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100f2c30
add esp, 0xc
xor ecx, ecx
nop dword [eax + eax]
movzx eax, word [ebp + ecx - 0x628]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x21a], ax
test ax, ax
jne 0x100056f0
push str.AccessoriesSystem_Tools
lea eax, [ebp - 0x218]
push eax
call edi
push esi
lea eax, [ebp - 0x218]
push eax
call edi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1000575e
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10005740
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.10004bf0
xor eax, eax
jmp 0x10005500
test ecx, ecx
je 0x100055ca
push eax
lea ecx, [ebp - 0x648]
call fcn.1000cd30
add esp, 4
mov dword [ebp - 4], 0
mov ecx, ebx
push eax
call fcn.1000c390
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x634]
cmp edx, 8
jb 0x100057ce
mov ecx, dword [ebp - 0x648]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100057c4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100057f0
push edx
push ecx
call fcn.100da665
add esp, 8
xor eax, eax
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x634], 7
mov word [ebp - 0x648], ax
jmp 0x100055e8
call fcn.100f5ab9
int3