Function at 0x14000d010
Capabilities:
Get common file path
Query or enumerate registry value
Set current directory

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x103c0]
mov eax, 0x104c0
call fcn.140018110
sub rsp, rax
mov rax, qword [0x14003ebd8]
xor rax, rsp
mov qword [rbp + 0x103b0], rax
mov rdi, rdx
mov rbx, rcx
mov edx, 0x20019
add rcx, 2
call fcn.14000db20
mov rsi, rax
test rax, rax
jne 0x14000d061
lea eax, [rsi + 1]
jmp 0x14000d851
lea rax, [rbx + 0x4042c]
mov qword [rsp + 0x10500], r13
test rdi, rdi
mov qword [rsp + 0x10508], r15
lea r9, [rbx + 0x40410]
mov qword [rsp + 0x20], rax
lea r8, str.AppEnvironment
mov rdx, rsi
lea rcx, [rbx + 2]
setne r13b
call fcn.14000c980
lea rax, [rbx + 0x40438]
mov rdx, rsi
lea r9, [rbx + 0x40430]
mov qword [rsp + 0x20], rax
lea r8, str.AppEnvironmentExtra
lea rcx, [rbx + 2]
call fcn.14000c980
test rdi, rdi
je 0x14000d0d1
mov rcx, rbx
call fcn.1400139e0
mov byte [rsp + 0x30], 1
lea r15, [rbx + 0x1842a]
mov r8, r15
mov byte [rsp + 0x28], 0
mov r9d, 0xfffe
mov byte [rsp + 0x20], r13b
lea rdx, [0x14002fb50]
mov rcx, rsi
call fcn.14000d870
mov rcx, rsi
test eax, eax
je 0x14000d116
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 3
jmp 0x14000d841
mov byte [rsp + 0x30], 1
lea r8, [rbx + 0x28428]
mov byte [rsp + 0x28], 0
lea rdx, str.AppParameters
mov r9d, 0x7ffe
mov byte [rsp + 0x20], r13b
mov qword [rsp + 0x104f8], r12
call fcn.14000d870
xor edi, edi
mov ecx, 2
test eax, eax
je 0x14000d184
mov qword [rsp + 0x28], rdi
lea r9, [rbx + 2]
lea r8, str.AppParameters
mov qword [rsp + 0x20], r15
mov edx, 0x80000405
call fcn.140002610
xor edx, edx
lea rcx, [rbx + 0x28428]
mov r8d, 0x7ffe
call fcn.140019470
mov byte [rsp + 0x30], 1
lea r12, [rbx + 0x30426]
mov r8, r12
mov byte [rsp + 0x28], 1
mov r9d, 0xffe6
mov byte [rsp + 0x20], r13b
lea rdx, str.AppDirectory
mov rcx, rsi
call fcn.14000d870
test eax, eax
jne 0x14000d1c1
cmp word [r12], di
jne 0x14000d267
lea r9, [0x14002ecd8]
mov qword [rsp + 0x20], r15
mov edx, 0x7ff3
mov r8, 0xffffffffffffffff
mov rcx, r12
call fcn.140001d80
mov rcx, r12
call fcn.14000a160
cmp word [r12], di
jne 0x14000d23c
mov edx, 0xffe6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
dec eax
cmp eax, 0xffe5
jbe 0x14000d23c
mov eax, 1
mov qword [rsp + 0x20], rdi
movzx ecx, ax
lea r9, [rbx + 2]
lea r8, str.AppDirectory
mov edx, 0xc0000407
call fcn.140002610
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 4
jmp 0x14000d839
mov r13d, 2
mov qword [rsp + 0x28], rdi
movzx ecx, r13w
lea r9, [rbx + 2]
lea r8, str.AppDirectory
mov qword [rsp + 0x20], r12
mov edx, 0x80000406
call fcn.140002610
jmp 0x14000d26d
mov r13d, 2
mov byte [rsp + 0x30], dil
lea r8, [rbp - 0x50]
mov byte [rsp + 0x28], dil
lea rdx, str.AppAffinity
mov r9d, 0x400
mov byte [rsp + 0x20], dil
mov rcx, rsi
call fcn.14000d870
test eax, eax
jne 0x14000d2c9
cmp word [rbp - 0x50], di
je 0x14000d2c9
lea rdx, [rbx + 0x40418]
lea rcx, [rbp - 0x50]
call fcn.14000e970
test eax, eax
je 0x14000d30e
lea r9, [rbp - 0x50]
movzx ecx, r13w
lea r8, [rbx + 2]
mov edx, 0x8000042b
call fcn.140002610
mov qword [rbx + 0x40418], rdi
xor r9d, r9d
lea r8, [rsp + 0x50]
lea rdx, str.AppPriority
mov rcx, rsi
call fcn.14000cf50
cmp eax, 1
jne 0x14000d3e8
call fcn.1400123a0
mov ecx, dword [rsp + 0x50]
and eax, ecx
cmp ecx, eax
jne 0x14000d3ca
mov dword [rbx + 0x4043c], ecx
jmp 0x14000d3e8
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x78]
lea rdx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetProcessAffinityMask]
test eax, eax
je 0x14000d2d0
mov rax, qword [rbx + 0x40418]
mov rcx, qword [rsp + 0x78]
mov r15, rax
and r15, rcx
cmp r15, rax
je 0x14000d2d0
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x70], rdi
call fcn.14000e520
test eax, eax
jne 0x14000d3af
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x68], rdi
mov rcx, r15
call fcn.14000e520
test eax, eax
jne 0x14000d399
mov rax, qword [rsp + 0x68]
lea r9, [rbp - 0x50]
mov qword [rsp + 0x30], rdi
lea r8, [rbx + 2]
mov qword [rsp + 0x28], rax
mov edx, 0x8000042c
mov rax, qword [rsp + 0x70]
movzx ecx, r13w
mov qword [rsp + 0x20], rax
call fcn.140002610
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x68]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x70]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14000d2d0
lea r9, str.AppPriority
movzx ecx, r13w
lea r8, [rbx + 2]
mov qword [rsp + 0x20], rdi
mov edx, 0x4000042a
call fcn.140002610
xor r9d, r9d
lea r8, [rsp + 0x48]
lea rdx, str.AppRedirectHook
mov rcx, rsi
call fcn.14000cf50
cmp eax, 1
jne 0x14000d413
cmp dword [rsp + 0x48], edi
setne al
mov byte [rbx + 0x704ac], al
jmp 0x14000d417
mov dword [rsp + 0x48], edi
xor r9d, r9d
lea r8, [rsp + 0x44]
lea rdx, str.AppRotateFiles
mov rcx, rsi
call fcn.14000cf50
cmp eax, 1
jne 0x14000d43c
cmp dword [rsp + 0x44], edi
setne al
jmp 0x14000d43e
xor al, al
xor r9d, r9d
mov byte [rbx + 0x704ad], al
lea r8, [rsp + 0x44]
mov rcx, rsi
lea rdx, str.AppRotateOnline
call fcn.14000cf50
cmp eax, 1
mov eax, edi
jne 0x14000d471
cmp dword [rsp + 0x44], eax
setne al
mov dword [rbx + 0x704b8], eax
jmp 0x14000d477
mov dword [rbx + 0x704b8], edi
xor r9d, r9d
mov dword [rbx + 0x704b4], eax
lea r8, [rsp + 0x54]
mov rcx, rsi
lea rdx, str.AppTimestampLog
call fcn.14000cf50
cmp eax, 1
jne 0x14000d4a8
cmp dword [rsp + 0x54], edi
setne al
mov byte [rbx + 0x704ae], al
jmp 0x14000d4b1
mov byte [rbx + 0x704ae], dil
xor al, al
mov edx, dword [rsp + 0x48]
cmp dword [rbx + 0x704b4], edi
jne 0x14000d4c9
test al, al
jne 0x14000d4c9
test edx, edx
jne 0x14000d4c9
xor cl, cl
jmp 0x14000d4cb
mov cl, 1
mov byte [rbx + 0x6045c], cl
cmp dword [rbx + 0x704b8], edi
jne 0x14000d4e1
test al, al
jne 0x14000d4e1
test edx, edx
je 0x14000d4e3
mov al, 1
xor r9d, r9d
mov byte [rbx + 0x70488], al
lea r8, [rbx + 0x704bc]
mov rcx, rsi
lea rdx, str.AppRotateSeconds
call fcn.14000cf50
cmp eax, 1
je 0x14000d50d
mov dword [rbx + 0x704bc], edi
xor r9d, r9d
lea r8, [rbx + 0x704c0]
lea rdx, str.AppRotateBytes
mov rcx, rsi
call fcn.14000cf50
cmp eax, 1
je 0x14000d531
mov dword [rbx + 0x704c0], edi
xor r9d, r9d
lea r8, [rbx + 0x704c4]
lea rdx, str.AppRotateBytesHigh
mov rcx, rsi
call fcn.14000cf50
cmp eax, 1
je 0x14000d555
mov dword [rbx + 0x704c4], edi
lea r9, [rbx + 0x704c8]
mov dword [rsp + 0x28], 0x8000040c
lea r8, str.AppRotateDelay
mov dword [rsp + 0x20], edi
mov rdx, rsi
lea rcx, [rbx + 2]
call fcn.14000dcc0
xor r9d, r9d
lea r8, [rbx + 0x40440]
lea rdx, str.AppNoConsole
mov rcx, rsi
call fcn.14000cf50
cmp eax, 1
je 0x14000d59f
mov dword [rbx + 0x40440], edi
lea rdx, [rbp + 0x3b0]
mov ecx, 0x7fff
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rdx, rsi
mov rcx, rbx
call fcn.14000cd80
test eax, eax
je 0x14000d602
mov eax, 1
lea r8, [rbx + 2]
movzx ecx, ax
xor r9d, r9d
mov edx, 0xc000041b
call fcn.140002610
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rbp + 0x3b0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, 5
jmp 0x14000d839
lea rcx, [rbp + 0x3b0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea r9, [rbx + 0x704d0]
mov dword [rsp + 0x28], 0x8000042f
lea r8, str.AppRestartDelay
mov dword [rsp + 0x20], edi
mov rdx, rsi
lea rcx, [rbx + 2]
call fcn.14000dcc0
lea r9, [rbx + 0x704d4]
mov dword [rsp + 0x28], 0x8000040c
lea r8, str.AppThrottle
mov dword [rsp + 0x20], 0x5dc
mov rdx, rsi
lea rcx, [rbx + 2]
call fcn.14000dcc0
lea rax, [rsp + 0x58]
mov dword [rsp + 0x4c], 4
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x4c]
lea rax, [rsp + 0x5c]
mov dword [rsp + 0x58], 4
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.AppStopMethodSkip
mov rcx, rsi
xor r15b, r15b
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x14000d704
cmp eax, 2
je 0x14000d707
cmp dword [rsp + 0x4c], 4
je 0x14000d6da
lea rax, str.NSSM
mov qword [rsp + 0x28], rdi
lea r9, str.AppStopMethodSkip
movzx ecx, r13w
lea r8, [rbx + 2]
mov qword [rsp + 0x20], rax
mov edx, 0x8000041c
call fcn.140002610
jmp 0x14000d707
mov ecx, eax
call fcn.140002510
mov r9, rax
mov qword [rsp + 0x20], rdi
mov eax, 1
lea r8, str.AppStopMethodSkip
movzx ecx, ax
mov edx, 0xc00003fa
call fcn.140002610
jmp 0x14000d707
mov r15b, 1
mov dword [rbx + 0x704d8], 0xffffffff
test r15b, r15b
je 0x14000d722
mov eax, dword [rsp + 0x5c]
not eax
mov dword [rbx + 0x704d8], eax
lea r9, [rbx + 0x704dc]
mov dword [rsp + 0x28], 0x80000420
lea r8, str.AppStopMethodConsole
mov dword [rsp + 0x20], 0x5dc
mov rdx, rsi
lea rcx, [rbx + 2]
call fcn.14000dcc0
lea r9, [rbx + 0x704e0]
mov dword [rsp + 0x28], 0x80000421
lea r8, str.AppStopMethodWindow
mov dword [rsp + 0x20], 0x5dc
mov rdx, rsi
lea rcx, [rbx + 2]
call fcn.14000dcc0
lea r9, [rbx + 0x704e4]
mov dword [rsp + 0x28], 0x80000422
lea r8, str.AppStopMethodThreads
mov dword [rsp + 0x20], 0x5dc
mov rdx, rsi
lea rcx, [rbx + 2]
call fcn.14000dcc0
xor r9d, r9d
lea r8, [rsp + 0x60]
lea rdx, str.AppKillProcessTree
mov rcx, rsi
call fcn.14000cf50
cmp eax, 1
jne 0x14000d7c5
cmp dword [rsp + 0x60], edi
setne al
jmp 0x14000d7c7
mov al, 1
mov byte [rbx + 0x704e8], al
lea r9, [rsp + 0x40]
lea r8, [rbp - 0x78]
mov dword [rbx + 0x704cc], edi
xor edx, edx
lea rcx, [rbx + 2]
call fcn.14000cb50
test eax, eax
jne 0x14000d82e
mov rax, qword [0x14003e058]
test rax, rax
je 0x14000d82e
mov r14, rdi
lea r15, [0x14003e058]
mov r8d, 0x10
lea rcx, [rbp - 0x78]
mov rdx, rax
call fcn.14001bedc
test eax, eax
je 0x14000d828
mov rax, qword [r15 + r14*8 + 8]
inc r14
inc edi
test rax, rax
jne 0x14000d801
jmp 0x14000d82e
mov dword [rbx + 0x704cc], edi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov r12, qword [rsp + 0x104f8]
mov r13, qword [rsp + 0x10500]
mov r15, qword [rsp + 0x10508]
mov rcx, qword [rbp + 0x103b0]
xor rcx, rsp
call fcn.1400180d0
add rsp, 0x104c0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret