Function at 0x140028090
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r13
push r15
lea rbp, [rsp - 0x430]
sub rsp, 0x530
mov rax, qword [0x1402f8c60]
xor rax, rsp
mov qword [rbp + 0x410], rax
mov rsi, rdx
mov r13, rcx
test rdx, rdx
jne 0x1400280c8
mov rdx, qword [rcx]
jmp 0x1400280fe
lea rax, [rsp + 0x48]
xor edi, edi
mov r9d, 0x20019
mov qword [rsp + 0x48], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetControlPowerUserPowerSchemes
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140028125
mov rdx, qword [r13]
sub rdx, 0x18
mov r15, 0xffffffffffffffff
lock xadd dword [rdx + 0x10], r15d
sub r15d, 1
jg 0x14002811e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x1400285b4
mov qword [rsp + 0x570], rbx
lea r8, [rbp + 0x200]
mov ebx, edi
mov dword [rsp + 0x40], edi
mov r9d, 0x208
mov dword [rsp + 0x44], ebx
mov edx, 0xa5
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadStringW]
call fcn.140002c10
mov rcx, rax
test rax, rax
je 0x1400285e8
mov rax, qword [rax]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov r15, 0xffffffffffffffff
mov qword [rsp + 0x68], rax
lea rax, [rbp + 0x200]
cmp rax, 0x10000
jae 0x14002819d
lea rax, [rbp + 0x200]
movzx edx, ax
lea rcx, [rsp + 0x68]
call fcn.140004320
jmp 0x1400281c4
lea rcx, [rbp + 0x200]
mov rax, r15
inc rax
cmp word [rcx + rax*2], bx
jne 0x1400281a7
mov r8d, eax
lea rdx, [rbp + 0x200]
lea rcx, [rsp + 0x68]
call fcn.140004720
mov rcx, qword [rsp + 0x48]
lea r9, [rsp + 0x40]
xor eax, eax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
lea r8, [rbp - 0x60]
mov qword [rsp + 0x28], rdi
xor edx, edx
mov qword [rsp + 0x528], r12
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x520], r14
mov dword [rsp + 0x40], 0x4a
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rax
mov word [rbp - 0x18], ax
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140028550
lea r14, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecopower_regutil.cpp
lea r12, str.__TecoPower::CRegUtil::GetCleanupPowerSchemeListFromScheme_
mov rcx, qword [r13]
cmp dword [rcx - 0x10], 0
je 0x140028261
lea rdx, [rbp - 0x60]
call fcn.140202474
test eax, eax
je 0x1400284e6
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x60]
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov qword [rsp + 0x60], rdi
lea rdx, [rbp - 0x60]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400284e6
xor edx, edx
mov dword [rsp + 0x54], edi
mov r8d, 0x208
mov dword [rsp + 0x50], 0x208
lea rcx, [rbp - 0x10]
call fcn.1401f5d40
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x54]
lea rax, [rbp - 0x10]
xor r8d, r8d
lea rdx, [0x1402a3e48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400284db
call fcn.140002c10
test rax, rax
je 0x1400285dd
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x58], rax
lea rax, [rbp - 0x10]
cmp rax, 0x10000
jae 0x140028321
lea rax, [rbp - 0x10]
movzx edx, ax
lea rcx, [rsp + 0x58]
call fcn.140004320
jmp 0x14002834b
lea rcx, [rbp - 0x10]
mov rax, r15
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140028330
mov r8d, eax
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x58]
call fcn.140004720
mov rdx, qword [0x1416b9fb8]
mov rbx, qword [rsp + 0x58]
test rdx, rdx
je 0x14002837a
cmp dword [rbx - 0x10], 0
jl 0x14002837a
mov rcx, rbx
call fcn.1401f4b58
test rax, rax
je 0x14002837a
sub rax, rbx
sar rax, 1
cmp eax, r15d
jne 0x1400283b4
mov rdx, qword [0x1416b9fc0]
test rdx, rdx
je 0x1400284bd
cmp dword [rbx - 0x10], 0
jl 0x1400284bd
mov rcx, rbx
call fcn.1401f4b58
test rax, rax
je 0x1400284bd
sub rax, rbx
sar rax, 1
cmp eax, r15d
je 0x1400284bd
lea rax, [0x1402a214c]
mov qword [rsp + 0x70], r14
lea r8, [rbp - 0x60]
mov qword [rbp - 0x78], rax
lea rdx, str.Found_corresponding_power_plan_GUID:__s
mov dword [rsp + 0x78], 0x402
lea rcx, [rsp + 0x70]
mov qword [rbp - 0x80], r12
mov dword [rbp - 0x70], 3
call fcn.140008d50
cmp qword [rsi + 0x20], 0
mov r12, qword [rsi + 8]
jne 0x140028475
mov ecx, dword [rsi + 0x28]
test rcx, rcx
jne 0x140028404
mov rcx, rdi
jmp 0x14002841e
xor edx, edx
mov rax, r15
div rcx
cmp rax, 0x18
jb 0x1400285d2
lea rcx, [rcx + rcx*2]
shl rcx, 3
add rcx, 8
call fcn.1402050b4
test rax, rax
je 0x1400285d2
mov rcx, qword [rsi + 0x18]
mov qword [rax], rcx
mov qword [rsi + 0x18], rax
mov r8d, dword [rsi + 0x28]
lea ecx, [r8 - 1]
lea rdx, [rcx*2 + 1]
add rdx, rcx
sub r8d, 1
lea rdx, [rax + rdx*8]
js 0x140028475
nop dword [rax + rax]
mov rax, qword [rsi + 0x20]
mov qword [rdx], rax
mov qword [rsi + 0x20], rdx
sub rdx, 0x18
sub r8d, 1
jns 0x140028460
mov r14, qword [rsi + 0x20]
lea rdx, [rbp - 0x60]
mov rdi, qword [r14]
lea rcx, [r14 + 0x10]
call fcn.1400044b0
mov qword [rsi + 0x20], rdi
xor edi, edi
mov qword [r14], rdi
mov qword [r14 + 8], r12
inc qword [rsi + 0x10]
mov rax, qword [rsi + 8]
test rax, rax
je 0x1400284a8
mov qword [rax], r14
jmp 0x1400284ab
mov qword [rsi], r14
mov qword [rsi + 8], r14
lea r12, str.__TecoPower::CRegUtil::GetCleanupPowerSchemeListFromScheme_
lea r14, str.c:users_scddocumentsmyworkproject__dynabooksystemdriverdsd_for_tos6208_v6dsd_branch_dev_6.01.0029.xxcentennial_rs5dynabookecoservice_tecopower_regutil.cpp
lea rdx, [rbx - 0x18]
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400284d7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov ebx, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
lea r9, [rsp + 0x40]
xor eax, eax
mov qword [rsp + 0x38], rdi
inc ebx
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
lea r8, [rbp - 0x60]
mov edx, ebx
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x44], ebx
mov dword [rsp + 0x40], 0x4a
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rax
mov word [rbp - 0x18], ax
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x140028246
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rsp + 0x68]
mov eax, r15d
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14002857a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [r13]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], r15d
sub r15d, 1
jg 0x140028597
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r12, qword [rsp + 0x528]
mov eax, 1
mov r14, qword [rsp + 0x520]
mov rbx, qword [rsp + 0x570]
mov rcx, qword [rbp + 0x410]
xor rcx, rsp
call fcn.140072680
add rsp, 0x530
pop r15
pop r13
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x8007000e
call fcn.140002ad0
int3
mov ecx, 0x80004005
call fcn.140002ad0
int3
mov ecx, 0x80004005
call fcn.140002ad0
int3