Function at 0x140031c60
Capabilities:
Get common file path
Print debug messages

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x958]
sub rsp, 0xa50
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
mov rax, qword [0x1400d6010]
xor rax, rsp
mov qword [rbp + 0x940], rax
xor eax, eax
mov qword [rsp + 0x48], rax
xor r14d, r14d
mov qword [rsp + 0x20], r14
lea r9, str.DebugLogFilePath
lea r8, str.General
lea rdx, [rsp + 0x48]
lea rcx, [0x1400db260]
call fcn.140004790
nop
mov rax, qword [rsp + 0x48]
or rdi, 0xffffffffffffffff
cmp dword [rax - 0x10], r14d
jne 0x140031f4a
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x60]
call fcn.140081670
call fcn.140004250
mov rcx, rax
test rax, rax
jne 0x140031d08
mov ecx, 0x80004005
call fcn.140003fc0
int3
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x40], rax
xor edx, edx
mov r8d, 0x7ce
lea rcx, [rbp + 0x170]
call fcn.140081670
mov r8d, 0x3e6
lea rdx, [rbp + 0x170]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
lea rcx, [rbp + 0x170]
mov rax, rdi
nop word [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140031d50
mov r8d, eax
lea rdx, [rbp + 0x170]
lea rcx, [rsp + 0x40]
call fcn.140003d30
mov rbx, qword [rsp + 0x40]
mov esi, dword [rbx - 0x10]
mov edx, 0x5c
mov rcx, rbx
call fcn.140080b98
test rax, rax
jne 0x140031d8c
mov eax, edi
jmp 0x140031d92
sub rax, rbx
sar rax, 1
sub esi, eax
lea r8d, [rsi - 1]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
call fcn.140009c60
nop
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.14000a0b0
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140031dd4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea r8, str..log
lea rdx, str..exe
lea rcx, [rsp + 0x40]
call fcn.140009d80
xor r9d, r9d
lea rdx, [rsp + 0x60]
xor ecx, ecx
cmp dword [0x1400db270], ecx
je 0x140031e50
lea r8d, [r9 + 0x24]
call qword [sym.imp.ext_ms_win_shell32_shellfolders_l1_1_0.dll_SHGetSpecialFolderPathW]
lea rcx, [rsp + 0x60]
mov rax, rdi
lea rax, [rax + 1]
cmp word [rcx + rax*2], 0
jne 0x140031e10
cmp word [rsp + rax*2 + 0x5e], 0x5c
jne 0x140031e41
lea rax, [rax*2 - 2]
cmp rax, 0x208
jae 0x140031e3b
mov word [rsp + rax + 0x60], r14w
jmp 0x140031e41
call fcn.140079768
int3
lea rcx, [rsp + 0x60]
call fcn.140019380
jmp 0x140031f12
cmp dword [0x1400db274], 0
je 0x140031ea5
mov r8d, SafeArrayCopy
call qword [sym.imp.ext_ms_win_shell32_shellfolders_l1_1_0.dll_SHGetSpecialFolderPathW]
lea rcx, [rsp + 0x60]
mov rax, rdi
nop dword [rax]
lea rax, [rax + 1]
cmp word [rcx + rax*2], 0
jne 0x140031e70
cmp word [rsp + rax*2 + 0x5e], 0x5c
jne 0x140031f12
lea rax, [rax*2 - 2]
cmp rax, 0x208
jae 0x140031e9f
mov word [rsp + rax + 0x60], r14w
jmp 0x140031f12
call fcn.140079768
int3
mov r8d, 0x10
call qword [sym.imp.ext_ms_win_shell32_shellfolders_l1_1_0.dll_SHGetSpecialFolderPathW]
lea rcx, [rsp + 0x60]
mov rax, rdi
nop dword [rax]
lea rax, [rax + 1]
cmp word [rcx + rax*2], 0
jne 0x140031ec0
cmp word [rsp + rax*2 + 0x5e], 0x5c
jne 0x140031ef1
lea rax, [rax*2 - 2]
cmp rax, 0x208
jae 0x140031eeb
mov word [rsp + rax + 0x60], r14w
jmp 0x140031ef1
call fcn.140079768
int3
cmp dword [0x1400db278], 0
je 0x140031f12
lea r8, str.RtkAudUService64_COMServer
lea rdx, str.RtkAudUService64
lea rcx, [rsp + 0x40]
call fcn.140009d80
mov rbx, qword [rsp + 0x40]
mov r9, rbx
lea r8, [rsp + 0x60]
lea rdx, [0x1400934b8]
lea rcx, [rsp + 0x48]
call fcn.1400054e0
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140031f4a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r8d, 0x20
lea rdx, str.atc
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfsopen]
mov qword [0x1400da6e0], rax
test rax, rax
jne 0x140031fde
call fcn.140004250
mov rcx, rax
test rax, rax
jne 0x140031f86
mov ecx, 0x80004005
call fcn.140003fc0
int3
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x50], rax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov r9d, eax
mov r8, qword [rsp + 0x48]
lea rdx, str.CDebugLog::OpenFile__s_Err_d
lea rcx, [rsp + 0x50]
call fcn.1400054e0
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140031ffc
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140031ffc
mov rdx, rax
lea rcx, str._nStart_Loging_n
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
mov rcx, qword [0x1400da6e0]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140032018
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp + 0x940]
xor rcx, rsp
call fcn.140078ef0
lea r11, [rsp + 0xa50]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret