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

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xf8
mov rbx, rdx
xor dil, dil
mov byte [rbp + 0x67], dil
xor r14d, r14d
mov qword [rbp - 0x21], r14
mov dword [rbp - 0x19], r14d
mov qword [rbp - 0x11], r14
mov qword [rbp - 1], r14
mov dword [rbp + 7], r14d
mov qword [rbp + 0xf], r14
mov qword [rbp - 0x79], r14
lea rax, [rbp - 0x79]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, qword [rdx]
mov rcx, qword [rcx]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea r15, [r14 - 1]
test eax, eax
jne 0x140049ded
mov rsi, qword [rbp - 0x79]
mov qword [rbp - 0x21], rsi
mov dword [rbp - 0x19], r14d
mov r12d, r14d
mov dword [rbp + 0x77], r14d
mov ecx, 0x202
call fcn.140003bd0
mov r13, rax
mov qword [rbp - 0x59], rax
mov dword [rsp + 0x44], 0x100
nop dword [rax]
lea rax, [rbp - 9]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x44]
mov r8, r13
mov edx, r12d
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140049dc4
mov rbx, r14
mov qword [rbp - 0x39], rbx
mov dword [rbp - 0x31], r14d
mov qword [rbp - 0x29], r14
mov qword [rsp + 0x58], r14
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, r13
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140049d9e
mov rdi, qword [rsp + 0x58]
mov rbx, rdi
mov qword [rbp - 0x39], rbx
mov dword [rbp - 0x31], r14d
mov ecx, 0x202
call fcn.140003bd0
mov r13, rax
mov dword [rbp + 0x7f], 0x200
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x71]
xor r8d, r8d
lea rdx, str.service
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140049d74
mov eax, dword [rbp - 0x71]
dec eax
cmp eax, 1
ja 0x140049d74
mov ecx, dword [rbp + 0x7f]
test r13, r13
je 0x140049abb
test ecx, ecx
je 0x140049ab6
test cl, 1
jne 0x140049d79
mov eax, ecx
shr rax, 1
cmp word [r13 + rax*2 - 2], 0
je 0x140049abb
jmp 0x140049d79
mov word [r13], r14w
shr ecx, 1
mov word [r13 + rcx*2], r14w
call fcn.140010070
mov rcx, rax
test rax, rax
je 0x140049e31
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x61], rax
mov r8, r13
lea rdx, str.systemcurrentcontrolset_services_senum
lea rcx, [rbp - 0x61]
call fcn.140044d60
mov rbx, r14
mov qword [rbp - 0x51], rbx
mov dword [rbp - 0x49], r14d
mov qword [rbp - 0x41], r14
mov qword [rsp + 0x50], r14
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, qword [rbp - 0x61]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140049d3a
mov rsi, qword [rsp + 0x50]
mov qword [rbp - 0x51], rsi
mov dword [rbp - 0x49], r14d
mov r12d, r14d
call fcn.140010070
mov rcx, rax
test rax, rax
je 0x140049e47
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
xor r8d, r8d
lea rdx, [0x1402d0d84]
lea rcx, [rsp + 0x48]
call fcn.140044d60
mov ecx, 0x202
call fcn.140003bd0
mov rdi, rax
nop word [rax + rax]
mov dword [rsp + 0x40], 0x200
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x6d]
xor r8d, r8d
mov rbx, qword [rsp + 0x48]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140049cf5
mov eax, dword [rbp - 0x6d]
dec eax
cmp eax, 1
ja 0x140049cf5
mov ecx, dword [rsp + 0x40]
test rdi, rdi
je 0x140049c02
test ecx, ecx
je 0x140049bfe
test cl, 1
jne 0x140049cf5
mov eax, ecx
shr rax, 1
cmp word [rdi + rax*2 - 2], 0
jne 0x140049cf5
jmp 0x140049c02
mov word [rdi], r14w
shr ecx, 1
mov word [rdi + rcx*2], r14w
call fcn.140010070
test rax, rax
je 0x140049e3c
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rbp - 0x69], rax
test rdi, rdi
je 0x140049c5d
cmp rdi, 0x10000
jae 0x140049c44
movzx edx, di
lea rcx, [rbp - 0x69]
call fcn.1400108d0
jmp 0x140049c6d
mov r8, r15
nop word [rax + rax]
inc r8
cmp word [rdi + r8*2], 0
jne 0x140049c50
jmp 0x140049c60
mov r8d, r14d
mov rdx, rdi
lea rcx, [rbp - 0x69]
call fcn.140002b6c
nop
mov rax, qword [rbp + 0x6f]
mov rdx, qword [rax]
mov rbx, qword [rbp - 0x69]
test rdx, rdx
jne 0x140049c82
mov esi, r15d
jmp 0x140049ca8
cmp dword [rbx - 0x10], 0
jge 0x140049c8d
mov esi, r15d
jmp 0x140049ca8
mov rcx, rbx
call fcn.1402250e8
mov rsi, rax
test rax, rax
jne 0x140049ca2
mov esi, r15d
jmp 0x140049ca8
sub rsi, rbx
sar rsi, 1
lea rdx, [rbx - 0x18]
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140049cc2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test esi, esi
jns 0x140049ce7
inc r12d
mov r8d, r12d
lea rdx, [0x1402d0d84]
lea rcx, [rsp + 0x48]
call fcn.140044d60
mov rsi, qword [rsp + 0x50]
jmp 0x140049b90
mov byte [rbp + 0x67], 1
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
test rdi, rdi
je 0x140049d02
mov rcx, rdi
call fcn.140003e94
test rsi, rsi
je 0x140049d14
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rbp - 0x51], r14
mov dword [rbp - 0x49], r14d
lea rdx, [rbx - 0x18]
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140049d32
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r12d, dword [rbp + 0x77]
mov rbx, qword [rbp - 0x51]
test rbx, rbx
je 0x140049d49
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [rbp - 0x61]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140049d67
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rsi, qword [rbp - 0x79]
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rbp - 0x39]
test r13, r13
je 0x140049d81
mov rcx, r13
call fcn.140003e94
test rdi, rdi
je 0x140049d96
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbx, r14
mov qword [rbp - 0x39], rbx
mov r13, qword [rbp - 0x59]
movzx edi, byte [rbp + 0x67]
inc r12d
mov dword [rbp + 0x77], r12d
mov dword [rsp + 0x44], 0x100
test rbx, rbx
je 0x140049dbb
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test dil, dil
je 0x1400499c0
test r13, r13
je 0x140049dd1
mov rcx, r13
call fcn.140003e94
test rsi, rsi
je 0x140049de5
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rbp - 0x21], r14
jmp 0x140049de9
mov r14, qword [rbp - 0x21]
mov rbx, qword [rbp + 0x6f]
test r14, r14
je 0x140049dfc
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [rbx]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], r15d
sub r15d, 1
jg 0x140049e19
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
movzx eax, dil
add rsp, 0xf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x80004005
call fcn.140002e3c
nop
mov ecx, 0x80004005
call fcn.140002e3c
nop
mov ecx, 0x80004005
call fcn.140002e3c
int3