Function at 0x140030e40
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x58
xor esi, esi
xor ecx, ecx
mov qword [rbp + 0x40], rsi
mov qword [rbp - 0x28], rsi
mov qword [rbp - 0x20], rsi
call fcn.1402055d0
mov rdx, rax
mov rbx, rax
call fcn.14002cb80
lea rax, [rbp + 0x38]
mov qword [rbp + 0x38], rsi
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [0x1402a4120]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140030f13
mov rdi, qword [rbp + 0x38]
lea rax, [rbp + 0x28]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x30]
lea rax, [rbp - 0x18]
mov dword [rbp + 0x28], 8
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.AutoSetBatteryLastDate
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140030f05
cmp dword [rbp + 0x30], 3
jne 0x140030f05
test rdi, rdi
je 0x140030eea
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test rdi, rdi
mov rcx, rsi
cmove rcx, rdi
mov rdi, qword [rbp - 0x18]
test rcx, rcx
je 0x140030f17
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140030f17
test rdi, rdi
je 0x140030f13
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rbp + 0x28]
lea r8, [rbp + 0x40]
mov rdx, rdi
call fcn.14002ca50
test eax, eax
je 0x140030f31
cmp rbx, qword [rbp + 0x40]
jl 0x1400310af
lea rax, [rbp + 0x38]
mov qword [rbp + 0x38], rsi
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [0x1402a4120]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140030fd4
mov rdi, qword [rbp + 0x38]
lea rax, [rbp + 0x28]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x30]
lea rax, [rbp + 0x40]
mov dword [rbp + 0x28], 8
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.AutoSetBatteryLast2Date
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140030fc6
cmp dword [rbp + 0x30], 3
jne 0x140030fc6
test rdi, rdi
je 0x140030fab
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test rdi, rdi
mov rcx, rsi
cmove rcx, rdi
mov rdi, qword [rbp + 0x40]
test rcx, rcx
je 0x140030fd8
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140030fd8
test rdi, rdi
je 0x140030fd4
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rbp + 0x28]
lea r8, [rbp - 0x28]
mov rdx, rdi
call fcn.14002ca50
test eax, eax
je 0x140030ff2
cmp rbx, qword [rbp - 0x28]
jl 0x1400310af
lea rax, [rbp + 0x38]
mov qword [rbp + 0x38], rsi
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [0x1402a4120]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140031095
mov rdi, qword [rbp + 0x38]
lea rax, [rbp + 0x28]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x30]
lea rax, [rbp + 0x40]
mov dword [rbp + 0x28], 8
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.AutoSetBatteryLast3Date
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140031087
cmp dword [rbp + 0x30], 3
jne 0x140031087
test rdi, rdi
je 0x14003106c
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test rdi, rdi
mov rcx, rsi
cmove rcx, rdi
mov rdi, qword [rbp + 0x40]
test rcx, rcx
je 0x140031099
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140031099
test rdi, rdi
je 0x140031095
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rbp + 0x28]
lea r8, [rbp - 0x20]
mov rdx, rdi
call fcn.14002ca50
test eax, eax
je 0x1400310ba
cmp rbx, qword [rbp - 0x20]
jge 0x1400310ba
mov eax, esi
add rsp, 0x58
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov eax, 1
add rsp, 0x58
pop rdi
pop rsi
pop rbx
pop rbp
ret