Function at 0x140084030
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2c0]
sub rsp, 0x3c0
mov rax, qword [0x140400788]
xor rax, rsp
mov qword [rbp + 0x2b0], rax
mov r13, r8
mov dword [rsp + 0x34], edx
mov rbx, rcx
mov qword [rsp + 0x40], rcx
mov qword [rbp + 0x60], rcx
mov dword [rsp + 0x30], 1
mov cl, 1
call fcn.140247bdc
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x50]
lea rdx, str.Unknown_Joystick
mov rcx, rbx
call fcn.140041950
nop
mov dword [rsp + 0x30], 1
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400840c6
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, rax
test rax, rax
je 0x1400840c6
mov rax, qword [rax]
mov edx, 1
call qword [rax]
xorps xmm0, xmm0
movups xmmword [rbp + 0x68], xmm0
xor r15d, r15d
mov qword [rbp + 0x78], r15
mov qword [rbp + 0x80], 7
mov word [rbp + 0x68], r15w
lea r8d, [r15 + 0x38]
lea rdx, str.SystemCurrentControlSetControlMediaResourcesJoystick
lea rcx, [rbp + 0x68]
call fcn.140082850
mov r14, qword [rbp + 0x78]
movabs rbx, 0x7ffffffffffffffe
mov rsi, qword [rbp + 0x80]
cmp r14, rsi
jae 0x140084134
lea rax, [r14 + 1]
mov qword [rbp + 0x78], rax
lea rax, [rbp + 0x68]
cmp rsi, 8
cmovae rax, qword [rbp + 0x68]
mov dword [rax + r14*2], 0x5c
jmp 0x140084207
mov rax, rbx
sub rax, r14
cmp rax, 1
jb 0x140084c78
lea r12, [r14 + 1]
mov rdi, r12
or rdi, 7
cmp rdi, rbx
jbe 0x140084159
mov rdi, rbx
jmp 0x14008417a
mov rcx, rsi
shr rcx, 1
mov rax, rbx
sub rax, rcx
cmp rsi, rax
jbe 0x14008416f
mov rdi, rbx
jmp 0x14008417a
lea rax, [rsi + rcx]
cmp rdi, rax
cmovb rdi, rax
lea rdx, [rdi + 1]
lea rcx, [rbp + 0x68]
call fcn.140041e50
mov r15, rax
mov qword [rbp + 0x78], r12
mov qword [rbp + 0x80], rdi
add r14, r14
mov r8, r14
mov rcx, rax
cmp rsi, 8
jb 0x1400841ef
mov rdi, qword [rbp + 0x68]
mov rdx, rdi
call fcn.14024aa30
mov dword [r14 + r15], 0x5c
lea rdx, [rsi*2 + 2]
cmp rdx, 0x1000
jb 0x1400841e5
add rdx, 0x27
mov rcx, qword [rdi - 8]
sub rdi, rcx
lea rax, [rdi - 8]
cmp rax, 0x1f
ja 0x140084c7e
mov rdi, rcx
mov rcx, rdi
call fcn.140249860
jmp 0x140084200
lea rdx, [rbp + 0x68]
call fcn.14024aa30
mov dword [r14 + r15], 0x5c
mov qword [rbp + 0x68], r15
xor r15d, r15d
lea rdx, [r13 + 0x90]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rdx + r8*2], 0
jne 0x140084215
lea rcx, [rbp + 0x68]
call fcn.1400826d0
mov r14, qword [rbp + 0x78]
mov rsi, qword [rbp + 0x80]
cmp r14, rsi
jae 0x14008425b
lea rax, [r14 + 1]
mov qword [rbp + 0x78], rax
lea rax, [rbp + 0x68]
cmp rsi, 8
cmovae rax, qword [rbp + 0x68]
mov dword [rax + r14*2], 0x5c
jmp 0x14008432e
mov rax, rbx
sub rax, r14
cmp rax, 1
jb 0x140084c78
lea r13, [r14 + 1]
mov rdi, r13
or rdi, 7
cmp rdi, rbx
jbe 0x140084280
mov rdi, rbx
jmp 0x1400842a1
mov rcx, rsi
shr rcx, 1
mov rax, rbx
sub rax, rcx
cmp rsi, rax
jbe 0x140084296
mov rdi, rbx
jmp 0x1400842a1
lea rax, [rsi + rcx]
cmp rdi, rax
cmovb rdi, rax
lea rdx, [rdi + 1]
lea rcx, [rbp + 0x68]
call fcn.140041e50
mov r15, rax
mov qword [rbp + 0x78], r13
mov qword [rbp + 0x80], rdi
add r14, r14
mov r8, r14
mov rcx, rax
cmp rsi, 8
jb 0x140084316
mov rdi, qword [rbp + 0x68]
mov rdx, rdi
call fcn.14024aa30
mov dword [r14 + r15], 0x5c
lea rdx, [rsi*2 + 2]
cmp rdx, 0x1000
jb 0x14008430c
add rdx, 0x27
mov rcx, qword [rdi - 8]
sub rdi, rcx
lea rax, [rdi - 8]
cmp rax, 0x1f
ja 0x140084c7e
mov rdi, rcx
mov rcx, rdi
call fcn.140249860
jmp 0x140084327
lea rdx, [rbp + 0x68]
call fcn.14024aa30
mov dword [r14 + r15], 0x5c
mov qword [rbp + 0x68], r15
xor r15d, r15d
mov r8d, 0x17
lea rdx, str.CurrentJoystickSettings
lea rcx, [rbp + 0x68]
call fcn.1400826d0
mov r13, 0xffffffff80000001
lea rdx, [rbp + 0x68]
cmp qword [rbp + 0x80], 8
cmovae rdx, qword [rbp + 0x68]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400844d5
mov r13, 0xffffffff80000002
lea rdx, [rbp + 0x68]
cmp qword [rbp + 0x80], 8
cmovae rdx, qword [rbp + 0x68]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400844d5
mov edx, eax
lea rcx, [rbp + 0x88]
call fcn.140084cb0
mov rbx, rax
call fcn.14027f1d0
mov rcx, rax
lea rdx, str.Unable_to_open_registry_for_joystick_at_index
call fcn.140004d50
mov rcx, rax
mov edx, dword [rsp + 0x34]
call fcn.1400134d4
mov rcx, rax
lea rdx, [0x1402959f0]
call fcn.140004d50
mov rdx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x140084409
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140007ae4
mov rcx, rax
call fcn.14000d7d4
nop
mov rdx, qword [rbp + 0xa0]
cmp rdx, 0x10
jb 0x140084460
inc rdx
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008445a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140084c84
call fcn.140249860
nop
mov rdx, qword [rbp + 0x80]
cmp rdx, 8
jb 0x1400844a3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x68]
cmp rdx, 0x1000
mov rax, rcx
jb 0x14008449e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140084c6c
call fcn.140249860
mov rbx, qword [rsp + 0x40]
mov rax, rbx
mov rcx, qword [rbp + 0x2b0]
xor rcx, rsp
call fcn.1402499e0
mov rbx, qword [rsp + 0x418]
add rsp, 0x3c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rax, [0x1402a4800]
mov qword [rsp + 0x70], rax
mov qword [rbp], r15
mov qword [rbp + 0x28], r15
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x30], xmm0
mov dword [rsp + 0x30], 3
lea rax, vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rbp - 8], rax
mov dword [rbp - 0xc], 0x78
xor r8d, r8d
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 8]
call fcn.140084e40
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rsi, vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x70], rsi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x6c], edx
lea rax, vtable.std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rsp + 0x78], rax
mov ecx, 0x10
call fcn.140249824
mov rdi, rax
test rax, rax
je 0x140084570
mov cl, 1
call fcn.140247bdc
mov qword [rdi + 8], rax
jmp 0x140084573
mov rdi, r15
mov qword [rbp - 0x28], rdi
lea rax, [rbp - 0x80]
mov qword [rbp - 0x70], rax
lea rax, [rbp - 0x78]
mov qword [rbp - 0x68], rax
lea rax, [rbp - 0x60]
mov qword [rbp - 0x50], rax
lea rax, [rbp - 0x58]
mov qword [rbp - 0x48], rax
lea rax, [rbp - 0x40]
mov qword [rbp - 0x38], rax
lea rax, [rbp - 0x3c]
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x58], r15
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x60], r15
lea rax, vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x20], r15
mov dword [rbp - 0x18], 4
mov r14d, dword [rsp + 0x34]
lea edx, [r14 + 1]
lea rcx, [rsp + 0x70]
call fcn.140080ac0
mov r8d, 8
lea rdx, str.Joystick
lea rcx, [rbp + 0x68]
call fcn.140082850
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x88], xmm0
movdqa xmm1, xmmword [0x1402a4df0]
movdqu xmmword [rbp + 0x98], xmm1
mov word [rbp + 0x88], r15w
mov dword [rsp + 0x30], 0x13
movups xmmword [rsp + 0x50], xmm0
mov ecx, dword [rbp - 0x18]
mov eax, ecx
and al, 0x22
cmp al, 2
je 0x14008465e
mov rax, qword [rbp - 0x48]
mov r8, qword [rax]
test r8, r8
je 0x14008465e
mov rax, qword [rbp - 0x68]
mov rdx, qword [rax]
cmp r8, qword [rbp - 0x20]
cmovb r8, qword [rbp - 0x20]
sub r8, rdx
sar r8, 1
jmp 0x140084695
test cl, 4
jne 0x14008468b
mov rax, qword [rbp - 0x50]
mov rcx, qword [rax]
test rcx, rcx
je 0x14008468b
mov rax, qword [rbp - 0x70]
mov rdx, qword [rax]
mov rax, qword [rbp - 0x38]
movsxd r8, dword [rax]
add r8, r8
sub r8, rdx
add r8, rcx
sar r8, 1
jmp 0x140084695
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x1400846a7
lea rcx, [rbp + 0x88]
call fcn.140082850
nop
mov dword [rsp + 0x30], 0xb
lea rdx, [rbp + 0x88]
cmp qword [rbp + 0xa0], 8
cmovae rdx, qword [rbp + 0x88]
mov r8, qword [rbp + 0x98]
lea rcx, [rbp + 0x68]
call fcn.1400826d0
nop
mov rdx, qword [rbp + 0xa0]
cmp rdx, 8
jb 0x14008471d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140084718
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140084c96
call fcn.140249860
mov r8d, 7
lea rdx, str.OEMName
lea rcx, [rbp + 0x68]
call fcn.1400826d0
mov dword [rsp + 0x38], 0x200
lea rdx, [rbp + 0x68]
cmp qword [rbp + 0x80], 8
cmovae rdx, qword [rbp + 0x68]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x140084899
mov edx, edi
lea rcx, [rbp + 0x88]
call fcn.140084cb0
mov rbx, rax
call fcn.14027f1d0
mov rcx, rax
lea rdx, str.Unable_to_query_registry_key_for_joystick_at_index
call fcn.140004d50
mov rcx, rax
mov edx, r14d
call fcn.1400134d4
mov rcx, rax
lea rdx, [0x1402959f0]
call fcn.140004d50
mov rdx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x1400847d4
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140007ae4
mov rcx, rax
call fcn.14000d7d4
nop
mov rdx, qword [rbp + 0xa0]
cmp rdx, 0x10
jb 0x14008482a
inc rdx
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140084825
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140084c8a
call fcn.140249860
mov dword [rsp + 0x30], r15d
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x70], rsi
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rsp + rcx + 0x6c], edx
lea rcx, [rsp + 0x78]
call fcn.140080970
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rsp + rcx + 0x6c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp - 8], rax
lea rcx, [rbp - 8]
call fcn.140248390
nop
jmp 0x140084460
mov r8d, 0x4f
lea rdx, str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
lea rcx, [rbp + 0x68]
call fcn.140082850
mov rsi, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x80]
cmp rsi, rdi
jae 0x1400848e0
lea rax, [rsi + 1]
mov qword [rbp + 0x78], rax
lea rax, [rbp + 0x68]
cmp rdi, 8
cmovae rax, qword [rbp + 0x68]
mov dword [rax + rsi*2], 0x5c
jmp 0x1400849b4
mov rax, rbx
sub rax, rsi
cmp rax, 1
jb 0x140084c90
lea r15, [rsi + 1]
mov rcx, r15
or rcx, 7
cmp rcx, rbx
ja 0x14008491f
mov rdx, rdi
shr rdx, 1
mov rax, rbx
sub rax, rdx
cmp rdi, rax
ja 0x14008491f
lea rax, [rdi + rdx]
mov rbx, rcx
cmp rcx, rax
cmovb rbx, rax
lea rdx, [rbx + 1]
lea rcx, [rbp + 0x68]
call fcn.140041e50
mov r14, rax
mov qword [rbp + 0x78], r15
mov qword [rbp + 0x80], rbx
add rsi, rsi
mov r8, rsi
mov rcx, rax
cmp rdi, 8
jb 0x140084997
mov rbx, qword [rbp + 0x68]
mov rdx, rbx
call fcn.14024aa30
mov dword [r14 + rsi], 0x5c
xor r15d, r15d
lea rdx, [rdi*2 + 2]
cmp rdx, 0x1000
jb 0x14008498d
add rdx, 0x27
mov rcx, qword [rbx - 8]
sub rbx, rcx
lea rax, [rbx - 8]
cmp rax, 0x1f
ja 0x140084c96
mov rbx, rcx
mov rcx, rbx
call fcn.140249860
jmp 0x1400849ab
lea rdx, [rbp + 0x68]
call fcn.14024aa30
mov dword [r14 + rsi], 0x5c
xor r15d, r15d
mov qword [rbp + 0x68], r14
mov r14d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x38]
shr r8, 1
lea rdx, [rbp + 0xb0]
lea rcx, [rbp + 0x68]
call fcn.1400826d0
lea rdx, [rbp + 0x68]
cmp qword [rbp + 0x80], 8
cmovae rdx, qword [rbp + 0x68]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140084ab3
mov edx, eax
lea rcx, [rbp + 0x88]
call fcn.140084cb0
mov rbx, rax
call fcn.14027f1d0
mov rcx, rax
lea rdx, str.Unable_to_open_registry_key_for_joystick_at_index
call fcn.140004d50
mov rcx, rax
mov edx, r14d
call fcn.1400134d4
mov rcx, rax
lea rdx, [0x1402959f0]
call fcn.140004d50
mov rdx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x140084a4d
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140007ae4
mov rcx, rax
call fcn.14000d7d4
nop
mov rdx, qword [rbp + 0xa0]
cmp rdx, 0x10
jb 0x140084aa4
inc rdx
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140084a9e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140084c9c
call fcn.140249860
nop
lea rcx, [rsp + 0x70]
call fcn.140080de0
jmp 0x140084460
mov dword [rsp + 0x38], 0x200
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.OEMName
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rbp + 0x88]
test ebx, ebx
je 0x140084ba8
mov edx, ebx
call fcn.140084cb0
mov rbx, rax
call fcn.14027f1d0
mov rcx, rax
lea rdx, str.Unable_to_query_name_for_joystick_at_index
call fcn.140004d50
mov rcx, rax
mov edx, r14d
call fcn.1400134d4
mov rcx, rax
lea rdx, [0x1402959f0]
call fcn.140004d50
mov rdx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x140084b4a
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.140007ae4
mov rcx, rax
call fcn.14000d7d4
nop
mov rdx, qword [rbp + 0xa0]
cmp rdx, 0x10
jb 0x140084aa4
inc rdx
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140084a9e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140084c72
jmp 0x140084a9e
mov word [rbp + 0x2ae], r15w
lea rdx, [rbp + 0xb0]
call fcn.140041a00
nop
lea rdx, [rbp + 0x88]
mov rbx, qword [rsp + 0x40]
mov rcx, rbx
call fcn.140041b00
nop
mov rdx, qword [rbp + 0xa0]
cmp rdx, 4
jb 0x140084c19
lea rdx, [rdx*4 + 4]
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140084c13
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140084ca2
call fcn.140249860
nop
lea rcx, [rsp + 0x70]
call fcn.140080de0
nop
mov rdx, qword [rbp + 0x80]
cmp rdx, 8
jb 0x1400844a8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140084c62
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140084c6c
call fcn.140249860
jmp 0x1400844a8
call fcn.140250d14
nop
call fcn.140250d14
nop
call fcn.140022d44
int3
call fcn.140250d14
int3
call fcn.140250d14
nop
call fcn.140250d14
int3
call fcn.140022d44
int3
call fcn.140250d14
int3
call fcn.140250d14
int3
call fcn.140250d14
int3