Function at 0x140046468
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xb0]
sub rsp, 0x1b0
mov rax, qword [0x1401e7e78]
xor rax, rsp
mov qword [rbp + 0xa0], rax
xor r13d, r13d
mov esi, edx
mov rdi, rcx
test rcx, rcx
je 0x140046ae8
lea rbx, [rcx + 0x58]
mov rcx, rbx
call fcn.140123914
test al, al
je 0x1400464d1
lea rdx, str.advapi32.dll
mov rcx, rbx
call fcn.14012396c
test rax, rax
je 0x140046ae8
mov r10, qword [0x14021c850]
test r10, r10
je 0x140046505
cmp qword [0x14021c858], r13
je 0x140046505
cmp qword [0x14021c860], r13
je 0x140046505
cmp qword [0x14021c868], r13
je 0x140046505
cmp qword [0x14021c870], r13
jne 0x14004665b
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004652b
lea rdx, [0x1401778d0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14021c850], rax
test rax, rax
je 0x140046532
mov eax, r13d
jmp 0x140046538
mov qword [0x14021c850], r13
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0xc], eax
cmp qword [0x14021c850], r13
je 0x140046ae8
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004656e
lea rdx, [0x1401778e0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14021c858], rax
test rax, rax
je 0x140046575
mov eax, r13d
jmp 0x14004657b
mov qword [0x14021c858], r13
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0xc], eax
cmp qword [0x14021c858], r13
je 0x140046ae8
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400465b1
lea rdx, [0x1401778f0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14021c860], rax
test rax, rax
je 0x1400465b8
mov eax, r13d
jmp 0x1400465be
mov qword [0x14021c860], r13
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0xc], eax
cmp qword [0x14021c860], r13
je 0x140046ae8
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400465f4
lea rdx, [0x140177908]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14021c868], rax
test rax, rax
je 0x1400465fb
mov eax, r13d
jmp 0x140046601
mov qword [0x14021c868], r13
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0xc], eax
cmp qword [0x14021c868], r13
je 0x140046ae8
mov rcx, qword [rbx]
test rcx, rcx
je 0x140046637
lea rdx, str.RegQueryInfoKeyW
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14021c870], rax
test rax, rax
je 0x14004663e
mov eax, r13d
jmp 0x140046644
mov qword [0x14021c870], r13
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0xc], eax
cmp qword [0x14021c870], r13
je 0x140046ae8
mov r10, qword [0x14021c850]
mov eax, 0x20019
mov qword [rsp + 0x68], r13
cmp esi, 1
mov dword [rsp + 0x70], r13d
lea rdx, str.SoftwareConEmu
lea ecx, [rax - 0x13]
cmove eax, ecx
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x40], rcx
xor r9d, r9d
lea rcx, [rsp + 0x68]
xor r8d, r8d
mov qword [rsp + 0x38], rcx
mov rcx, 0xffffffff80000001
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r13d
call r10
mov edx, eax
test eax, eax
jne 0x140046ae8
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140046ae8
test esi, esi
jne 0x14004673f
lea rax, [rsp + 0x78]
mov qword [rsp + 0x78], r13
mov qword [rsp + 0x58], rax
xor r9d, r9d
mov qword [rsp + 0x50], r13
xor r8d, r8d
mov qword [rsp + 0x48], r13
xor edx, edx
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
call qword [0x14021c870]
mov edx, eax
mov rax, qword [rsp + 0x78]
test edx, edx
jne 0x14004673b
cmp dword [rdi + 0x50], r13d
jne 0x14004671f
cmp dword [rdi + 0x4c], r13d
je 0x14004673b
cmp rax, qword [rdi + 0x4c]
jne 0x14004673b
mov rcx, qword [rsp + 0x68]
call qword [0x14021c858]
cmp dword [rdi], r13d
setne al
jmp 0x140046aea
mov qword [rdi + 0x4c], rax
mov qword [rbp - 0x78], rdi
mov r14d, 4
mov dword [rbp - 0x70], r14d
lea rax, str.DefTerm_Enabled
mov qword [rbp - 0x80], rax
lea rax, str.DefTerm_Agressive
mov qword [rbp - 0x68], rax
lea rax, [rdi + 4]
mov qword [rbp - 0x60], rax
lea rax, str.DefTerm_NoInjects
mov qword [rbp - 0x50], rax
lea rax, [rdi + 8]
mov qword [rbp - 0x48], rax
lea rax, str.DefTerm_NewWindow
mov qword [rbp - 0x38], rax
lea rax, [rdi + 0xc]
mov qword [rbp - 0x30], rax
lea rax, str.DefTerm_DebugLog
mov qword [rbp - 0x20], rax
lea rax, [rdi + 0x10]
mov qword [rbp - 0x18], rax
lea rax, str.DefTerm_Confirm
mov qword [rbp - 8], rax
lea rax, [rdi + 0x14]
mov qword [rbp], rax
lea rax, str.DefTerm_Flags
mov qword [rbp + 0x10], rax
lea rax, [rdi + 0x18]
mov qword [rbp + 0x18], rax
lea rax, str.DefTerm_ConEmuExe
mov qword [rbp + 0x28], rax
lea rax, [rdi + 0x20]
mov qword [rbp + 0x30], rax
lea rax, str.DefTerm_BaseDir
mov qword [rbp + 0x40], rax
lea rax, [rdi + 0x28]
mov qword [rbp + 0x48], rax
lea rax, str.DefTerm_CfgFile
mov qword [rbp + 0x58], rax
lea rax, [rdi + 0x30]
mov qword [rbp + 0x60], rax
lea rax, str.DefTerm_Config
mov qword [rbp + 0x70], rax
lea rax, [rdi + 0x38]
mov qword [rbp + 0x78], rax
lea rax, str.DefTerm_AppList
mov qword [rbp + 0x88], rax
lea rax, [rdi + 0x40]
mov qword [rbp + 0x90], rax
lea r15d, [r14 + 3]
mov dword [rbp - 0x6c], r14d
mov dword [rbp - 0x58], r14d
mov dword [rbp - 0x54], r14d
mov dword [rbp - 0x40], r14d
mov dword [rbp - 0x3c], r14d
mov dword [rbp - 0x28], r14d
mov dword [rbp - 0x24], r14d
mov dword [rbp - 0x10], r14d
mov dword [rbp - 0xc], r14d
mov dword [rbp + 8], r14d
mov dword [rbp + 0xc], r14d
mov dword [rbp + 0x20], r14d
mov dword [rbp + 0x24], r14d
mov dword [rbp + 0x38], r13d
mov dword [rbp + 0x3c], 1
mov dword [rbp + 0x50], r13d
mov dword [rbp + 0x54], 1
mov dword [rbp + 0x68], r13d
mov dword [rbp + 0x6c], 1
mov dword [rbp + 0x80], r13d
mov dword [rbp + 0x84], 1
mov dword [rbp + 0x98], r13d
mov dword [rbp + 0x9c], r15d
test esi, esi
jne 0x1400469e0
mov r12b, byte [rdi + 0x48]
lea rbx, [rbp - 0x78]
mov esi, dword [rbx + 8]
lea rax, [rsp + 0x60]
mov rdx, qword [rbx - 8]
lea r9, [rsp + 0x74]
mov rcx, qword [rsp + 0x68]
xor r8d, r8d
mov qword [rsp + 0x28], rax
test esi, esi
je 0x14004691e
lea rax, [rsp + 0x70]
mov dword [rsp + 0x60], r14d
mov qword [rsp + 0x20], rax
call qword [0x14021c860]
mov ecx, dword [rsp + 0x70]
test eax, eax
cmovne ecx, r13d
mov dword [rsp + 0x70], ecx
cmp esi, r14d
jne 0x14004690b
mov rax, qword [rbx]
mov dword [rax], ecx
jmp 0x1400469b9
cmp esi, 1
jne 0x1400469b9
mov rax, qword [rbx]
mov byte [rax], cl
jmp 0x1400469b9
mov r15, qword [rbx]
mov rsi, r13
mov qword [rsp + 0x20], r13
mov r14, qword [r15]
mov dword [rsp + 0x60], r13d
call qword [0x14021c860]
test eax, eax
jne 0x14004699e
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x14004699e
cmp dword [rsp + 0x74], 1
je 0x140046951
cmp dword [rsp + 0x74], 7
jne 0x14004699e
lea rcx, [rax + 4]
mov edx, 1
call fcn.14012005c
mov rsi, rax
test rax, rax
je 0x14004699e
mov rdx, qword [rbx - 8]
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x74]
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [0x14021c860]
cmp word [rsi], r13w
jne 0x14004699e
mov rcx, rsi
call fcn.14012008c
mov rsi, r13
mov qword [r15], rsi
test r12b, r12b
jne 0x1400469b3
test r14, r14
je 0x1400469b3
mov rcx, r14
call fcn.14012008c
mov r14d, 4
add rbx, 0x18
lea rcx, [rbp + 0xa0]
lea rax, [rbx - 8]
cmp rax, rcx
jne 0x1400468b7
cmp dword [rdi], r13d
mov byte [rdi + 0x48], r13b
setne bl
jmp 0x140046ad9
mov r14b, 1
lea rdi, [rbp - 0x78]
mov eax, dword [rdi + 8]
test eax, eax
je 0x140046a07
mov r9d, dword [rdi + 0xc]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x60], eax
mov rax, qword [rdi]
mov qword [rsp + 0x20], rax
jmp 0x140046a9e
cmp dword [rdi + 0xc], 1
jne 0x140046a3e
mov rax, qword [rdi]
lea rbx, [0x14015a140]
cmp qword [rax], r13
cmovne rbx, qword [rax]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r9d, 1
lea eax, [rax*2 + 2]
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x28], eax
jmp 0x140046a99
cmp dword [rdi + 0xc], r15d
jne 0x140046ab2
mov rax, qword [rdi]
lea rbx, [0x140177af8]
mov edx, 2
cmp qword [rax], r13
cmovne rbx, qword [rax]
mov dword [rsp + 0x60], edx
mov rsi, rbx
cmp word [rbx], r13w
je 0x140046a92
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [rsp + 0x60]
cmp eax, 1
jl 0x140046a92
add edx, 2
lea edx, [rdx + rax*2]
inc eax
movsxd rcx, eax
mov dword [rsp + 0x60], edx
lea rsi, [rsi + rcx*2]
cmp word [rsi], r13w
jne 0x140046a67
mov dword [rsp + 0x28], edx
mov r9d, r15d
mov qword [rsp + 0x20], rbx
mov rdx, qword [rdi - 8]
xor r8d, r8d
mov rcx, qword [rsp + 0x68]
call qword [0x14021c868]
mov edx, eax
movzx eax, r14b
test edx, edx
mov ebx, r13d
cmove ebx, eax
add rdi, 0x18
lea rax, [rbp + 0xa0]
mov r14b, bl
lea rcx, [rdi - 8]
cmp rcx, rax
jne 0x1400469e7
mov rcx, qword [rsp + 0x68]
call qword [0x14021c858]
mov al, bl
jmp 0x140046aea
xor al, al
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.140139b10
mov rbx, qword [rsp + 0x200]
add rsp, 0x1b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret