Function at 0x140037660
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1fe0]
mov eax, 0x20e0
call fcn.14003f630
sub rsp, rax
mov rax, qword [0x14007f080]
xor rax, rsp
mov qword [rbp + 0x1fd0], rax
mov r14, r8
mov rbx, rdx
cmp byte [rcx + 0x10], 0
jne 0x1400376c6
xor al, al
mov rcx, qword [rbp + 0x1fd0]
xor rcx, rsp
call fcn.14003f1d0
mov rbx, qword [rsp + 0x2110]
add rsp, 0x20e0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
test r14, r14
je 0x1400376d3
mov rcx, r14
call fcn.140002ef0
call fcn.140001a70
mov rcx, rax
test rax, rax
je 0x140037a04
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
xor edx, edx
mov r8d, 0x1ffe
lea rcx, [rbp - 0x2e]
call fcn.14005fd20
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
mov r8d, 0x40
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.ole32.dll_StringFromGUID2]
call fcn.140001a70
mov rcx, rax
test rax, rax
je 0x1400379ee
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x50]
mov rsi, 0xffffffffffffffff
cmp rax, 0x10000
lea rax, [rsp + 0x50]
jae 0x140037786
movzx edx, ax
lea rcx, [rsp + 0x38]
call fcn.140002950
jmp 0x1400377ab
mov r8, rsi
nop dword [rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x140037790
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x38]
call fcn.140002da0
nop
mov rbx, qword [rsp + 0x38]
movsxd rdi, dword [rbx - 0x10]
test edi, edi
js 0x1400379f9
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x1400377de
mov edx, edi
lea rcx, [rsp + 0x38]
call fcn.140002b00
mov rbx, qword [rsp + 0x38]
mov rdx, rbx
lea r11, [rbx + rdi*2]
mov rcx, rbx
xor r15d, r15d
cmp rbx, r11
jae 0x14003782a
lea r10, [rdx + 2]
cmp word [rdx], 0x7b
je 0x140037822
lea r9, [rcx + 2]
mov r8, r15
cmp rcx, r9
je 0x140037822
cmp r8, 1
jae 0x140037822
movzx eax, word [rdx]
mov word [rcx], ax
add rdx, 2
add rcx, 2
inc r8
cmp rcx, r9
jne 0x140037806
mov rdx, r10
cmp r10, r11
jb 0x1400377f0
mov word [rcx], r15w
sub rdx, rcx
sar rdx, 1
sub edi, edx
js 0x1400379f9
cmp edi, dword [rbx - 0xc]
jg 0x1400379f9
mov dword [rbx - 0x10], edi
movsxd rax, edi
mov word [rbx + rax*2], r15w
movsxd rdi, dword [rbx - 0x10]
test edi, edi
js 0x1400379f9
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x14003787e
mov edx, edi
lea rcx, [rsp + 0x38]
call fcn.140002b00
mov rbx, qword [rsp + 0x38]
mov rdx, rbx
lea r11, [rbx + rdi*2]
mov rcx, rbx
cmp rbx, r11
jae 0x1400378ca
nop dword [rax]
lea r10, [rdx + 2]
cmp word [rdx], 0x7d
je 0x1400378c2
lea r9, [rcx + 2]
mov r8, r15
cmp rcx, r9
je 0x1400378c2
cmp r8, 1
jae 0x1400378c2
movzx eax, word [rdx]
mov word [rcx], ax
add rdx, 2
add rcx, 2
inc r8
cmp rcx, r9
jne 0x1400378a6
mov rdx, r10
cmp r10, r11
jb 0x140037890
mov word [rcx], r15w
sub rdx, rcx
sar rdx, 1
sub edi, edx
js 0x1400379f9
cmp edi, dword [rbx - 0xc]
jg 0x1400379f9
mov dword [rbx - 0x10], edi
movsxd rax, edi
mov word [rbx + rax*2], r15w
mov r8, rbx
lea rdx, str.SYSTEMCurrentControlSetControlPowerUserPowerSchemes_s
lea rcx, [rsp + 0x48]
call fcn.140002f70
mov word [rbp - 0x30], r15w
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
mov rdx, qword [rsp + 0x48]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14003797e
mov dword [rsp + 0x40], 0x2000
mov dword [rsp + 0x44], 1
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
lea rdx, str.FriendlyName
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x30]
test eax, eax
je 0x1400379c1
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor dil, dil
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14003799b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x1400379b8
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
movzx eax, dil
jmp 0x1400376a0
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r14, r14
je 0x1400379e9
lea rax, [rbp - 0x30]
mov r8, rsi
inc r8
cmp word [rax + r8*2], r15w
jne 0x1400379d3
lea rdx, [rbp - 0x30]
mov rcx, r14
call fcn.140002da0
mov dil, 1
jmp 0x140037981
mov ecx, 0x80004005
call fcn.1400018b0
nop
mov ecx, 0x80070057
call fcn.1400018b0
nop
mov ecx, 0x80004005
call fcn.1400018b0
int3