Function at 0x1010d60
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 0x1010dce
cmp dword [rsp + 0x44], 1
je 0x1010e37
cmp dword [rsp + 0x44], 2
je 0x1010eba
cmp dword [rsp + 0x44], 3
je 0x1010ef0
cmp dword [rsp + 0x44], 4
je 0x1010f55
jmp 0x1011012
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 0x1010e32
mov dx, 0x5c
mov rcx, qword [rsp + 0x88]
call fcn.01011160
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x1010e32
mov rax, qword [rsp + 0x38]
mov word [rax], 0
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
jmp 0x1011012
lea rdx, [rsp + 0x20]
mov rcx, qword [rsp + 0x88]
call sub.instapi10.dll_GetSQLToolsDirPath
cmp eax, 1
jne 0x1010eb5
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov qword [rsp + 0x48], rax
mov rcx, qword [0x01065220]
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 0x1010eb5
mov eax, dword [rsp + 0x90]
mov r8, qword [0x01065220]
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call fcn.01015e90
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
jmp 0x1011012
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 0x1010eeb
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
jmp 0x1011012
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 0x1010f50
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 0x1010f50
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
jmp 0x1011012
lea rdx, [rsp + 0x20]
mov rcx, qword [rsp + 0x88]
call sub.instapi10.dll_GetSQLToolsDirPath
cmp eax, 1
jne 0x1011012
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.MSVCR80.dll_wcslen]
mov qword [rsp + 0x58], rax
mov rcx, qword [0x01065220]
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 [0x01065218]
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 0x1011012
mov eax, dword [rsp + 0x90]
mov r8, qword [0x01065220]
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call fcn.01015e90
mov eax, dword [rsp + 0x90]
mov r8, qword [0x01065218]
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call fcn.01015e90
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
add rsp, 0x78
ret