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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1010e16b
mov eax, dword fs:[0]
push eax
sub esp, 0x63c
mov eax, dword [0x10160068]
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 [0x1016407c]
cmp eax, 5
jne 0x100043cc
cmp dword [0x1016406c], 1
jne 0x1000450e
mov eax, 0x50
lea ecx, [eax + 4]
jmp 0x10004440
cmp eax, 6
jne 0x100043fd
mov eax, dword [0x1016406c]
sub eax, 1
je 0x100043f3
sub eax, 1
je 0x100043e9
sub eax, 1
jne 0x1000450e
mov eax, 0x70
lea ecx, [eax + 4]
jmp 0x10004440
mov eax, 0x6c
lea ecx, [eax + 4]
jmp 0x10004440
cmp eax, 0xa
jne 0x1000450e
cmp dword [0x1016406c], 0
jne 0x1000450e
mov eax, dword [0x10164078]
cmp eax, 0x55f0
jae 0x10004429
mov eax, 0x78
lea ecx, [eax + 4]
jmp 0x10004440
je 0x10004436
cmp eax, 0x585d
jne 0x1000450e
mov eax, 0xd8
mov ecx, 0xe0
cmp dword [esi + ecx], 1
mov edx, dword [esi + eax]
mov dword [ebp - 0x630], edx
jne 0x1000450e
mov esi, dword [esi + eax - 4]
push 0x20a
call fcn.100cf0d6
push 0x20a
mov edi, eax
push 0
push edi
call fcn.100e7700
add esp, 0x10
test esi, esi
je 0x100044b1
push edi
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x1000452d
mov ecx, edi
xor eax, eax
mov word [edi + 0x208], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004495
sub ecx, edx
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x62c]
push edi
call fcn.1000b730
mov esi, dword [ebp - 0x630]
push 0x20a
push 0
push edi
mov esi, dword [esi]
call fcn.100e7700
add esp, 0xc
push edi
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
jne 0x1000458d
lea edx, [edi + 4]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100044e1
sub ecx, esi
mov esi, dword [ebp - 0x62c]
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.1000b730
cmp dword [esi + 0x10], 0
push edi
ja 0x10004579
call fcn.100ceb35
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.100ceb24
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x12c]
call fcn.10085aa0
cmp dword [ebp - 0x128], 0xa
jb 0x100044b1
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 0x10004550
sub ecx, esi
mov esi, dword [ebp - 0x62c]
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.1000b730
cmp dword [esi + 0x10], 0
jbe 0x100044b1
push edi
call fcn.100ceb35
add esp, 4
mov ecx, ebx
push esi
call fcn.1000b220
xor eax, eax
jmp 0x10004511
mov edx, dword [ebp - 0x62c]
xor eax, eax
mov word [edi + 0x208], ax
mov ecx, edi
cmp dword [edx + 0x10], eax
jne 0x100045b3
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100045a6
jmp 0x100045eb
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100045b6
sub ecx, esi
sar ecx, 1
je 0x100045da
dec ecx
cmp word [edi + ecx*2], 0x5c
lea eax, [edi + ecx*2]
je 0x10004775
test ecx, ecx
jne 0x100045c7
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100045e0
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, ebx
call fcn.1000b730
push edi
call fcn.100ceb35
add esp, 4
mov eax, ebx
cmp dword [ebx + 0x14], 8
jb 0x1000460b
mov eax, dword [ebx]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1000476e
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x10004624
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.100e7700
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 0x1000476e
test esi, esi
je 0x1000476e
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.100e7700
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 0x10004680
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 0x100046e0
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100046c2
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.1000b730
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100e7700
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 0x10004700
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 0x1000476e
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004750
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.1000b730
xor eax, eax
jmp 0x10004511
test ecx, ecx
je 0x100045da
push eax
lea ecx, [ebp - 0x648]
call fcn.1000bfb0
add esp, 4
mov dword [ebp - 4], 0
mov ecx, ebx
push eax
call fcn.1000b290
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x634]
cmp edx, 8
jb 0x100047de
mov ecx, dword [ebp - 0x648]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100047d4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10004800
push edx
push ecx
call fcn.100cf0c8
add esp, 8
xor eax, eax
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x634], 7
mov word [ebp - 0x648], ax
jmp 0x100045f8
call fcn.100ecf9f
int3