Function at 0x1400397fc
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 8], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rdi, r9
mov rbx, r8
mov r15, rdx
mov r12, rcx
mov dword [rbp - 0x40], 0x1fffff
lea rcx, [0x1401979a8]
mov rax, qword [0x1401979a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x38], rax
mov r14, qword [rbp + 0x50]
mov rax, qword [r14]
or r13, 0xffffffffffffffff
xor esi, esi
cmp dword [rax - 0x10], esi
je 0x1400398a2
lea r8, [0x140130a20]
mov rdx, r14
lea rcx, [rbp - 0x10]
call fcn.140017478
nop
mov rdx, rax
lea rcx, [rbp - 0x38]
call fcn.140001d7c
nop
mov rdx, qword [rbp - 0x10]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x1400398a2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [0x1401979a8]
mov rax, qword [0x1401979a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x28], rax
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x18]
call fcn.140039224
nop
mov r8, rax
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x20]
call fcn.14000d514
nop
mov rdx, rax
lea rcx, [rbp - 0x28]
call fcn.140001d7c
nop
mov rdx, qword [rbp - 0x20]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x14003990a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x18]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x14003992a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rbx, qword [rbp - 0x28]
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400399eb
mov eax, dword [0x14019fd80]
lea ecx, [rax + 1]
imul ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 3
sub ecx, eax
cmp ecx, 0x13
jne 0x140039987
lea esi, [rcx - 0x12]
sub dword [0x1401a0c8c], esi
lea rdx, [rbx - 0x18]
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x1400399a4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x38]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x1400399c5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r14]
sub rdx, 0x18
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x1400399e4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor al, al
jmp 0x140039b2d
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
lea r9, [rbp - 0x3c]
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, 1
test eax, eax
je 0x140039a1b
mov ecx, dword [rbp - 0x40]
jmp 0x140039a25
mov eax, dword [rbp - 0x40]
add eax, esi
mov dword [rbp - 0x40], eax
mov ecx, eax
mov eax, 2
mul rcx
cmovo rax, r13
mov rcx, rax
call fcn.1400b8688
mov rdi, rax
mov r8d, dword [rbp - 0x40]
add r8, r8
xor edx, edx
mov rcx, rax
call fcn.1400be450
mov eax, dword [rbp - 0x40]
add eax, eax
mov dword [rbp - 0x40], eax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x3c]
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r15d, eax
xor eax, eax
test r15d, r15d
jne 0x140039aab
mov ecx, dword [rbp - 0x40]
mov word [rdi + rcx*2], ax
test rdi, rdi
jne 0x140039a91
mov ecx, eax
jmp 0x140039a9d
mov rcx, r13
inc rcx
cmp word [rdi + rcx*2], ax
jne 0x140039a94
mov r8d, ecx
mov rdx, rdi
mov rcx, r12
call fcn.140001e74
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rdi
call fcn.1400ba0bc
xor edi, edi
test r15d, r15d
jne 0x140039ac9
cmp dword [rbp - 0x3c], esi
je 0x140039acc
mov sil, dil
lea rdx, [rbx - 0x18]
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x140039ae9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x38]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, r13d
test eax, eax
jg 0x140039b0a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r14]
sub rdx, 0x18
mov ecx, r13d
lock xadd dword [rdx + 0x10], ecx
add ecx, r13d
test ecx, ecx
jg 0x140039b2a
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov al, sil
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret