Function at 0x415380
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48cc1b
mov eax, dword fs:[0]
push eax
sub esp, 0x5d8
mov eax, dword [0x4b5200]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea esi, [ebp + 0x10]
mov dword [ebp - 0x5e4], eax
lea edi, [ebp - 0x518]
mov ecx, 0xb6
mov dword [ebp - 0x53c], eax
mov eax, dword [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x52c], eax
mov dword [ebp - 0x534], 1
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 - 0x540], eax
mov ecx, dword [ebp - 0x53c]
lea eax, [ebp - 0x544]
push eax
push str.Unknown_Joystick
mov dword [ebp - 4], 1
call fcn.0040a870
mov dword [ebp - 0x534], 1
mov ecx, dword [ebp - 0x540]
test ecx, ecx
je 0x41543b
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
mov ecx, eax
test ecx, ecx
je 0x41543b
mov eax, dword [ecx]
push 1
call dword [eax]
xorps xmm0, xmm0
mov dword [ebp - 0x218], 0
xor eax, eax
mov dword [ebp - 0x214], 7
movups xmmword [ebp - 0x228], xmm0
mov word [ebp - 0x228], ax
push 0x38
push str.SystemCurrentControlSetControlMediaResourcesJoystick
lea ecx, [ebp - 0x228]
mov dword [ebp - 4], 4
call fcn.004079c0
mov ecx, dword [ebp - 0x218]
mov edx, 0x7ffffffe
mov edi, dword [ebp - 0x214]
mov dword [ebp - 0x524], ecx
cmp ecx, edi
jae 0x4154bb
lea eax, [ecx + 1]
cmp edi, 8
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
mov dword [eax + ecx*2], 0x5c
jmp 0x4155a5
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x415faa
lea eax, [ecx + 1]
mov esi, eax
mov dword [ebp - 0x520], eax
or esi, 7
cmp esi, edx
jbe 0x4154de
mov esi, edx
jmp 0x4154f6
mov ecx, edi
mov eax, edx
shr ecx, 1
sub eax, ecx
cmp edi, eax
jbe 0x4154ee
mov esi, edx
jmp 0x4154f6
lea eax, [ecx + edi]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x228]
call fcn.0040a570
mov ecx, eax
mov dword [ebp - 0x214], esi
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x524]
add eax, eax
mov dword [ebp - 0x51c], ecx
push eax
lea esi, [eax + ecx]
mov dword [ebp - 0x520], esi
cmp edi, 8
jb 0x415583
mov esi, dword [ebp - 0x228]
push esi
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x520]
lea edi, [edi*2 + 2]
add esp, 0xc
mov dword [ecx], 0x5c
cmp edi, 0x1000
jb 0x415577
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x415fa4
mov esi, ecx
push edi
push esi
call fcn.00489ae7
add esp, 8
jmp 0x415599
lea eax, [ebp - 0x228]
push eax
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [esi], 0x5c
mov eax, dword [ebp - 0x51c]
mov dword [ebp - 0x228], eax
lea ecx, [ebp - 0x488]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4155b0
sub ecx, edx
lea eax, [ebp - 0x488]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x228]
call fcn.00407a20
mov edx, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x214]
mov dword [ebp - 0x530], edx
mov dword [ebp - 0x51c], ecx
cmp edx, ecx
jae 0x415613
lea eax, [edx + 1]
cmp ecx, 8
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
mov dword [eax + edx*2], 0x5c
jmp 0x415717
mov eax, 0x7ffffffe
sub eax, edx
cmp eax, 1
jb 0x415faa
lea eax, [edx + 1]
mov esi, eax
mov dword [ebp - 0x520], eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x415640
mov esi, 0x7ffffffe
jmp 0x41565e
mov edx, ecx
mov eax, 0x7ffffffe
shr edx, 1
sub eax, edx
cmp ecx, eax
jbe 0x415656
mov esi, 0x7ffffffe
jmp 0x41565e
lea eax, [ecx + edx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x228]
call fcn.0040a570
mov ecx, eax
mov dword [ebp - 0x214], esi
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x530]
add eax, eax
mov dword [ebp - 0x524], ecx
cmp dword [ebp - 0x51c], 8
push eax
lea esi, [eax + ecx]
mov dword [ebp - 0x530], esi
jb 0x4156f5
mov esi, dword [ebp - 0x228]
push esi
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x530]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x51c]
lea ecx, [eax*2 + 2]
cmp ecx, 0x1000
jb 0x4156e9
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x415fa4
mov esi, edx
push ecx
push esi
call fcn.00489ae7
add esp, 8
jmp 0x41570b
lea eax, [ebp - 0x228]
push eax
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [esi], 0x5c
mov eax, dword [ebp - 0x524]
mov dword [ebp - 0x228], eax
push 0x17
push str.CurrentJoystickSettings
lea ecx, [ebp - 0x228]
call fcn.00407a20
cmp dword [ebp - 0x214], 8
lea ecx, [ebp - 0x528]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
push ecx
push 0x20019
push 0
push eax
push 0x80000001
mov dword [ebp - 0x520], 0x80000001
call esi
test eax, eax
je 0x41587d
cmp dword [ebp - 0x214], 8
lea ecx, [ebp - 0x528]
push ecx
push 0x20019
lea eax, [ebp - 0x228]
mov dword [ebp - 0x520], 0x80000002
cmovae eax, dword [ebp - 0x228]
push 0
push eax
push 0x80000002
call esi
test eax, eax
je 0x41587d
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.00415fb0
add esp, 8
mov esi, eax
mov eax, dword [ebp - 0x52c]
push 0x4ae7ec
push eax
push str.Unable_to_open_registry_for_joystick_at_index
mov byte [ebp - 4], 5
call fcn.0048ac50
push eax
call fcn.00408660
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.00408660
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x4157f7
mov ecx, dword [esi]
push 0x4088a0
push dword [esi + 0x10]
push ecx
push eax
call fcn.00409c40
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 - 0x240]
call fcn.00407bb0
mov ecx, dword [ebp - 0x214]
cmp ecx, 8
jb 0x41585c
mov edx, dword [ebp - 0x228]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x415852
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x415fa4
push ecx
push edx
call fcn.00489ae7
add esp, 8
mov eax, dword [ebp - 0x53c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00489aa9
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x590]
mov dword [ebp - 0x5e0], 0x48f30c
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 - 0x5dc]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x5e0]
mov dword [ebp - 0x534], 3
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 - 0x5e0]
mov dword [ebp - 4], 7
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x5e0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x5e4], eax
lea ecx, [ebp - 0x5dc]
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 - method.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [ebp - 0x5a4], 0
mov dword [ebp - 0x5a0], 4
mov eax, dword [ebp - 0x52c]
lea ecx, [ebp - 0x5e0]
inc eax
mov byte [ebp - 4], 8
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 - 0x228]
call fcn.004079c0
mov ecx, dword [ebp - 0x5a0]
xor eax, eax
xorps xmm0, xmm0
mov dword [ebp - 0x540], eax
movups xmmword [ebp - 0x240], xmm0
mov word [ebp - 0x240], ax
mov eax, ecx
and al, 0x22
mov byte [ebp - 4], 9
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 7
mov dword [ebp - 0x534], 0xb
movq qword [ebp - 0x548], xmm0
cmp al, 2
je 0x4159ea
lea ecx, [ebp - 0x5dc]
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::pptr_void_const]
test eax, eax
je 0x4159e4
lea ecx, [ebp - 0x5dc]
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::pbase_void_const]
lea ecx, [ebp - 0x5dc]
mov dword [ebp - 0x51c], eax
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::pptr_void_const]
mov esi, eax
lea ecx, [ebp - 0x5dc]
cmp esi, dword [ebp - 0x5a4]
cmovb esi, dword [ebp - 0x5a4]
sub esi, dword [ebp - 0x51c]
sar esi, 1
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::epptr_void_const]
mov eax, dword [ebp - 0x51c]
jmp 0x415a37
mov ecx, dword [ebp - 0x5a0]
test cl, 4
jne 0x415a2b
lea ecx, [ebp - 0x5dc]
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::gptr_void_const]
test eax, eax
je 0x415a2b
lea ecx, [ebp - 0x5dc]
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::eback_void_const]
lea ecx, [ebp - 0x5dc]
mov dword [ebp - 0x51c], eax
call dword [sym.imp.MSVCP140.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::egptr_void_const]
mov esi, eax
mov eax, dword [ebp - 0x51c]
sub esi, eax
sar esi, 1
jmp 0x415a37
mov esi, dword [ebp - 0x544]
mov eax, dword [ebp - 0x548]
test eax, eax
je 0x415a48
push esi
push eax
lea ecx, [ebp - 0x240]
call fcn.004079c0
mov dword [ebp - 4], 8
mov dword [ebp - 0x534], 7
cmp dword [ebp - 0x22c], 8
lea eax, [ebp - 0x240]
push dword [ebp - 0x230]
cmovae eax, dword [ebp - 0x240]
lea ecx, [ebp - 0x228]
push eax
mov byte [ebp - 4], 0xa
call fcn.00407a20
mov ecx, dword [ebp - 0x22c]
mov byte [ebp - 4], 8
cmp ecx, 8
jb 0x415ac7
mov edx, dword [ebp - 0x240]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x415abd
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x415fa4
push ecx
push edx
call fcn.00489ae7
add esp, 8
push 7
push str.OEMName
lea ecx, [ebp - 0x228]
call fcn.00407a20
cmp dword [ebp - 0x214], 8
lea ecx, [ebp - 0x538]
push ecx
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x538], 0x200
push ecx
push 0
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
push 0
push eax
push dword [ebp - 0x528]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x528]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x415bef
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.00415fb0
add esp, 8
mov esi, eax
push 0x4ae7ec
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xb
push str.Unable_to_query_registry_key_for_joystick_at_index
call fcn.0048ac50
push eax
call fcn.00408660
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.00408660
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x415b7b
mov ecx, dword [esi]
push 0x4088a0
push dword [esi + 0x10]
push ecx
push eax
call fcn.00409c40
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 - 0x240]
call fcn.00407bb0
mov eax, dword [ebp - 0x5e0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x5e0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x5e4], eax
lea ecx, [ebp - 0x5dc]
call fcn.00414c90
lea ecx, [ebp - 0x5d8]
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 - 0x590]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
jmp 0x41581c
push 0x4f
push str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
lea ecx, [ebp - 0x228]
call fcn.004079c0
mov edx, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x214]
mov dword [ebp - 0x540], edx
mov dword [ebp - 0x524], ecx
cmp edx, ecx
jae 0x415c42
lea eax, [edx + 1]
cmp ecx, 8
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
mov dword [eax + edx*2], 0x5c
jmp 0x415d46
mov eax, 0x7ffffffe
sub eax, edx
cmp eax, 1
jb 0x415faa
lea eax, [edx + 1]
mov esi, eax
mov dword [ebp - 0x530], eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x415c6f
mov esi, 0x7ffffffe
jmp 0x415c8d
mov edx, ecx
mov eax, 0x7ffffffe
shr edx, 1
sub eax, edx
cmp ecx, eax
jbe 0x415c85
mov esi, 0x7ffffffe
jmp 0x415c8d
lea eax, [edx + ecx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x228]
call fcn.0040a570
mov ecx, eax
mov dword [ebp - 0x214], esi
mov eax, dword [ebp - 0x530]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x540]
add eax, eax
mov dword [ebp - 0x51c], ecx
cmp dword [ebp - 0x524], 8
push eax
lea esi, [ecx + eax]
mov dword [ebp - 0x540], esi
jb 0x415d24
mov esi, dword [ebp - 0x228]
push esi
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x540]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x524]
lea ecx, [eax*2 + 2]
cmp ecx, 0x1000
jb 0x415d18
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x415fa4
mov esi, edx
push ecx
push esi
call fcn.00489ae7
add esp, 8
jmp 0x415d3a
lea eax, [ebp - 0x228]
push eax
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [esi], 0x5c
mov eax, dword [ebp - 0x51c]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x538]
lea ecx, [ebp - 0x228]
shr eax, 1
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00407a20
cmp dword [ebp - 0x214], 8
lea ecx, [ebp - 0x528]
push ecx
push 0x20019
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
push 0
push eax
push dword [ebp - 0x520]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x415e5b
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.00415fb0
add esp, 8
mov esi, eax
push 0x4ae7ec
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xc
push str.Unable_to_open_registry_key_for_joystick_at_index
call fcn.0048ac50
push eax
call fcn.00408660
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.00408660
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x415de7
mov ecx, dword [esi]
push 0x4088a0
push dword [esi + 0x10]
push ecx
push eax
call fcn.00409c40
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 - 0x240]
call fcn.00407bb0
mov eax, dword [ebp - 0x5e0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x5e0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x5e4], eax
lea ecx, [ebp - 0x5dc]
call fcn.00414c90
lea ecx, [ebp - 0x5d8]
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 - 0x590]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
jmp 0x41581c
lea eax, [ebp - 0x538]
mov dword [ebp - 0x538], 0x200
push eax
lea eax, [ebp - 0x210]
push eax
push 0
push 0
push str.OEMName
push dword [ebp - 0x528]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x528]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x415f22
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.00415fb0
add esp, 8
mov esi, eax
push 0x4ae7ec
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xd
push str.Unable_to_query_name_for_joystick_at_index
call fcn.0048ac50
push eax
call fcn.00408660
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.00408660
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x415eed
mov ecx, dword [esi]
push 0x4088a0
push dword [esi + 0x10]
push ecx
push eax
call fcn.00409c40
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 - 0x240]
call fcn.00407bb0
lea ecx, [ebp - 0x5e0]
call fcn.00414d30
jmp 0x41581c
xor eax, eax
lea ecx, [ebp - 0x240]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x210]
push eax
call fcn.0040a950
mov ecx, dword [ebp - 0x53c]
lea eax, [ebp - 0x240]
push eax
mov byte [ebp - 4], 0xe
call fcn.0040aaa0
lea ecx, [ebp - 0x240]
call fcn.00406f50
lea ecx, [ebp - 0x5e0]
call fcn.00414d30
mov ecx, dword [ebp - 0x214]
cmp ecx, 8
jb 0x41585c
mov edx, dword [ebp - 0x228]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x415852
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x415852
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.004014a0
int3