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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc54
mov eax, dword [0x1017484]
push ebx
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xc38], eax
mov dword [ebp - 0xc3c], edi
mov dword [ebp - 0xc44], ebx
mov esi, 0x104
jne 0x10073d8
push esi
lea eax, [ebp - 0x61c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x100769f
lea eax, [ebp - 0x61c]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
cmp eax, ebx
pop ecx
pop ecx
je 0x100769f
mov word [eax], bx
lea eax, [ebp - 0x61c]
mov dword [ebp - 0xc38], eax
push esi
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp eax, ebx
je 0x100769f
mov ebx, 0xc4
cmp eax, ebx
ja 0x100769f
lea eax, [ebp - 0x824]
push 0x1001e68
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push esi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x100769f
cmp eax, ebx
ja 0x100769f
cmp dword [ebp + 0x10], 0
mov ebx, dword [sym.imp.msvcrt.dll_wcscpy]
je 0x100744f
push edi
call fcn.010069ea
mov eax, dword [0x101702c]
mov dword [ebp - 0xc3c], eax
jmp 0x10074d5
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [ebp - 0x414]
push eax
call esi
pop ecx
push dword [ebp - 0xc3c]
mov edi, eax
call fcn.01006aa8
mov eax, dword [0x1017030]
mov dword [ebp - 0xc3c], eax
push edi
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0xc38]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x10074d5
mov eax, dword [ebp - 0xc38]
lea edi, [eax + edi*2]
push edi
call esi
cmp eax, 0x3f
pop ecx
jae 0x100769f
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0xa2c]
push eax
call ebx
lea eax, [ebp - 0xa2c]
push edi
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
lea eax, [ebp - 0xa2c]
add esp, 0x10
mov dword [ebp - 0xc38], eax
cmp dword [ebp - 0xc3c], 0xffffffff
je 0x1007697
mov esi, dword [sym.imp.msvcrt.dll_wcschr]
lea eax, [ebp - 0x414]
push 0
push eax
call esi
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0xc40], eax
mov edi, 0x1001890
je 0x100751b
push edi
push eax
call ebx
push 0
push dword [ebp - 0xc40]
call esi
add esp, 0x10
mov dword [ebp - 0xc40], eax
and word [ebp - 8], 0
push 0x102
push dword [ebp - 0xc38]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
and word [ebp - 8], 0
lea eax, [ebp - 0x20c]
push 0
push eax
call esi
add esp, 0x14
test eax, eax
mov dword [ebp - 0xc38], eax
je 0x1007692
push edi
push eax
call ebx
xor edi, edi
push edi
push dword [ebp - 0xc38]
call esi
add esp, 0x10
cmp eax, edi
mov dword [ebp - 0xc38], eax
je 0x1007692
cmp dword [ebp - 0xc40], edi
je 0x1007692
lea eax, [ebp - 0xc54]
push eax
push edi
push 0x1001e54
push dword [ebp - 0xc3c]
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
je 0x1007692
mov eax, dword [ebp - 0xc38]
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea ecx, [ebp - 0x20c]
sub eax, ecx
mov esi, 0x104
sar eax, 1
mov dword [ebp - 0xc3c], esi
sub dword [ebp - 0xc3c], eax
mov dword [ebp - 0xc44], 1
push 0
push dword [ebp - 0xc3c]
lea eax, [ebp - 0xc54]
push dword [ebp - 0xc38]
push 1
push eax
call edi
test eax, eax
je 0x100768b
push 0
push esi
lea eax, [ebp - 0xc34]
push eax
push 2
lea eax, [ebp - 0xc54]
push eax
call edi
test eax, eax
je 0x100762d
push 0x1001e44
lea eax, [ebp - 0xc34]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x1007673
lea eax, [ebp - 0x20c]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x1007673
mov eax, dword [ebp - 0xc40]
lea ecx, [ebp - 0x414]
sub eax, ecx
sar eax, 1
mov ecx, esi
sub ecx, eax
push ecx
push dword [ebp - 0xc38]
push dword [ebp - 0xc40]
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
call ebx
cmp eax, 0xffffffff
je 0x100768b
lea eax, [ebp - 0xc54]
push eax
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
jne 0x10075dd
jmp 0x1007692
and dword [ebp - 0xc44], 0
call fcn.01006a8a
mov eax, dword [ebp - 0xc44]
jmp 0x10076a1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01012bde
leave
ret 0xc