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

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
lea rbp, [rax - 0x3a8]
sub rsp, 0x490
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14027bbd0]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rsi, rcx
xor r8d, r8d
lea rdx, str.Tool_RemoveReg_CAPTShareModule
lea rcx, [rsp + 0x48]
call fcn.140017fc0
nop
call fcn.140054cb8
mov r12, qword [rax + 8]
xor edi, edi
mov qword [rsp + 0x40], rdi
mov word [rbp + 0x170], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x172]
call fcn.140192cb0
mov word [rsp + 0x60], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x62]
call fcn.140192cb0
call fcn.140051e58
mov r11, rax
mov ecx, edi
test rax, rax
setne cl
test ecx, ecx
jne 0x140024f20
mov ecx, 0x80004005
call fcn.140001010
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rdx, [0x1401c6ea8]
test rdx, 0xffffffffffff0000
jne 0x140024f63
movzx ebx, dx
mov ecx, ebx
call fcn.140051c2c
test rax, rax
je 0x140024f71
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140001b00
jmp 0x140024f71
xor r8d, r8d
lea rcx, [rsp + 0x30]
call fcn.140001c20
nop
mov r8, qword [r12 + 0x810]
lea rdx, str._sSMD.DLL
lea rcx, [rsp + 0x30]
call fcn.140007540
mov edx, 0x104
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rcx, [rsp + 0x60]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov rbx, qword [rsp + 0x30]
cmp dword [rbx - 8], 1
jle 0x140024fc2
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.1400015a0
mov rbx, qword [rsp + 0x30]
mov r9, rbx
lea r8, [rsp + 0x60]
lea rdx, [0x1401c9460]
lea rcx, [rbp + 0x170]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rbp + 0x170]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14002503c
mov r9d, 1
lea r8, str.return___08x
lea edx, [r9 + 1]
lea rcx, [rsp + 0x48]
call fcn.140017c80
nop
lea rdx, [rbx - 0x18]
or ebx, 0xffffffff
lock xadd dword [rdx + 0x10], ebx
dec ebx
test ebx, ebx
jg 0x140025028
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
nop
lea rcx, [rsp + 0x48]
call fcn.140018150
mov eax, 1
jmp 0x140025140
call fcn.140051e58
mov r11, rax
mov ecx, edi
test rax, rax
setne cl
test ecx, ecx
jne 0x14002505b
mov ecx, 0x80004005
call fcn.140001010
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
mov r9, qword [r12 + 0x810]
lea r8, str.SOFTWARECANON_
lea rdx, [0x1401c9460]
lea rcx, [rsp + 0x38]
call fcn.140007540
lea r11, [rsp + 0x40]
mov qword [rsp + 0x20], r11
mov r9d, 0x2011f
xor r8d, r8d
mov rbx, qword [rsp + 0x38]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400250cf
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, rbx
mov rcx, rsi
call fcn.14001b9a0
mov edi, eax
jmp 0x1400250de
cmp eax, 2
je 0x1400250d9
cmp eax, 3
jne 0x1400250de
mov edi, 1
mov r9d, edi
lea r8, str.return___08x
mov edx, 2
lea rcx, [rsp + 0x48]
call fcn.140017c80
nop
lea rdx, [rbx - 0x18]
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140025116
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
dec ebx
test ebx, ebx
jg 0x140025134
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x48]
call fcn.140018150
mov eax, edi
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1401945b0
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret