Function at 0x18003f000
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 - 0x2b0]
sub rsp, 0x3b0
mov rax, qword [0x1800aa380]
xor rax, rsp
mov qword [rbp + 0x2a0], rax
mov rbx, r8
mov r14d, edx
mov dword [rsp + 0x40], edx
mov rdi, rcx
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x68], rcx
mov dword [rsp + 0x30], 1
mov cl, 1
call fcn.180043bcc
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x50]
lea rdx, str.Unknown_Joystick
mov rcx, rdi
call fcn.18002df90
nop
mov dword [rsp + 0x30], 1
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x18003f09a
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, rax
test rax, rax
je 0x18003f09a
mov rax, qword [rax]
mov edx, 1
call qword [rax]
xorps xmm0, xmm0
movups xmmword [rbp + 0x60], xmm0
xor r15d, r15d
mov qword [rbp + 0x70], r15
mov qword [rbp + 0x78], 7
mov word [rbp + 0x60], r15w
lea r9, str.SystemCurrentControlSetControlMediaResourcesJoystick
xor r8d, r8d
mov edx, 0x38
lea rcx, [rbp + 0x60]
call fcn.18003bc00
mov rcx, qword [rbp + 0x70]
mov rdx, qword [rbp + 0x78]
mov r12d, 0x5c
cmp rcx, rdx
jae 0x18003f0fb
lea rax, [rcx + 1]
mov qword [rbp + 0x70], rax
lea rax, [rbp + 0x60]
cmp rdx, 7
cmova rax, qword [rbp + 0x60]
mov dword [rax + rcx*2], r12d
jmp 0x18003f10f
mov r9d, r12d
xor r8d, r8d
mov edx, 1
lea rcx, [rbp + 0x60]
call fcn.18002d630
lea r9, [rbx + 0x90]
mov rdi, 0xffffffffffffffff
nop dword [rax]
inc rdi
cmp word [r9 + rdi*2], 0
jne 0x18003f120
mov rsi, qword [rbp + 0x70]
mov rcx, qword [rbp + 0x78]
mov rax, rcx
sub rax, rsi
cmp rdi, rax
ja 0x18003f16e
lea rax, [rsi + rdi]
mov qword [rbp + 0x70], rax
lea rbx, [rbp + 0x60]
cmp rcx, 7
cmova rbx, qword [rbp + 0x60]
lea rcx, [rbx + rsi*2]
lea r8, [rdi + rdi]
mov rdx, r9
call fcn.180082150
lea rax, [rsi + rdi]
mov word [rbx + rax*2], r15w
jmp 0x18003f182
mov qword [rsp + 0x20], rdi
xor r8d, r8d
mov rdx, rdi
lea rcx, [rbp + 0x60]
call fcn.18003bd60
mov rcx, qword [rbp + 0x70]
mov rdx, qword [rbp + 0x78]
cmp rcx, rdx
jae 0x18003f1ad
lea rax, [rcx + 1]
mov qword [rbp + 0x70], rax
lea rax, [rbp + 0x60]
cmp rdx, 7
cmova rax, qword [rbp + 0x60]
mov dword [rax + rcx*2], 0x5c
jmp 0x18003f1c1
mov r9d, r12d
xor r8d, r8d
mov edx, 1
lea rcx, [rbp + 0x60]
call fcn.18002d630
mov rdi, qword [rbp + 0x70]
mov rcx, qword [rbp + 0x78]
mov rax, rcx
sub rax, rdi
cmp rax, 0x17
jb 0x18003f208
lea rax, [rdi + 0x17]
mov qword [rbp + 0x70], rax
lea rbx, [rbp + 0x60]
cmp rcx, 7
cmova rbx, qword [rbp + 0x60]
lea rcx, [rbx + rdi*2]
mov r8d, 0x2e
lea rdx, str.CurrentJoystickSettings
call fcn.180082150
mov word [rbx + rdi*2 + 0x2e], r15w
jmp 0x18003f229
mov qword [rsp + 0x20], 0x17
lea r9, str.CurrentJoystickSettings
xor r8d, r8d
mov edx, 0x17
lea rcx, [rbp + 0x60]
call fcn.18003bd60
mov r13, 0xffffffff80000001
lea rdx, [rbp + 0x60]
cmp qword [rbp + 0x78], 7
cmova rdx, qword [rbp + 0x60]
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 0x18003f3b0
mov r13, 0xffffffff80000002
lea rdx, [rbp + 0x60]
cmp qword [rbp + 0x78], 7
cmova rdx, qword [rbp + 0x60]
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 0x18003f3b0
mov edx, eax
lea rcx, [rbp + 0x80]
call fcn.18003fb50
mov rbx, rax
call fcn.18002eee0
mov rcx, rax
lea rdx, str.Unable_to_open_registry_for_joystick_at_index
call fcn.180003950
mov rcx, rax
mov edx, r14d
call fcn.180005870
mov rcx, rax
lea rdx, [0x1800869c8]
call fcn.180003950
mov rdx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x18003f2e7
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.18001b470
mov rcx, rax
call fcn.180004840
nop
mov rdx, qword [rbp + 0x98]
cmp rdx, 0xf
jbe 0x18003f33e
inc rdx
mov rcx, qword [rbp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003f338
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003fb2e
call fcn.180059048
nop
mov rdx, qword [rbp + 0x78]
cmp rdx, 7
jbe 0x18003f37e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x60]
cmp rdx, 0x1000
mov rax, rcx
jb 0x18003f379
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003fb22
call fcn.180059048
mov rbx, qword [rsp + 0x38]
mov rax, rbx
mov rcx, qword [rbp + 0x2a0]
xor rcx, rsp
call fcn.180059160
mov rbx, qword [rsp + 0x408]
add rsp, 0x3b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, 1
lea rcx, [rsp + 0x70]
call fcn.18003c210
nop
lea edx, [r14 + 1]
lea rcx, [rsp + 0x70]
call fcn.18003c690
mov rax, qword [rbp + 0x78]
cmp rax, 8
jb 0x18003f409
lea rbx, [rbp + 0x60]
cmp rax, 7
cmova rbx, qword [rbp + 0x60]
mov qword [rbp + 0x70], 8
mov r8d, 0x10
lea rdx, str.Joystick
mov rcx, rbx
call fcn.180082150
mov word [rbx + 0x10], r15w
jmp 0x18003f422
lea r9, str.Joystick
xor r8d, r8d
mov edx, 8
lea rcx, [rbp + 0x60]
call fcn.18003bc00
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x80], xmm0
mov r14, r15
mov qword [rbp + 0x90], r15
mov edi, 7
mov qword [rbp + 0x98], rdi
mov word [rbp + 0x80], r15w
mov dword [rsp + 0x30], 5
mov rcx, qword [rbp - 0x18]
mov eax, ecx
and al, 0x22
cmp al, 2
je 0x18003f47f
mov rax, qword [rbp - 0x48]
mov rdx, qword [rax]
test rdx, rdx
je 0x18003f47f
mov rax, qword [rbp - 0x68]
mov r9, qword [rax]
cmp rdx, qword [rbp - 0x20]
cmovb rdx, qword [rbp - 0x20]
sub rdx, r9
jmp 0x18003f4a7
test cl, 4
jne 0x18003f4f5
mov rax, qword [rbp - 0x50]
mov rcx, qword [rax]
test rcx, rcx
je 0x18003f4f5
mov rax, qword [rbp - 0x70]
mov r9, qword [rax]
mov rax, qword [rbp - 0x38]
movsxd rdx, dword [rax]
add rdx, rdx
sub rdx, r9
add rdx, rcx
mov rax, r9
sar rdx, 1
test rax, rax
je 0x18003f4f5
lea rcx, [rbp + 0x80]
cmp rdx, rdi
ja 0x18003f4df
mov qword [rbp + 0x90], rdx
lea rbx, [rdx + rdx]
mov r8, rbx
mov rdx, r9
call fcn.180082150
mov word [rbp + rbx + 0x80], r15w
jmp 0x18003f4e7
xor r8d, r8d
call fcn.18003bc00
mov r14, qword [rbp + 0x90]
mov rdi, qword [rbp + 0x98]
mov dword [rsp + 0x30], 3
lea r9, [rbp + 0x80]
mov rsi, qword [rbp + 0x80]
cmp rdi, 7
cmova r9, rsi
mov r15, qword [rbp + 0x70]
mov rcx, qword [rbp + 0x78]
mov rax, rcx
sub rax, r15
cmp r14, rax
ja 0x18003f559
lea rax, [r15 + r14]
mov qword [rbp + 0x70], rax
lea rbx, [rbp + 0x60]
cmp rcx, 7
cmova rbx, qword [rbp + 0x60]
lea rcx, [rbx + r15*2]
lea r8, [r14 + r14]
mov rdx, r9
call fcn.180082150
lea rax, [r15 + r14]
xor r14d, r14d
mov word [rbx + rax*2], r14w
jmp 0x18003f57e
mov qword [rsp + 0x20], r14
xor r8d, r8d
mov rdx, r14
lea rcx, [rbp + 0x60]
call fcn.18003bd60
mov rdi, qword [rbp + 0x98]
mov rsi, qword [rbp + 0x80]
xor r14d, r14d
cmp rdi, 7
jbe 0x18003f5b9
lea rdx, [rdi*2 + 2]
mov rax, rsi
cmp rdx, 0x1000
jb 0x18003f5b1
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003fb34
mov rcx, rsi
call fcn.180059048
mov rdi, qword [rbp + 0x70]
mov rcx, qword [rbp + 0x78]
mov rax, rcx
sub rax, rdi
cmp rax, 7
jb 0x18003f600
lea rax, [rdi + 7]
mov qword [rbp + 0x70], rax
lea rbx, [rbp + 0x60]
cmp rcx, 7
cmova rbx, qword [rbp + 0x60]
lea rcx, [rbx + rdi*2]
mov r8d, 0xe
lea rdx, str.OEMName
call fcn.180082150
mov word [rbx + rdi*2 + 0xe], r14w
jmp 0x18003f621
mov qword [rsp + 0x20], 7
lea r9, str.OEMName
xor r8d, r8d
mov edx, 7
lea rcx, [rbp + 0x60]
call fcn.18003bd60
mov dword [rsp + 0x34], 0x200
lea rdx, [rbp + 0x60]
cmp qword [rbp + 0x78], 7
cmova rdx, qword [rbp + 0x60]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xa0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
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]
test ebx, ebx
je 0x18003f78c
mov edx, ebx
lea rcx, [rbp + 0x80]
call fcn.18003fb50
mov rbx, rax
call fcn.18002eee0
mov rcx, rax
lea rdx, str.Unable_to_query_registry_key_for_joystick_at_index
call fcn.180003950
mov rcx, rax
mov edx, dword [rsp + 0x40]
call fcn.180005870
mov rcx, rax
lea rdx, [0x1800869c8]
call fcn.180003950
mov rdx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x18003f6c0
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.18001b470
mov rcx, rax
call fcn.180004840
nop
mov rdx, qword [rbp + 0x98]
cmp rdx, 0xf
jbe 0x18003f716
inc rdx
mov rcx, qword [rbp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003f711
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003fb3a
call fcn.180059048
mov dword [rsp + 0x30], r14d
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x70], rax
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.18003c410
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.180044478
nop
jmp 0x18003f33e
mov rax, qword [rbp + 0x78]
cmp rax, 0x4f
jb 0x18003f7ca
lea rbx, [rbp + 0x60]
cmp rax, 7
cmova rbx, qword [rbp + 0x60]
mov qword [rbp + 0x70], 0x4f
mov r8d, 0x9e
lea rdx, str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
mov rcx, rbx
call fcn.180082150
mov word [rbx + 0x9e], r14w
jmp 0x18003f7e2
lea r9, str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
xor r8d, r8d
mov edx, 0x4f
lea rcx, [rbp + 0x60]
call fcn.18003bc00
mov rcx, qword [rbp + 0x70]
mov rdx, qword [rbp + 0x78]
cmp rcx, rdx
jae 0x18003f80d
lea rax, [rcx + 1]
mov qword [rbp + 0x70], rax
lea rax, [rbp + 0x60]
cmp rdx, 7
cmova rax, qword [rbp + 0x60]
mov dword [rax + rcx*2], 0x5c
jmp 0x18003f821
mov r9d, r12d
xor r8d, r8d
mov edx, 1
lea rcx, [rbp + 0x60]
call fcn.18002d630
mov edi, dword [rsp + 0x34]
shr rdi, 1
mov rsi, qword [rbp + 0x70]
mov rcx, qword [rbp + 0x78]
mov rax, rcx
sub rax, rsi
cmp rdi, rax
ja 0x18003f86f
lea rax, [rsi + rdi]
mov qword [rbp + 0x70], rax
lea rbx, [rbp + 0x60]
cmp rcx, 7
cmova rbx, qword [rbp + 0x60]
lea rcx, [rbx + rsi*2]
lea r8, [rdi + rdi]
lea rdx, [rbp + 0xa0]
call fcn.180082150
lea rax, [rsi + rdi]
mov word [rbx + rax*2], r14w
jmp 0x18003f88a
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 0xa0]
xor r8d, r8d
mov rdx, rdi
lea rcx, [rbp + 0x60]
call fcn.18003bd60
lea rdx, [rbp + 0x60]
cmp qword [rbp + 0x78], 7
cmova rdx, qword [rbp + 0x60]
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 0x18003f96f
mov edx, eax
lea rcx, [rbp + 0x80]
call fcn.18003fb50
mov rbx, rax
call fcn.18002eee0
mov rcx, rax
lea rdx, str.Unable_to_open_registry_key_for_joystick_at_index
call fcn.180003950
mov rcx, rax
mov edx, dword [rsp + 0x40]
call fcn.180005870
mov rcx, rax
lea rdx, [0x1800869c8]
call fcn.180003950
mov rdx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x18003f909
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.18001b470
mov rcx, rax
call fcn.180004840
nop
mov rdx, qword [rbp + 0x98]
cmp rdx, 0xf
jbe 0x18003f960
inc rdx
mov rcx, qword [rbp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003f95a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003fb40
call fcn.180059048
nop
lea rcx, [rsp + 0x70]
call fcn.18003c990
jmp 0x18003f33e
mov dword [rsp + 0x34], 0x200
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xa0]
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 + 0x80]
test ebx, ebx
je 0x18003fa65
mov edx, ebx
call fcn.18003fb50
mov rbx, rax
call fcn.18002eee0
mov rcx, rax
lea rdx, str.Unable_to_query_name_for_joystick_at_index
call fcn.180003950
mov rcx, rax
mov edx, dword [rsp + 0x40]
call fcn.180005870
mov rcx, rax
lea rdx, [0x1800869c8]
call fcn.180003950
mov rdx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x18003fa07
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
mov rcx, rax
call fcn.18001b470
mov rcx, rax
call fcn.180004840
nop
mov rdx, qword [rbp + 0x98]
cmp rdx, 0xf
jbe 0x18003f960
inc rdx
mov rcx, qword [rbp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003f95a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003fb28
jmp 0x18003f95a
mov word [rbp + 0x29e], r14w
lea rdx, [rbp + 0xa0]
call fcn.18002e080
nop
lea rdx, [rbp + 0x80]
mov rbx, qword [rsp + 0x38]
mov rcx, rbx
call fcn.18002e220
nop
mov rdx, qword [rbp + 0x98]
cmp rdx, 3
jbe 0x18003fad2
lea rdx, [rdx*4 + 4]
mov rcx, qword [rbp + 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003facc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003fb46
call fcn.180059048
nop
lea rcx, [rsp + 0x70]
call fcn.18003c990
nop
mov rdx, qword [rbp + 0x78]
cmp rdx, 7
jbe 0x18003f383
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18003fb18
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18003fb22
call fcn.180059048
jmp 0x18003f383
call fcn.18005f504
nop
call fcn.18005f504
nop
call fcn.18005f504
nop
call fcn.18005f504
int3
call fcn.18005f504
int3
call fcn.18005f504
int3
call fcn.18005f504
int3