Function at 0x416df0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x540]
sub esp, 0x540
push 0xffffffffffffffff
push 0x4c55cd
mov eax, dword fs:[0]
push eax
sub esp, 0x98
mov eax, dword [0x572b90]
xor eax, ebp
mov dword [ebp + 0x53c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x548]
lea esi, [ebp + 0x550]
mov eax, dword [ebp + 0x54c]
lea edi, [ebp + 0x1c]
mov ecx, 0xb6
mov dword [ebp + 0xc], ebx
rep movsd dword es:[edi], dword [esi]
mov dword [ebp + 0x10], eax
mov dword [ebp + 8], 0
push 1
mov dword [ebp - 4], 0
call sub.MSVCP140.dll_private:_static_class_std::locale::_Locimp____cdecl_std::locale::_Init_bool_
add esp, 4
mov dword [ebp + 4], eax
lea eax, [ebp]
mov dword [ebp - 4], 1
push eax
push str.Unknown_Joystick
lea ecx, [ebp + 0x2f4]
call fcn.004381e0
mov ecx, dword [ebp + 4]
mov byte [ebp - 4], 4
test ecx, ecx
je 0x416ea0
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x416ea0
mov eax, dword [ecx]
push 1
call dword [eax]
xor eax, eax
mov dword [ebp + 0x334], 0
mov dword [ebp + 0x338], 7
mov word [ebp + 0x324], ax
push 0x38
push str.SystemCurrentControlSetControlMediaResourcesJoystick
lea ecx, [ebp + 0x324]
mov byte [ebp - 4], 5
call fcn.00411a80
push 0x5c
lea ecx, [ebp + 0x324]
call fcn.00417fe0
lea ecx, [ebp + 0xac]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x416ef0
sub ecx, edx
lea eax, [ebp + 0xac]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp + 0x324]
call fcn.00416710
push 0x5c
lea ecx, [ebp + 0x324]
call fcn.00417fe0
push 0x17
push str.CurrentJoystickSettings
lea ecx, [ebp + 0x324]
call fcn.00416710
cmp dword [ebp + 0x338], 8
lea ecx, [ebp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp + 0x324]
cmovae eax, dword [ebp + 0x324]
push ecx
push 0x20019
push 0
push eax
push 0x80000001
mov dword [ebp + 0xc], 0x80000001
call esi
test eax, eax
je 0x417069
cmp dword [ebp + 0x338], 8
lea ecx, [ebp + 0x18]
push ecx
push 0x20019
lea eax, [ebp + 0x324]
mov dword [ebp + 0xc], 0x80000002
cmovae eax, dword [ebp + 0x324]
push 0
push eax
push 0x80000002
call esi
test eax, eax
je 0x417069
push eax
lea eax, [ebp + 0x30c]
push eax
call fcn.004175f0
add esp, 8
mov esi, eax
push 0x4c826c
push dword [ebp + 0x10]
mov byte [ebp - 4], 6
push str.Unable_to_open_registry_for_joystick_at_index
call fcn.00438d20
push eax
call fcn.00403d50
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.00403d50
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x416ff0
mov esi, dword [esi]
push 0x403fb0
push ecx
push esi
push eax
call fcn.004040a0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea ecx, [ebp + 0x30c]
mov byte [ebp - 4], 5
call fcn.00403d00
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.00438060
mov edx, dword [ebp + 0x338]
cmp edx, 8
jb 0x417598
mov ecx, dword [ebp + 0x324]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41758e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41758e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
lea ecx, [ebp - 0x54]
mov dword [ebp - 0xa4], 0x4c7abc
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0xa0]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0xa4]
mov dword [ebp + 8], 2
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::constructor_class_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t_____bool_]
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 4], 8
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xa4], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xa8], eax
lea ecx, [ebp - 0xa0]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
mov dword [ebp - 0xa0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 4
mov edi, dword [ebp + 0x10]
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 9
lea eax, [edi + 1]
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_int_]
push 8
push str.Joystick
lea ecx, [ebp + 0x324]
call fcn.00411a80
mov ecx, dword [ebp - 0x64]
xor eax, eax
mov byte [ebp - 4], 0xa
mov dword [ebp + 0x31c], 0
mov dword [ebp + 0x320], 7
mov word [ebp + 0x30c], ax
mov dword [ebp + 8], 0xa
test cl, 2
jne 0x417168
mov eax, dword [ebp - 0x80]
mov edx, dword [eax]
test edx, edx
je 0x417168
cmp edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x90]
cmovb edx, dword [ebp - 0x68]
mov ecx, dword [eax]
sub edx, ecx
sar edx, 1
push edx
jmp 0x41718f
test cl, 4
jne 0x41719b
mov eax, dword [ebp - 0x84]
mov edx, dword [eax]
test edx, edx
je 0x41719b
mov eax, dword [ebp - 0x94]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x74]
mov eax, dword [eax]
add eax, eax
sub eax, ecx
add eax, edx
sar eax, 1
push eax
push ecx
lea ecx, [ebp + 0x30c]
call fcn.00411a80
cmp dword [ebp + 0x320], 8
lea eax, [ebp + 0x30c]
push dword [ebp + 0x31c]
cmovae eax, dword [ebp + 0x30c]
lea ecx, [ebp + 0x324]
push eax
mov dword [ebp - 4], 0xb
call fcn.00416710
mov edx, dword [ebp + 0x320]
mov byte [ebp - 4], 9
cmp edx, 8
jb 0x41720e
mov ecx, dword [ebp + 0x30c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x417204
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x417204
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004c07a5
add esp, 8
push 7
push str.OEMName
lea ecx, [ebp + 0x324]
call fcn.00416710
cmp dword [ebp + 0x338], 8
lea ecx, [ebp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp + 0x324]
cmovae eax, dword [ebp + 0x324]
push ecx
lea ecx, [ebp + 0x33c]
mov dword [ebp + 0x14], 0x200
push ecx
push 0
push 0
push eax
push dword [ebp + 0x18]
call esi
push dword [ebp + 0x18]
mov dword [ebp + 0x10], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x417339
push eax
lea eax, [ebp + 0x30c]
push eax
call fcn.004175f0
add esp, 8
mov esi, eax
push 0x4c826c
push edi
push str.Unable_to_query_registry_key_for_joystick_at_index
mov byte [ebp - 4], 0xc
call fcn.00438d20
push eax
call fcn.00403d50
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.00403d50
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x4172b8
mov esi, dword [esi]
push 0x403fb0
push ecx
push esi
push eax
call fcn.004040a0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea ecx, [ebp + 0x30c]
mov byte [ebp - 4], 9
call fcn.00403d00
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.00438060
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xa4], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xa8], eax
lea ecx, [ebp - 0xa0]
call fcn.00411590
lea ecx, [ebp - 0x9c]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x54]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
jmp 0x417025
push 0x4f
push str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
lea ecx, [ebp + 0x324]
call fcn.00411a80
push 0x5c
lea ecx, [ebp + 0x324]
call fcn.00417fe0
mov eax, dword [ebp + 0x14]
lea ecx, [ebp + 0x324]
shr eax, 1
push eax
lea eax, [ebp + 0x33c]
push eax
call fcn.00416710
cmp dword [ebp + 0x338], 8
lea ecx, [ebp + 0x18]
push ecx
push 0x20019
lea eax, [ebp + 0x324]
cmovae eax, dword [ebp + 0x324]
push 0
push eax
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x41746d
push eax
lea eax, [ebp + 0x30c]
push eax
call fcn.004175f0
add esp, 8
mov esi, eax
push 0x4c826c
push edi
push str.Unable_to_open_registry_key_for_joystick_at_index
mov byte [ebp - 4], 0xd
call fcn.00438d20
push eax
call fcn.00403d50
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.00403d50
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x4173ec
mov esi, dword [esi]
push 0x403fb0
push ecx
push esi
push eax
call fcn.004040a0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea ecx, [ebp + 0x30c]
mov byte [ebp - 4], 9
call fcn.00403d00
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.00438060
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xa4], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xa8], eax
lea ecx, [ebp - 0xa0]
call fcn.00411590
lea ecx, [ebp - 0x9c]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x54]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
jmp 0x417025
lea eax, [ebp + 0x14]
mov dword [ebp + 0x14], 0x200
push eax
lea eax, [ebp + 0x33c]
push eax
push 0
push 0
push str.OEMName
push dword [ebp + 0x18]
call esi
push dword [ebp + 0x18]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x417530
lea eax, [ebp + 0x30c]
push esi
push eax
call fcn.004175f0
add esp, 8
mov esi, eax
push 0x4c826c
push edi
push str.Unable_to_query_name_for_joystick_at_index
mov byte [ebp - 4], 0xe
call fcn.00438d20
push eax
call fcn.00403d50
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.00403d50
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x4174eb
mov esi, dword [esi]
push 0x403fb0
push ecx
push esi
push eax
call fcn.004040a0
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea ecx, [ebp + 0x30c]
mov byte [ebp - 4], 9
call fcn.00403d00
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.00438060
lea ecx, [ebp - 0xa4]
call fcn.00411760
jmp 0x417025
xor eax, eax
lea ecx, [ebp + 0x30c]
mov word [ebp + 0x53a], ax
lea eax, [ebp + 0x33c]
push eax
call fcn.004382b0
lea eax, [ebp + 0x30c]
mov byte [ebp - 4], 0xf
push eax
lea ecx, [ebp + 0x2f4]
call fcn.00438390
lea ecx, [ebp + 0x30c]
mov byte [ebp - 4], 9
call fcn.00407250
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.00438060
lea ecx, [ebp - 0xa4]
call fcn.00411760
jmp 0x417025
push edx
push ecx
call fcn.004c07a5
add esp, 8
xor eax, eax
mov dword [ebp + 0x338], 7
lea ecx, [ebp + 0x2f4]
mov dword [ebp + 0x334], eax
mov word [ebp + 0x324], ax
call fcn.00407250
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x53c]
xor ecx, ebp
call fcn.004c0767
lea esp, [ebp + 0x540]
pop ebp
ret