Function at 0x1010ac0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x78
mov qword [rsp + 0x28], 0
mov eax, dword [rsp + 0x90]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
je 0x1010b2e
cmp dword [rsp + 0x44], 1
je 0x1010b97
cmp dword [rsp + 0x44], 2
je 0x1010c1a
cmp dword [rsp + 0x44], 3
je 0x1010c50
cmp dword [rsp + 0x44], 4
je 0x1010cb5
jmp 0x1010d72
mov eax, dword [rsp + 0x90]
xor edx, edx
mov ecx, 2
div rcx
mov r8d, eax
mov rdx, qword [rsp + 0x88]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x1010b92
mov dx, 0x5c
mov rcx, qword [rsp + 0x88]
call fcn.01010ec0
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x1010b92
mov rax, qword [rsp + 0x38]
mov word [rax], 0
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
jmp 0x1010d72
lea rdx, [rsp + 0x20]
mov rcx, qword [rsp + 0x88]
call sub.instapi10.dll_GetSQLToolsDirPath
cmp eax, 1
jne 0x1010c15
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov qword [rsp + 0x48], rax
mov rcx, qword [0x01064220]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
lea rax, [rax + rax + 2]
mov ecx, dword [rsp + 0x90]
cmp rax, rcx
ja 0x1010c15
mov eax, dword [rsp + 0x90]
mov r8, qword [0x01064220]
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call fcn.01015c70
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
jmp 0x1010d72
lea r9, [rsp + 0x90]
mov r8, qword [rsp + 0x88]
xor edx, edx
mov rcx, qword [rsp + 0x98]
call sub.instapi10.dll_GetSvcBinPathByInstName
cmp eax, 1
jne 0x1010c4b
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
jmp 0x1010d72
mov eax, dword [rsp + 0x90]
xor edx, edx
mov ecx, 2
div rcx
mov edx, eax
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x1010cb0
mov eax, dword [rsp + 0x40]
mov qword [rsp + 0x50], rax
mov ecx, dword [rsp + 0x90]
xor edx, edx
mov rax, rcx
mov ecx, 2
div rcx
mov rcx, qword [rsp + 0x50]
cmp rcx, rax
jae 0x1010cb0
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
jmp 0x1010d72
lea rdx, [rsp + 0x20]
mov rcx, qword [rsp + 0x88]
call sub.instapi10.dll_GetSQLToolsDirPath
cmp eax, 1
jne 0x1010d72
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov qword [rsp + 0x58], rax
mov rcx, qword [0x01064220]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov rcx, qword [0x01064218]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov rcx, qword [rsp + 0x60]
add rcx, rax
mov rax, rcx
lea rax, [rax + rax + 2]
mov ecx, dword [rsp + 0x90]
cmp rax, rcx
ja 0x1010d72
mov eax, dword [rsp + 0x90]
mov r8, qword [0x01064220]
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call fcn.01015c70
mov eax, dword [rsp + 0x90]
mov r8, qword [0x01064218]
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call fcn.01015c70
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
add rsp, 0x78
ret