Function at 0x1400139b0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0xc8]
sub rsp, 0x1a0
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x140024018]
xor rax, rsp
mov qword [rbp + 0x90], rax
mov r14, rcx
xor r12d, r12d
mov edi, r12d
mov dword [rsp + 0x34], r12d
mov r15d, 0x3e8
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x60], 7
mov word [rsp + 0x48], r12w
xor r8d, r8d
mov edx, 0xffff
lea rcx, [rsp + 0x48]
call fcn.140015920
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rdx, qword [rsp + 0x48]
mov r8d, 0xffff
lea rcx, str.EnableLog
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140013b1a
mov rsi, qword [0x140024618]
mov rbx, qword [rsi]
cmp rbx, rsi
je 0x140013b34
nop dword [rax]
mov eax, dword [rbx + 0x20]
mov dword [rsp + 0x68], eax
lea rdx, [rbx + 0x28]
lea rcx, [rsp + 0x70]
call fcn.140007510
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x70]
cmp qword [rbp - 0x78], 8
cmovae rcx, qword [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
cmove edi, dword [rsp + 0x68]
lea rcx, [rsp + 0x70]
call fcn.140001e80
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x140013ae9
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140013ae4
cmp rbx, qword [rax + 0x10]
jne 0x140013ae4
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140013ad1
mov rbx, rax
jmp 0x140013b0f
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x140013b0f
nop word [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x140013b00
cmp rbx, rsi
jne 0x140013a70
jmp 0x140013b34
mov qword [rsp + 0x58], r12
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rax, qword [rsp + 0x48]
mov word [rax], r12w
mov rax, qword [rsp + 0x58]
cmp rax, 0xffff
jb 0x140013b65
mov qword [rsp + 0x58], 0xffff
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rax, qword [rsp + 0x48]
mov word [rax + 0x1fffe], r12w
jmp 0x140013b7a
xor r8d, r8d
mov edx, 0xffff
sub rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140015920
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rdx, qword [rsp + 0x48]
mov r8d, 0xffff
lea rcx, str.EnableRealTimeLog
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140013bce
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rdx, qword [rsp + 0x48]
lea rcx, [0x140019f2c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140013be8
mov dword [rsp + 0x34], 1
jmp 0x140013be8
mov qword [rsp + 0x58], r12
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rax, qword [rsp + 0x48]
mov word [rax], r12w
mov rax, qword [rsp + 0x58]
cmp rax, 0xffff
jb 0x140013c19
mov qword [rsp + 0x58], 0xffff
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rax, qword [rsp + 0x48]
mov word [rax + 0x1fffe], r12w
jmp 0x140013c2e
xor r8d, r8d
mov edx, 0xffff
sub rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140015920
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rdx, qword [rsp + 0x48]
mov r8d, 0xffff
lea rcx, [0x140019f30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140013c88
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
xor edx, edx
lea r8d, [rdx + 0xa]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstoul]
mov dword [rsp + 0x38], eax
mov r15d, 0x3e8
cmp eax, 0x2710
cmovbe r15d, eax
jmp 0x140013ca2
mov qword [rsp + 0x58], r12
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rax, qword [rsp + 0x48]
mov word [rax], r12w
mov rbx, qword [r14 + 0xd8]
test rbx, rbx
je 0x140013e67
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp - 0x70]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x30], 0x100
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.EnableLog
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140013db8
mov rsi, qword [0x140024618]
mov rbx, qword [rsi]
cmp rbx, rsi
je 0x140013db8
nop
mov eax, dword [rbx + 0x20]
mov dword [rsp + 0x68], eax
lea rdx, [rbx + 0x28]
lea rcx, [rsp + 0x70]
call fcn.140007510
lea rcx, [rsp + 0x70]
cmp qword [rbp - 0x78], 8
cmovae rcx, qword [rsp + 0x70]
lea rdx, [rbp - 0x70]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140013d4c
cmp dword [rsp + 0x68], edi
cmova edi, dword [rsp + 0x68]
lea rcx, [rsp + 0x70]
call fcn.140001e80
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x140013d88
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140013d83
nop word [rax + rax]
cmp rbx, qword [rax + 0x10]
jne 0x140013d83
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140013d70
mov rbx, rax
jmp 0x140013daf
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x140013daf
nop dword [rax]
nop dword [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x140013da0
cmp rbx, rsi
jne 0x140013d10
cmp dword [rsp + 0x34], 0
jne 0x140013df5
mov dword [rsp + 0x30], 4
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.EnableRealTimeLog
mov rcx, qword [r14 + 0xd8]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [rsp + 0x30], 4
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140019f30]
mov rcx, qword [r14 + 0xd8]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140013e43
mov r15d, 0x3e8
cmp dword [rsp + 0x38], 0x2710
cmovbe r15d, dword [rsp + 0x38]
mov dword [r14 + 0xc8], edi
mov eax, dword [rsp + 0x34]
mov dword [r14 + 0xcc], eax
mov dword [r14 + 0xd0], r15d
mov dword [r14 + 0xd4], 1
mov rdx, qword [rsp + 0x60]
cmp rdx, 8
jb 0x140013eac
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140013ea7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140013ea7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140016704
mov rcx, qword [rbp + 0x90]
xor rcx, rsp
call fcn.1400163f0
lea r11, [rsp + 0x1a0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret