Function at 0x140049750
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 0x140049c1d
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 0x140049bf4
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 0x140049bce
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 0x140049ba4
mov eax, dword [rbp - 0x71]
dec eax
cmp eax, 1
ja 0x140049ba4
mov ecx, dword [rbp + 0x7f]
test r13, r13
je 0x1400498eb
test ecx, ecx
je 0x1400498e6
test cl, 1
jne 0x140049ba9
mov eax, ecx
shr rax, 1
cmp word [r13 + rax*2 - 2], 0
je 0x1400498eb
jmp 0x140049ba9
mov word [r13], r14w
shr ecx, 1
mov word [r13 + rcx*2], r14w
call fcn.140010070
mov rcx, rax
test rax, rax
je 0x140049c61
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.140044b90
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 0x140049b6a
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 0x140049c77
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.140044b90
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 0x140049b25
mov eax, dword [rbp - 0x6d]
dec eax
cmp eax, 1
ja 0x140049b25
mov ecx, dword [rsp + 0x40]
test rdi, rdi
je 0x140049a32
test ecx, ecx
je 0x140049a2e
test cl, 1
jne 0x140049b25
mov eax, ecx
shr rax, 1
cmp word [rdi + rax*2 - 2], 0
jne 0x140049b25
jmp 0x140049a32
mov word [rdi], r14w
shr ecx, 1
mov word [rdi + rcx*2], r14w
call fcn.140010070
test rax, rax
je 0x140049c6c
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rbp - 0x69], rax
test rdi, rdi
je 0x140049a8d
cmp rdi, 0x10000
jae 0x140049a74
movzx edx, di
lea rcx, [rbp - 0x69]
call fcn.1400108d0
jmp 0x140049a9d
mov r8, r15
nop word [rax + rax]
inc r8
cmp word [rdi + r8*2], 0
jne 0x140049a80
jmp 0x140049a90
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 0x140049ab2
mov esi, r15d
jmp 0x140049ad8
cmp dword [rbx - 0x10], 0
jge 0x140049abd
mov esi, r15d
jmp 0x140049ad8
mov rcx, rbx
call fcn.140224ce8
mov rsi, rax
test rax, rax
jne 0x140049ad2
mov esi, r15d
jmp 0x140049ad8
sub rsi, rbx
sar rsi, 1
lea rdx, [rbx - 0x18]
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140049af2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test esi, esi
jns 0x140049b17
inc r12d
mov r8d, r12d
lea rdx, [0x1402d0d84]
lea rcx, [rsp + 0x48]
call fcn.140044b90
mov rsi, qword [rsp + 0x50]
jmp 0x1400499c0
mov byte [rbp + 0x67], 1
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
test rdi, rdi
je 0x140049b32
mov rcx, rdi
call fcn.140003e94
test rsi, rsi
je 0x140049b44
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 0x140049b62
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 0x140049b79
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 0x140049b97
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 0x140049bb1
mov rcx, r13
call fcn.140003e94
test rdi, rdi
je 0x140049bc6
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 0x140049beb
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test dil, dil
je 0x1400497f0
test r13, r13
je 0x140049c01
mov rcx, r13
call fcn.140003e94
test rsi, rsi
je 0x140049c15
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rbp - 0x21], r14
jmp 0x140049c19
mov r14, qword [rbp - 0x21]
mov rbx, qword [rbp + 0x6f]
test r14, r14
je 0x140049c2c
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 0x140049c49
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