Function at 0x14003a6a4
Capabilities:
Get common file path

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x758]
sub rsp, 0x858
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x740], rax
mov r13, r8
xor r12d, r12d
lea rax, [rsp + 0x40]
mov rbx, r9
mov rdi, rdx
mov rsi, rcx
xor r8d, r8d
mov rdx, r13
mov r9d, 0x800
xor ecx, ecx
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], r12
call qword [sym.imp.KERNEL32.dll_SearchPathA]
movzx ecx, byte [rsp + 0x40]
mov r10, qword [rsi + 0xa8]
dec eax
cmp eax, 0x7ff
cmova ecx, r12d
or r14, 0xffffffffffffffff
mov byte [rsp + 0x40], cl
test r10, r10
je 0x14003a7c7
mov rcx, rsi
call fcn.140036f14
test eax, eax
je 0x14003a7c7
mov rax, qword [rsi + 0x88]
mov rcx, qword [rax + 0x38]
cmp qword [rcx + 0x80], r14
je 0x14003a76b
cmp dword [rcx + 0x88], 1
ja 0x14003a76b
cmp byte [0x14004961c], r12b
je 0x14003a7c7
mov r9, rbx
mov r8, r13
mov rdx, r10
call fcn.14003a2c0
test eax, eax
je 0x14003a787
mov eax, 1
jmp 0x14003a9f5
cmp byte [rsi + 0xb0], r12b
je 0x14003a7c7
mov rcx, qword [rsi + 0xa8]
mov edx, 0x5c
call qword [sym.imp.msvcrt.dll_strrchr]
mov r15, rax
test rax, rax
je 0x14003a7c7
mov byte [rax], r12b
mov rdx, qword [rsi + 0xa8]
mov r9, rbx
mov r8, r13
call fcn.14003a2c0
mov byte [r15], 0x5c
test eax, eax
jne 0x14003a77d
test rdi, rdi
je 0x14003a7d2
cmp qword [rdi + 0x38], r12
jne 0x14003a7ea
mov rcx, rsi
call fcn.140036f14
test eax, eax
je 0x14003a7e7
mov rdi, qword [rsi + 0x88]
jmp 0x14003a7ea
mov rdi, r12
test rdi, rdi
je 0x14003a976
mov r9, qword [0x140049430]
test r9, r9
je 0x14003a976
cmp qword [0x140049438], r12
je 0x14003a976
mov r10, qword [rsi + 0x88]
cmp rdi, r10
jne 0x14003a8ab
mov rcx, rsi
call fcn.140036f14
test eax, eax
je 0x14003a8ab
mov rax, qword [rdi + 0x38]
mov rcx, qword [rax + 0x80]
cmp rcx, r14
je 0x14003a976
lea rdx, [rsp + 0x30]
call r9
test eax, eax
je 0x14003a976
mov r9d, 0x800
xor r8d, r8d
mov rdx, r13
xor ecx, ecx
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_SearchPathA]
dec eax
cmp eax, 0x7ff
jbe 0x14003a87a
mov byte [rbx], r12b
mov rdx, qword [rsp + 0x30]
xor ecx, ecx
call qword [0x140049438]
cmp byte [rbx], r12b
je 0x14003a976
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__strcmpi]
test eax, eax
je 0x14003a976
jmp 0x14003a77d
mov rcx, rsi
xor r15d, r15d
call fcn.140036f14
test eax, eax
je 0x14003a8f7
cmp rdi, r10
je 0x14003a8f7
mov rdx, qword [r10 + 0x38]
mov rcx, qword [rdx + 0x80]
cmp rcx, r14
je 0x14003a8f7
mov rax, qword [rdi + 0x38]
cmp qword [rax + 0x80], r14
je 0x14003a8e5
cmp dword [rdx + 0x88], 1
jne 0x14003a8f7
lea rdx, [rsp + 0x30]
call r9
mov r9, qword [0x140049430]
mov r12d, eax
mov rcx, qword [rdi + 0x38]
mov rcx, qword [rcx + 0x80]
cmp rcx, r14
je 0x14003a912
lea rdx, [rsp + 0x38]
call r9
mov r15d, eax
test r12d, r12d
jne 0x14003a91c
test r15d, r15d
je 0x14003a973
and qword [rsp + 0x28], 0
mov r9d, 0x800
xor r8d, r8d
mov rdx, r13
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_SearchPathA]
dec eax
cmp eax, 0x7ff
jbe 0x14003a947
mov byte [rbx], 0
test r15d, r15d
je 0x14003a959
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [0x140049438]
test r12d, r12d
je 0x14003a96b
mov rdx, qword [rsp + 0x30]
xor ecx, ecx
call qword [0x140049438]
xor r12d, r12d
jmp 0x14003a887
xor r12d, r12d
mov r15d, 0x800
mov rcx, rbx
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x14003a991
cmp eax, r15d
jle 0x14003a9a3
lea rdx, [0x14000cb58]
mov r8d, r15d
mov rcx, rbx
call fcn.140027e84
mov edx, r15d
mov rcx, rbx
call fcn.140027fbc
lea rdx, [0x14000cb68]
mov r8d, r15d
mov rcx, rax
call fcn.140027ebc
inc r14
cmp byte [rbx + r14], r12b
jne 0x14003a9c0
lea rcx, [rsp + 0x40]
mov r8, r14
mov rdx, rbx
call qword [sym.imp.msvcrt.dll__strnicmp]
test eax, eax
jne 0x14003a9f3
lea rdx, [rsp + 0x40]
mov r8d, r15d
mov rcx, rbx
call fcn.140027e84
jmp 0x14003a77d
xor eax, eax
mov rcx, qword [rbp + 0x740]
xor rcx, rsp
call fcn.14003f730
add rsp, 0x858
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret