Function at 0x140021090
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
xor ebp, ebp
mov r12d, ebp
lea rax, [0x14007ee30]
mov qword [r11 - 0x50], rax
mov dword [rsp + 0x68], ebp
mov qword [r11 - 0x48], rbp
call fcn.1400280cc
mov rcx, rax
mov eax, ebp
test rcx, rcx
setne al
test eax, eax
jne 0x1400210ea
mov ecx, 0x80004005
call fcn.140003280
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
call fcn.1400280cc
mov rcx, rax
mov eax, ebp
test rcx, rcx
setne al
test eax, eax
jne 0x140021118
mov ecx, 0x80004005
call fcn.140003280
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rdx, str.SoftwareEPSONEPSON_ScanSoftwareInfo
or rsi, 0xffffffffffffffff
test rdx, 0xffffffffffff0000
jne 0x14002115c
movzx edi, dx
mov ecx, edi
call fcn.1400280b8
test rax, rax
je 0x140021179
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140003060
jmp 0x140021179
xor eax, eax
mov rcx, rsi
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x40]
call fcn.1400036f0
nop
call fcn.1400280cc
mov rcx, rax
mov eax, ebp
test rcx, rcx
setne al
test eax, eax
jne 0x140021198
mov ecx, 0x80004005
call fcn.140003280
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
lea rdx, str.Default
test rdx, 0xffffffffffff0000
jne 0x1400211d8
movzx edi, dx
mov ecx, edi
call fcn.1400280b8
test rax, rax
je 0x1400211f5
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.140003060
jmp 0x1400211f5
xor eax, eax
mov rcx, rsi
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x38]
call fcn.1400036f0
nop
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x48]
call fcn.140002b10
nop
mov rdx, qword [rax]
lea rdi, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rdi, rbx
je 0x1400212c5
cmp dword [rbx + 0x10], 0
jl 0x1400212b6
mov rcx, qword [rdi]
cmp rcx, qword [rbx]
jne 0x1400212b6
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi + 0x10], 0
jl 0x140021252
cmp rax, qword [rdi]
jne 0x140021252
mov rbp, rdi
lock add dword [rdi + 0x10], 1
jmp 0x140021291
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi + 8]
call qword [rax]
mov rbp, rax
test rax, rax
jne 0x14002126e
call fcn.140003050
int3
mov eax, dword [rdi + 8]
mov dword [rbp + 8], eax
mov eax, dword [rdi + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [rdi + 0x18]
add rdx, rdx
lea rcx, [rbp + 0x18]
call fcn.1400525a0
mov eax, esi
lock xadd dword [rbx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400212ab
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x1400212c5
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.1400036f0
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400212e5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, rsi
lea r13, [0x14007e0bc]
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r15, [rcx - 1]
mov rbp, r13
mov rdi, qword [rsp + 0x30]
sub rbp, rdi
sar rbp, 1
mov r14d, dword [rdi - 0x10]
lea ebx, [r14 + rcx - 1]
mov edx, 1
sub edx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, ebx
or eax, edx
jge 0x140021337
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.140003380
mov rdi, qword [rsp + 0x30]
cmp rbp, r14
ja 0x140021340
lea r13, [rdi + rbp*2]
movsxd rdx, r15d
add rdx, rdx
lea rcx, [rdi + r14*2]
mov r9, rdx
mov r8, r13
call fcn.1400525a0
test ebx, ebx
js 0x140021555
cmp ebx, dword [rdi - 0xc]
jg 0x140021555
mov dword [rdi - 0x10], ebx
movsxd rax, ebx
mov word [rdi + rax*2], 0
mov r13, qword [rsp + 0xb8]
mov r13, qword [r13]
movsxd r15, dword [r13 - 0x10]
mov rbp, r13
sub rbp, rdi
sar rbp, 1
mov r14d, dword [rdi - 0x10]
lea ebx, [r14 + r15]
mov ecx, 1
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, ebx
or eax, ecx
jge 0x1400213b5
mov edx, ebx
lea rcx, [rsp + 0x30]
call fcn.140003380
mov rdi, qword [rsp + 0x30]
cmp rbp, r14
ja 0x1400213be
lea r13, [rdi + rbp*2]
mov rdx, r15
add rdx, rdx
lea rcx, [rdi + r14*2]
mov r9, rdx
mov r8, r13
call fcn.1400525a0
test ebx, ebx
js 0x14002154a
cmp ebx, dword [rdi - 0xc]
jg 0x14002154a
mov dword [rdi - 0x10], ebx
movsxd rax, ebx
mov word [rdi + rax*2], 0
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, rdi
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor edi, edi
mov ecx, edi
test eax, eax
sete cl
mov dword [rsp + 0x68], ecx
mov dword [rsp + 0x6c], 0x20019
test ecx, ecx
je 0x140021499
mov dword [rsp + 0xc0], edi
mov dword [rsp + 0xc8], 4
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.UpdateSetting
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140021485
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x60], rdi
mov dword [rsp + 0x68], edi
cmp dword [rsp + 0xc0], edi
mov eax, 1
cmovne r12d, eax
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400214ba
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400214db
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400214fc
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rax, [0x14007ee30]
mov qword [rsp + 0x58], rax
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x14002151d
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x60], rdi
mov dword [rsp + 0x68], edi
mov rax, qword [rsp + 0xb8]
mov rdx, qword [rax]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], esi
add esi, 0xffffffff
test esi, esi
jg 0x140021545
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r12d
jmp 0x140021560
mov ecx, 0x80070057
call fcn.140003280
int3
mov ecx, 0x80070057
call fcn.140003280
nop
mov rbx, qword [rsp + 0xb0]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret