Function at 0x140049b20
Capabilities:
Query or enumerate registry key

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov r13, rcx
xor r14d, r14d
mov dword [rbp - 0x10], r14d
mov qword [rbp - 8], r14
mov qword [rbp - 0x38], r14
lea rax, [rbp - 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.systemcurrentcontrolsetenumusb
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140049e37
mov rbx, qword [rbp - 0x38]
mov qword [rbp - 0x18], rbx
mov dword [rbp - 0x10], r14d
mov r15d, r14d
mov r12d, r14d
mov dword [rbp + 0x48], 0x100
mov ecx, 0x202
call fcn.140003f10
mov rdi, rax
lea rax, [rbp - 0x28]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x48]
mov r8, rdi
mov edx, r15d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140049e16
call fcn.1400102e4
test rax, rax
je 0x140049e60
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rbp + 0x50], rax
test rdi, rdi
je 0x140049c22
cmp rdi, 0x10000
jae 0x140049c0e
movzx edx, di
lea rcx, [rbp + 0x50]
call fcn.140010b40
jmp 0x140049c32
mov r8, 0xffffffffffffffff
inc r8
cmp word [rdi + r8*2], 0
jne 0x140049c15
jmp 0x140049c25
mov r8d, r14d
mov rdx, rdi
lea rcx, [rbp + 0x50]
call fcn.140002b2c
nop
mov rbx, qword [rbp + 0x50]
movsxd rsi, dword [rbx - 0x10]
test esi, esi
js 0x140049e76
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, esi
or eax, ecx
jge 0x140049c62
mov edx, esi
lea rcx, [rbp + 0x50]
call fcn.140002ac8
mov rbx, qword [rbp + 0x50]
lea eax, [rsi + 1]
movsxd rdx, eax
mov rcx, rbx
call fcn.14022f7c4
cmp esi, dword [rbx - 0xc]
jg 0x140049e76
mov dword [rbx - 0x10], esi
mov word [rbx + rsi*2], r14w
lea rcx, [rbx - 0x18]
call fcn.140002cec
lea rsi, [rax + 0x18]
mov qword [rbp - 0x40], rsi
mov eax, 0xffffffff
lock xadd dword [rbx - 8], eax
sub eax, 1
jg 0x140049caf
mov rcx, qword [rbx - 0x18]
mov rax, qword [rcx]
lea rdx, [rbx - 0x18]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp dword [rsi - 0x10], 0
jl 0x140049dda
lea rdx, str.VID_
mov rbx, qword [rbp - 0x40]
mov rcx, rbx
call fcn.140225168
test rax, rax
je 0x140049dde
sub rax, rsi
sar rax, 1
cmp eax, 0xffffffff
je 0x140049dde
cmp dword [rsi - 0x10], 0
jl 0x140049dde
lea rdx, str.PID_
mov rcx, rbx
call fcn.140225168
test rax, rax
je 0x140049dde
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
je 0x140049dde
lea rax, [rbp + 0x58]
mov qword [rbp - 0x20], rax
call fcn.1400102e4
test rax, rax
je 0x140049e6b
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rbp + 0x58], rax
test rdi, rdi
je 0x140049d6d
cmp rdi, 0x10000
jae 0x140049d58
movzx edx, di
lea rcx, [rbp + 0x58]
call fcn.140010b40
jmp 0x140049d7d
mov r8, 0xffffffffffffffff
nop
inc r8
cmp word [rdi + r8*2], 0
jne 0x140049d60
jmp 0x140049d70
mov r8d, r14d
mov rdx, rdi
lea rcx, [rbp + 0x58]
call fcn.140002b2c
nop
lea rdx, [rbp + 0x58]
lea rcx, [rbp - 0x18]
call fcn.1400495e0
test al, al
je 0x140049dde
mov r8d, dword [0x140329d38]
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x40]
call fcn.14004a280
nop
mov r9, qword [rax]
mov r8d, r12d
mov edx, 0x117c2
mov rcx, qword [r13]
call fcn.14001e7c0
inc r12d
mov rdx, qword [rbp - 0x30]
add rdx, 0xffffffffffffffe8
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140049dda
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rbp - 0x40]
mov dword [rbp + 0x48], 0x100
inc r15d
lea rdx, [rbx - 0x18]
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jle 0x140049e04
mov rbx, qword [rbp - 0x38]
jmp 0x140049ba0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rbp - 0x38]
jmp 0x140049ba0
test rdi, rdi
je 0x140049e23
mov rcx, rdi
call fcn.1400041d4
test rbx, rbx
je 0x140049e33
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140049e37
mov r14, qword [rbp - 0x18]
test r14, r14
je 0x140049e45
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.140002dfc
nop
mov ecx, 0x80004005
call fcn.140002dfc
nop
mov ecx, 0x80070057
call fcn.140002dfc
int3