Function at 0x4853f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x540]
sub esp, 0x540
push 0xffffffffffffffff
push 0x4e4f6d
mov eax, dword fs:[0]
push eax
sub esp, 0x98
mov eax, dword [0x59da54]
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.00487260
mov ecx, dword [ebp + 4]
mov byte [ebp - 4], 4
test ecx, ecx
je 0x4854a0
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x4854a0
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.0041d190
push 0x5c
lea ecx, [ebp + 0x324]
call fcn.004865e0
lea ecx, [ebp + 0xac]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4854f0
sub ecx, edx
lea eax, [ebp + 0xac]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp + 0x324]
call fcn.00484d10
push 0x5c
lea ecx, [ebp + 0x324]
call fcn.004865e0
push 0x17
push str.CurrentJoystickSettings
lea ecx, [ebp + 0x324]
call fcn.00484d10
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 reloc.WS2_32.dll_accept
mov dword [ebp + 0xc], reloc.WS2_32.dll_accept
call esi
test eax, eax
je 0x485669
cmp dword [ebp + 0x338], 8
lea ecx, [ebp + 0x18]
push ecx
push 0x20019
lea eax, [ebp + 0x324]
mov dword [ebp + 0xc], reloc.WS2_32.dll_bind
cmovae eax, dword [ebp + 0x324]
push 0
push eax
push reloc.WS2_32.dll_bind
call esi
test eax, eax
je 0x485669
push eax
lea eax, [ebp + 0x30c]
push eax
call fcn.00485bf0
add esp, 8
mov esi, eax
push 0x4e7c50
push dword [ebp + 0x10]
mov byte [ebp - 4], 6
push str.Unable_to_open_registry_for_joystick_at_index
call fcn.00487e80
push eax
call fcn.0040e6b0
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.0040e6b0
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x4855f0
mov esi, dword [esi]
push 0x465400
push ecx
push esi
push eax
call fcn.0041ba40
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.004063d0
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.004870e0
mov edx, dword [ebp + 0x338]
cmp edx, 8
jb 0x485b98
mov ecx, dword [ebp + 0x324]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485b8e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x485b8e
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], 0x4f61bc
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.0041d190
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 0x485768
mov eax, dword [ebp - 0x80]
mov edx, dword [eax]
test edx, edx
je 0x485768
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 0x48578f
test cl, 4
jne 0x48579b
mov eax, dword [ebp - 0x84]
mov edx, dword [eax]
test edx, edx
je 0x48579b
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.0041d190
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.00484d10
mov edx, dword [ebp + 0x320]
mov byte [ebp - 4], 9
cmp edx, 8
jb 0x48580e
mov ecx, dword [ebp + 0x30c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485804
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x485804
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00493424
add esp, 8
push 7
push str.OEMName
lea ecx, [ebp + 0x324]
call fcn.00484d10
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 0x485939
push eax
lea eax, [ebp + 0x30c]
push eax
call fcn.00485bf0
add esp, 8
mov esi, eax
push 0x4e7c50
push edi
push str.Unable_to_query_registry_key_for_joystick_at_index
mov byte [ebp - 4], 0xc
call fcn.00487e80
push eax
call fcn.0040e6b0
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.0040e6b0
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x4858b8
mov esi, dword [esi]
push 0x465400
push ecx
push esi
push eax
call fcn.0041ba40
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.004063d0
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.004870e0
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.0047ffc0
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 0x485625
push 0x4f
push str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
lea ecx, [ebp + 0x324]
call fcn.0041d190
push 0x5c
lea ecx, [ebp + 0x324]
call fcn.004865e0
mov eax, dword [ebp + 0x14]
lea ecx, [ebp + 0x324]
shr eax, 1
push eax
lea eax, [ebp + 0x33c]
push eax
call fcn.00484d10
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 0x485a6d
push eax
lea eax, [ebp + 0x30c]
push eax
call fcn.00485bf0
add esp, 8
mov esi, eax
push 0x4e7c50
push edi
push str.Unable_to_open_registry_key_for_joystick_at_index
mov byte [ebp - 4], 0xd
call fcn.00487e80
push eax
call fcn.0040e6b0
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.0040e6b0
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x4859ec
mov esi, dword [esi]
push 0x465400
push ecx
push esi
push eax
call fcn.0041ba40
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.004063d0
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.004870e0
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.0047ffc0
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 0x485625
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 0x485b30
lea eax, [ebp + 0x30c]
push esi
push eax
call fcn.00485bf0
add esp, 8
mov esi, eax
push 0x4e7c50
push edi
push str.Unable_to_query_name_for_joystick_at_index
mov byte [ebp - 4], 0xe
call fcn.00487e80
push eax
call fcn.0040e6b0
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.0040e6b0
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x485aeb
mov esi, dword [esi]
push 0x465400
push ecx
push esi
push eax
call fcn.0041ba40
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.004063d0
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.004870e0
lea ecx, [ebp - 0xa4]
call fcn.00480140
jmp 0x485625
xor eax, eax
lea ecx, [ebp + 0x30c]
mov word [ebp + 0x53a], ax
lea eax, [ebp + 0x33c]
push eax
call fcn.00487330
lea eax, [ebp + 0x30c]
mov byte [ebp - 4], 0xf
push eax
lea ecx, [ebp + 0x2f4]
call fcn.00487410
lea ecx, [ebp + 0x30c]
mov byte [ebp - 4], 9
call fcn.00409530
lea eax, [ebp + 0x2f4]
mov ecx, ebx
push eax
call fcn.004870e0
lea ecx, [ebp - 0xa4]
call fcn.00480140
jmp 0x485625
push edx
push ecx
call fcn.00493424
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.00409530
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.00493440
lea esp, [ebp + 0x540]
pop ebp
ret