Function at 0x1400021e0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push r12
push r13
lea rbp, [rsp - 0x4a0]
sub rsp, 0x5a0
mov rax, qword [0x14013c170]
xor rax, rsp
mov qword [rbp + 0x490], rax
lea rax, [rsp + 0x40]
movzx r12d, cl
lea rdx, str.HARDWAREDEVICEMAPVIDEO
xor r13d, r13d
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x40], r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140002460
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140002460
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x34]
lea rdx, str.ObjectNumberList
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x5c8], rbx
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x30], 0x400
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x5d8], rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1400022a9
cmp dword [rsp + 0x34], 3
jne 0x1400022a9
mov ebx, dword [rsp + 0x30]
shr ebx, 2
jmp 0x14000231c
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x48]
lea rdx, str.MaxObjectNumber
xor r8d, r8d
mov dword [rsp + 0x48], r13d
mov dword [rsp + 0x30], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140002320
cmp dword [rsp + 0x34], 4
jne 0x140002320
mov eax, dword [rsp + 0x48]
mov ebx, 0x100
inc eax
cmp eax, ebx
cmovbe ebx, eax
mov eax, r13d
test ebx, ebx
je 0x140002320
lea rcx, [rsp + 0x50]
nop dword [rax + rax]
mov dword [rcx], eax
inc eax
add rcx, 4
cmp eax, ebx
jb 0x140002310
test ebx, ebx
jne 0x14000232a
mov dword [rsp + 0x50], r13d
mov ebx, 1
mov edi, r13d
test ebx, ebx
je 0x14000242b
mov qword [rsp + 0x5d0], rsi
lea rsi, [rsp + 0x50]
mov r9d, dword [rsi]
lea r8, str.DeviceVideo_u
lea rcx, [rbp + 0x350]
mov edx, 0x40
call sym.VBoxControl.exe_RTStrPrintf
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x390]
lea r9, [rsp + 0x34]
lea rdx, [rbp + 0x350]
xor r8d, r8d
mov dword [rsp + 0x30], 0x100
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140002415
cmp dword [rsp + 0x34], 1
jne 0x140002415
lea r8d, [rax + 0x11]
lea rdx, str.REGISTRYMachine
lea rcx, [rbp + 0x390]
call fcn.140005ea8
test eax, eax
jne 0x140002415
movzx eax, r12b
lea rdx, [rbp + 0x3a2]
mov rcx, 0xffffffff80000002
neg al
lea rax, [rsp + 0x38]
sbb r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
and r9d, 0x20006
or r9d, 0x20019
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140002415
mov rcx, qword [rsp + 0x38]
call fcn.140002140
test eax, eax
jns 0x140002423
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x38], r13
inc edi
add rsi, 4
cmp edi, ebx
jb 0x140002342
mov rsi, qword [rsp + 0x5d0]
mov rdi, qword [rsp + 0x5d8]
mov rbx, qword [rsp + 0x5c8]
cmp qword [rsp + 0x38], r13
jne 0x14000244e
lea rcx, str.Error_opening_video_registry_key__n
call fcn.140001820
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, qword [rsp + 0x38]
jmp 0x14000246e
lea rcx, str.Error_opening_video_device_map_registry_key__n
call fcn.140001820
xor eax, eax
mov rcx, qword [rbp + 0x490]
xor rcx, rsp
call fcn.1400057e0
add rsp, 0x5a0
pop r13
pop r12
pop rbp
ret