Function at 0x140020ab8
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x188]
sub rsp, 0x250
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rax, qword [0x140074020]
xor rax, rsp
mov qword [rbp + 0x140], rax
mov rbx, r8
mov rsi, rdx
mov r14, rcx
mov qword [rsp + 0x70], rdx
xor r15d, r15d
mov dword [rsp + 0x60], r15d
cmp qword [rcx], r15
setne cl
mov r9d, 0x278
lea r13, str.srcwindows_registry.cpp
mov r8, r13
lea rdx, str.Incorrect_state
call fcn.14002235c
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x54], r15d
lea r12d, [r15 + 8]
cmp qword [rbx + 0x18], r12
jb 0x140020b43
mov rdx, qword [rbx]
jmp 0x140020b46
mov rdx, rbx
lea rax, [rsp + 0x54]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rcx, qword [r14]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov dword [rsp + 0x58], eax
test eax, eax
je 0x140020bed
lea rcx, [rsp + 0x78]
call fcn.14000a708
nop
lea rdx, str.RegQueryValueExW_failed_with
mov rcx, rax
call fcn.14000da30
mov rcx, rax
lea rdx, [rsp + 0x58]
call fcn.140020a44
mov rcx, rax
lea rdx, [rbp + 0x60]
call fcn.14000a6ec
nop
movzx r8d, di
or r8d, 0x80070000
test edi, edi
cmovle r8d, edi
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], 0x28b
mov r9, r13
lea rdx, [rbp + 0x60]
lea rcx, [rbp + 0x80]
call fcn.1400205e0
lea rdx, [0x140072860]
lea rcx, [rbp + 0x80]
call fcn.14002c720
nop
mov edx, dword [rsp + 0x54]
lea rcx, [rsp + 0x38]
call fcn.14001a738
nop
mov eax, dword [rsp + 0x54]
test eax, eax
je 0x140020cc4
cmp qword [rbx + 0x18], r12
jb 0x140020c11
mov rbx, qword [rbx]
lea rax, [rsp + 0x54]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rdx, rbx
mov rcx, qword [r14]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
mov dword [rsp + 0x58], eax
test eax, eax
je 0x140020cc0
lea rcx, [rsp + 0x78]
call fcn.14000a708
nop
lea rdx, str.RegQueryValueExW_failed_with
mov rcx, rax
call fcn.14000da30
mov rcx, rax
lea rdx, [rsp + 0x58]
call fcn.140020a44
mov rcx, rax
lea rdx, [rbp + 0x60]
call fcn.14000a6ec
nop
movzx r8d, bx
or r8d, 0x80070000
test ebx, ebx
cmovle r8d, ebx
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], 0x29f
mov r9, r13
lea rdx, [rbp + 0x60]
lea rcx, [rbp + 0x80]
call fcn.1400205e0
lea rdx, [0x140072860]
lea rcx, [rbp + 0x80]
call fcn.14002c720
nop
mov eax, dword [rsp + 0x54]
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.1400217a8
mov eax, dword [rsp + 0x50]
mov dword [rsi], eax
lea rbx, [rsi + 4]
mov dword [rbx], r15d
lea rcx, [rsi + 8]
mov qword [rcx], r15
lea rdi, [rsi + 0x10]
mov r13d, 7
mov qword [rdi + 0x18], r13
mov qword [rdi + 0x10], r15
cmp r13, r12
jb 0x140020d00
mov rax, qword [rdi]
jmp 0x140020d03
mov rax, rdi
mov word [rax], r15w
mov qword [rsi + 0x30], r15
mov qword [rsi + 0x38], r15
mov qword [rsi + 0x40], r15
lea rdx, [rsi + 0x48]
mov qword [rdx], r15
mov qword [rdx + 8], r15
mov qword [rdx + 0x10], r15
mov dword [rsp + 0x60], 1
mov eax, dword [rsp + 0x50]
cmp eax, 6
ja 0x140020f3b
je 0x14002114d
test eax, eax
je 0x14002114d
cmp eax, 2
jbe 0x140020e57
cmp eax, 3
je 0x140020e18
add eax, 0xfffffffc
cmp eax, 1
ja 0x140020ffb
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
sub rax, rdx
mov r8d, 4
cmp rax, r8
je 0x140020dd5
lea rcx, [rsp + 0x38]
call fcn.14000a5f0
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x78]
call fcn.14000a708
nop
lea rdx, str.Invalid_DWORD_size:
mov rcx, rax
call fcn.14000da30
mov rcx, rax
lea rdx, [rsp + 0x58]
call fcn.14000d8c8
mov rcx, rax
lea rdx, [rbp + 0x60]
call fcn.14000a6ec
nop
mov r8d, 0x305
lea rdx, str.srcwindows_registry.cpp
lea rcx, [rbp + 0x60]
call fcn.140005afc
nop
test rbx, rbx
je 0x140020dee
mov rcx, rbx
test rdx, rdx
je 0x140020de9
call fcn.14002ab50
jmp 0x140020dfe
call fcn.14002c580
call fcn.14003488c
mov dword [rax], 0x16
call fcn.140032370
cmp dword [rsp + 0x50], 5
jne 0x14002114d
mov ecx, dword [rbx]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rbx], eax
jmp 0x14002114d
lea rax, [rsp + 0x38]
cmp rdx, rax
je 0x14002114d
mov rbx, r15
mov rax, qword [rsp + 0x38]
mov qword [rdx], rax
mov qword [rsp + 0x38], rbx
mov rax, qword [rsp + 0x40]
mov qword [rdx + 8], rax
mov qword [rsp + 0x40], r15
mov rax, qword [rsp + 0x48]
mov qword [rdx + 0x10], rax
mov qword [rsp + 0x48], r15
jmp 0x140021152
mov rdx, qword [rsp + 0x40]
mov rcx, rdx
mov rbx, qword [rsp + 0x38]
sub rcx, rbx
test cl, 1
je 0x140020e8c
mov rax, rcx
and eax, 1
sub rcx, rax
mov rdx, rcx
lea rcx, [rsp + 0x38]
call fcn.1400217a8
mov rdx, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x38]
cmp rbx, rdx
sete al
test al, al
jne 0x140021152
mov rax, rdx
sub rax, rbx
lea rcx, [rax - 1]
cmp rax, rcx
ja 0x140020eb4
lea rcx, [rsp + 0x38]
call fcn.1400213f0
int3
cmp byte [rcx + rbx], r15b
jne 0x140020edd
lea rcx, [rax - 2]
cmp rax, rcx
ja 0x140020ece
lea rcx, [rsp + 0x38]
call fcn.1400213f0
int3
cmp byte [rcx + rbx], r15b
jne 0x140020edd
sub rdx, 2
mov qword [rsp + 0x40], rdx
sub rdx, rbx
shr rdx, 1
cmp rdx, qword [rdi + 0x10]
ja 0x140020f02
mov qword [rdi + 0x10], rdx
cmp qword [rdi + 0x18], r12
jb 0x140020ef8
mov rax, qword [rdi]
jmp 0x140020efb
mov rax, rdi
mov word [rax + rdx*2], r15w
jmp 0x140020f11
xor r8d, r8d
sub rdx, qword [rdi + 0x10]
mov rcx, rdi
call fcn.140019ed8
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x38]
sub r9, r8
mov rdx, qword [rsi + 0x20]
cmp qword [rdi + 0x18], r12
jb 0x140020f2b
mov rdi, qword [rdi]
add rdx, rdx
mov rcx, rdi
call fcn.140021b70
jmp 0x14002114d
cmp eax, r13d
je 0x140021046
jbe 0x140020ffb
cmp eax, 0xa
jbe 0x14002114d
cmp eax, 0xb
jne 0x140020ffb
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
sub rax, rdx
cmp rax, r12
je 0x140020fc8
lea rcx, [rsp + 0x38]
call fcn.14000a5f0
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x78]
call fcn.14000a708
nop
lea rdx, str.Invalid_QWORD_size:
mov rcx, rax
call fcn.14000da30
mov rcx, rax
lea rdx, [rsp + 0x58]
call fcn.14000d8c8
mov rcx, rax
lea rdx, [rbp + 0x60]
call fcn.14000a6ec
nop
mov r8d, 0x311
lea rdx, str.srcwindows_registry.cpp
lea rcx, [rbp + 0x60]
call fcn.140005afc
nop
test rcx, rcx
jne 0x140020fe2
call fcn.14003488c
mov dword [rax], 0x16
call fcn.140032370
jmp 0x14002114d
mov r8, r12
test rdx, rdx
je 0x140020ff4
call fcn.14002ab50
jmp 0x14002114d
call fcn.14002c580
jmp 0x140020fcd
lea rcx, [rsp + 0x78]
call fcn.14000a708
nop
lea rdx, str.Invalid_registry_value_type
mov rcx, rax
call fcn.14000da30
mov rcx, rax
lea rdx, [rsp + 0x50]
call fcn.14000dad8
mov rcx, rax
lea rdx, [rbp + 0x60]
call fcn.14000a6ec
nop
mov r8d, 0x316
lea rdx, str.srcwindows_registry.cpp
lea rcx, [rbp + 0x60]
call fcn.140005afc
nop
mov rax, qword [rsp + 0x40]
mov rdx, rax
mov rbx, qword [rsp + 0x38]
sub rdx, rbx
test dl, 1
je 0x140021078
mov rax, rdx
and eax, 1
sub rdx, rax
lea rcx, [rsp + 0x38]
call fcn.1400217a8
mov rax, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x38]
cmp rbx, rax
sete al
test al, al
jne 0x140021152
mov byte [rsp + 0x30], r15b
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.140021404
mov byte [rsp + 0x30], r15b
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.140021404
mov byte [rsp + 0x30], r15b
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.140021404
mov byte [rsp + 0x30], r15b
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.140021404
mov rbx, qword [rsp + 0x38]
cmp word [rbx], r15w
je 0x140021152
mov qword [rbp + 0x78], r13
mov qword [rbp + 0x70], r15
mov word [rbp + 0x60], r15w
cmp word [rbx], r15w
jne 0x1400210f9
mov rax, r15
jmp 0x140021101
mov rcx, rbx
call fcn.14003279c
mov r8, rax
mov rdx, rbx
lea rcx, [rbp + 0x60]
call fcn.14000b650
nop
lea rdx, [rbp + 0x60]
lea rcx, [rsi + 0x30]
call fcn.140012bf4
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x60]
call fcn.14000b5d0
mov rdx, qword [rsp + 0x40]
sub rdx, qword [rsp + 0x38]
mov rcx, rbx
call fcn.140034a40
lea rbx, [rbx + rax*2]
add rbx, 2
cmp word [rbx], r15w
jne 0x1400210e1
mov rbx, qword [rsp + 0x38]
test rbx, rbx
je 0x14002116d
mov rdx, qword [rsp + 0x48]
sub rdx, rbx
mov r8d, 1
mov rcx, rbx
call fcn.140004950
mov rax, rsi
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.140027920
mov rbx, qword [rsp + 0x2a8]
add rsp, 0x250
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret