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

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xb0
mov r14, r9
mov rdi, r8
mov r12, rcx
xor r13d, r13d
mov dword [rbp - 0x29], r13d
lea r15, vtable.CVolObject.0
mov qword [rcx], r15
mov qword [rcx + 8], r13
mov qword [rcx + 0x10], r13
lea rax, vtable.CWString.0
mov qword [rcx], rax
lea rsi, [rcx + 0x20]
mov qword [rbp + 0x17], rsi
mov qword [rsi], r15
mov qword [rsi + 8], r13
mov qword [rsi + 0x10], r13
lea rax, vtable.CVolMem.0
mov qword [rsi], rax
mov qword [rsi + 0x18], r13
mov qword [rsi + 0x28], r13
mov qword [rsi + 0x20], r13
mov eax, 0x40
mov qword [rsi + 0x30], rax
mov qword [rcx + 0x18], r13
mov qword [rcx + 0x50], 0xfe
mov dword [rbp - 0x29], 1
mov rax, qword [rcx]
call qword [rax + 0x88]
mov rbx, qword [rbp + 0x7f]
mov rax, qword [rbx + 8]
mov qword [r12 + 8], rax
mov rax, qword [rbx + 0x10]
mov qword [r12 + 0x10], rax
mov rax, qword [rbx + 0x18]
mov qword [r12 + 0x18], rax
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x88]
lea rdx, [rbx + 0x20]
mov rcx, rsi
call fcn.14000c900
mov rdx, qword [rdi + 0x18]
test rdx, rdx
jne 0x140016831
cmp qword [rdi + 0x48], rdx
lea rdx, [0x1400d1058]
je 0x140016831
mov rdx, qword [rdi + 0x38]
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140016b3e
mov dword [rbp + 0x67], r13d
mov rdx, qword [r14 + 0x18]
test rdx, rdx
jne 0x140016876
cmp qword [r14 + 0x48], rdx
lea rdx, [0x1400d1058]
je 0x140016876
mov rdx, qword [r14 + 0x38]
lea rax, [rbp + 0x67]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x7f]
xor r8d, r8d
mov rcx, qword [rbp + 0x6f]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140016b34
mov eax, dword [rbp + 0x7f]
dec eax
cmp eax, 1
ja 0x140016b34
lea rax, vtable.CVolCommonBaseWithMemManager.0
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x21], r15
mov qword [rbp - 0x19], r13
mov qword [rbp - 0x11], r13
lea rcx, vtable.CVolMem.0
mov qword [rbp - 0x21], rcx
mov qword [rbp - 9], r13
mov qword [rbp + 7], r13
mov qword [rbp - 1], r13
mov edx, 0x40
mov qword [rbp + 0xf], rdx
mov qword [rbp - 0x61], rax
mov qword [rbp - 0x61], r15
mov qword [rbp - 0x59], r13
mov qword [rbp - 0x51], r13
mov qword [rbp - 0x61], rcx
mov qword [rbp - 0x49], r13
mov qword [rbp - 0x39], r13
mov qword [rbp - 0x41], r13
mov qword [rbp - 0x31], rdx
mov r9d, dword [rbp + 0x67]
lea rdi, [r9 + 2]
mov rcx, qword [rbp + 0xf]
mov rax, rdi
cqo
idiv rcx
sub r9, rdx
lea rbx, [rcx + 2]
add rbx, r9
mov rdx, rbx
lea rcx, [rbp - 0x21]
mov rax, qword [rbp - 0x21]
call qword [rax]
mov r15, rax
mov qword [rbp - 9], rax
mov qword [rbp - 1], rbx
mov qword [rbp + 7], rdi
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.140090940
mov rdx, qword [r14 + 0x18]
test rdx, rdx
jne 0x140016967
cmp qword [r14 + 0x48], rdx
lea rdx, [0x1400d1058]
je 0x140016967
mov rdx, qword [r14 + 0x38]
lea rax, [rbp + 0x67]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rbp + 0x6f]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140016ad6
mov rdi, qword [rbp - 9]
cmp qword [rbp + 7], 0
cmove rdi, r13
cmp dword [rbp + 0x7f], 2
jne 0x140016a9c
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov r13d, eax
inc r13
lea r14, [r13*2 + 2]
mov r15, qword [rbp - 0x49]
test r15, r15
je 0x140016a2e
mov r8, qword [rbp - 0x39]
cmp r14, r8
je 0x140016a29
mov rcx, qword [rbp - 0x31]
test rcx, rcx
mov eax, 0x40
cmovle rcx, rax
mov rax, qword [rbp - 0x41]
cmp rax, r14
jl 0x1400169f3
sub rax, r14
cmp rax, rcx
jle 0x140016a22
mov rax, r14
cqo
idiv rcx
sub rcx, rdx
lea rbx, [rcx + 2]
lea rbx, [rbx + r13*2]
mov r8, rbx
mov rdx, r15
lea rcx, [rbp - 0x61]
mov rax, qword [rbp - 0x61]
call qword [rax + reloc.WS2_32.dll_recv]
mov r15, rax
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], rbx
mov qword [rbp - 0x39], r14
mov r8, r14
mov rcx, r15
jmp 0x140016a73
mov rcx, qword [rbp - 0x31]
test rcx, rcx
mov eax, 0x40
cmovle rcx, rax
mov rax, r14
cqo
idiv rcx
sub rcx, rdx
lea rbx, [rcx + 2]
lea rbx, [rbx + r13*2]
mov rdx, rbx
lea rcx, [rbp - 0x61]
mov rax, qword [rbp - 0x61]
call qword [rax]
mov r15, rax
mov qword [rbp - 0x49], rax
mov qword [rbp - 0x41], rbx
mov r8, r14
mov qword [rbp - 0x39], r14
mov rcx, rax
xor edx, edx
call fcn.140090940
mov r8d, r13d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rdi, qword [rbp - 0x49]
cmp qword [rbp - 0x39], 0
mov r13d, 0
cmove rdi, r13
mov qword [r12 + 0x18], r13
mov rdx, qword [rsi + 0x18]
test rdx, rdx
je 0x140016ab3
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + Ordinal_26]
mov qword [rsi + 0x18], r13
mov qword [rsi + 0x28], r13
mov qword [rsi + 0x20], r13
test rdi, rdi
je 0x140016ad6
cmp word [rdi], 0
je 0x140016ad6
mov rdx, rdi
mov rcx, rsi
call fcn.140025200
nop
lea rdi, vtable.CVolMem.0
mov qword [rbp - 0x61], rdi
mov rdx, qword [rbp - 0x49]
test rdx, rdx
je 0x140016af5
lea rcx, [rbp - 0x61]
mov rax, qword [rbp - 0x61]
call qword [rax + Ordinal_26]
mov qword [rbp - 0x49], r13
mov qword [rbp - 0x39], r13
mov qword [rbp - 0x41], r13
lea rbx, vtable.CVolObject.0
mov qword [rbp - 0x61], rbx
mov qword [rbp - 0x21], rdi
mov rdx, qword [rbp - 9]
test rdx, rdx
je 0x140016b24
lea rcx, [rbp - 0x21]
mov rax, qword [rbp - 0x21]
call qword [rax + Ordinal_26]
mov qword [rbp - 9], r13
mov qword [rbp + 7], r13
mov qword [rbp - 1], r13
mov qword [rbp - 0x21], rbx
mov rcx, qword [rbp + 0x6f]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, r12
mov rbx, qword [rsp + 0x108]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret