Function at 0x487410
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c4
mov eax, dword [0x5095c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, 0xb6
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
lea esi, [ebp + 0x10]
mov dword [ebp - 0x520], eax
lea edi, [ebp - 0x50c]
mov dword [ebp - 0x51c], ebx
rep movsd dword es:[edi], dword [esi]
push 1
call fcn.004a6db9
mov ecx, dword [ebp - 0x520]
add esp, 4
mov dword [ebp - 0x524], eax
lea eax, [ebp - 0x528]
push eax
push str.Unknown_Joystick
call fcn.0048ee70
mov ecx, dword [ebp - 0x524]
test ecx, ecx
je 0x48748a
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x48748a
mov eax, dword [ecx]
push 1
call dword [eax]
xorps xmm0, xmm0
mov dword [ebp - 0x20c], 0
push 0x38
xor eax, eax
mov dword [ebp - 0x208], 7
movups xmmword [ebp - 0x21c], xmm0
push str.SystemCurrentControlSetControlMediaResourcesJoystick
lea ecx, [ebp - 0x21c]
mov word [ebp - 0x21c], ax
call fcn.00485ea0
mov ecx, dword [ebp - 0x20c]
mov edx, dword [ebp - 0x208]
cmp ecx, edx
jae 0x4874f5
lea eax, [ecx + 1]
cmp edx, 7
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x21c]
cmova eax, dword [ebp - 0x21c]
mov dword [eax + ecx*2], 0x5c
jmp 0x487511
push 0x5c
mov byte [ebp - 0x514], 0
lea ecx, [ebp - 0x21c]
push dword [ebp - 0x514]
push 1
call fcn.00484760
lea ecx, [ebp - 0x47c]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x487520
sub ecx, edx
lea eax, [ebp - 0x47c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.00485e30
mov ecx, dword [ebp - 0x20c]
mov edx, dword [ebp - 0x208]
cmp ecx, edx
jae 0x487574
lea eax, [ecx + 1]
cmp edx, 7
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x21c]
cmova eax, dword [ebp - 0x21c]
mov dword [eax + ecx*2], 0x5c
jmp 0x487590
push 0x5c
mov byte [ebp - 0x514], 0
lea ecx, [ebp - 0x21c]
push dword [ebp - 0x514]
push 1
call fcn.00484760
push 0x17
push str.CurrentJoystickSettings
lea ecx, [ebp - 0x21c]
call fcn.00485e30
cmp dword [ebp - 0x208], 7
lea ecx, [ebp - 0x510]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x21c]
cmova eax, dword [ebp - 0x21c]
push ecx
push 0x20019
push 0
push eax
push 0x80000001
mov dword [ebp - 0x514], 0x80000001
call esi
test eax, eax
je 0x4876da
cmp dword [ebp - 0x208], 7
lea ecx, [ebp - 0x510]
push ecx
push 0x20019
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x514], 0x80000002
cmova eax, dword [ebp - 0x21c]
push 0
push eax
push 0x80000002
call esi
test eax, eax
je 0x4876da
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00487b70
add esp, 8
mov esi, eax
push 0x50098c
push ebx
push str.Unable_to_open_registry_for_joystick_at_index
call fcn.0048fab0
push eax
call fcn.0040a90e
add esp, 8
mov ecx, eax
call fcn.0040946a
push eax
call fcn.0040a90e
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0xf
jbe 0x487665
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.0040b38f
push eax
call fcn.0040aacb
add esp, 0x10
lea ecx, [ebp - 0x234]
call fcn.00401e47
mov ecx, dword [ebp - 0x208]
cmp ecx, 7
jbe 0x4876c3
mov edx, dword [ebp - 0x21c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4876b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x487b63
push ecx
push edx
call fcn.0040b4ff
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x520]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004a818a
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x574]
mov dword [ebp - 0x5c4], 0x4f1a9c
call fcn.00484d60
push 0
push 0
lea eax, [ebp - 0x5c0]
push eax
lea ecx, [ebp - 0x5c4]
call fcn.00484dd0
mov eax, dword [ebp - 0x5c4]
xorps xmm0, xmm0
push 8
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 - 0x5c4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x5c8], eax
mov dword [ebp - method.std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__.0
movups xmmword [ebp - 0x5bc], xmm0
movups xmmword [ebp - 0x5ac], xmm0
movups xmmword [ebp - 0x59c], xmm0
call fcn.0040b4fa
mov esi, eax
add esp, 4
test esi, esi
je 0x48776d
push 1
call fcn.004a6db9
add esp, 4
mov dword [esi + 4], eax
jmp 0x48776f
xor esi, esi
lea ecx, [ebp - 0x5c0]
mov dword [ebp - 0x58c], esi
call fcn.00485780
lea eax, [ebx + 1]
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
push eax
lea ecx, [ebp - 0x5c4]
mov dword [ebp - 0x588], 0
mov dword [ebp - 0x584], 4
call fcn.00484fc0
push 8
push str.Joystick
lea ecx, [ebp - 0x21c]
call fcn.00485ea0
mov edx, dword [ebp - 0x584]
xor eax, eax
xorps xmm0, xmm0
mov dword [ebp - 0x524], eax
movups xmmword [ebp - 0x234], xmm0
mov word [ebp - 0x234], ax
xor edi, edi
mov eax, edx
mov dword [ebp - 0x224], edi
and al, 0x22
movq qword [ebp - 0x52c], xmm0
mov ebx, 7
mov dword [ebp - 0x220], ebx
cmp al, 2
je 0x487828
mov eax, dword [ebp - 0x5a0]
mov ecx, dword [eax]
test ecx, ecx
je 0x487828
cmp ecx, dword [ebp - 0x588]
mov eax, dword [ebp - 0x5b0]
cmovb ecx, dword [ebp - 0x588]
mov edx, dword [eax]
sub ecx, edx
sar ecx, 1
jmp 0x48785f
test dl, 4
jne 0x487853
mov eax, dword [ebp - 0x5a4]
mov esi, dword [eax]
test esi, esi
je 0x487853
mov eax, dword [ebp - 0x5b4]
mov edx, dword [eax]
mov eax, dword [ebp - 0x594]
mov ecx, dword [eax]
add ecx, ecx
sub ecx, edx
add ecx, esi
sar ecx, 1
jmp 0x48785f
mov ecx, dword [ebp - 0x528]
mov edx, dword [ebp - 0x52c]
test edx, edx
je 0x48787c
push ecx
push edx
lea ecx, [ebp - 0x234]
call fcn.00485ea0
mov ebx, dword [ebp - 0x220]
mov edi, dword [ebp - 0x224]
cmp ebx, 7
lea eax, [ebp - 0x234]
push edi
cmova eax, dword [ebp - 0x234]
lea ecx, [ebp - 0x21c]
push eax
call fcn.00485e30
mov ecx, dword [ebp - 0x220]
cmp ecx, 7
jbe 0x4878d9
mov edx, dword [ebp - 0x234]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4878cf
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x487b63
push ecx
push edx
call fcn.0040b4ff
add esp, 8
push 7
push str.OEMName
lea ecx, [ebp - 0x21c]
call fcn.00485e30
cmp dword [ebp - 0x208], 7
lea ecx, [ebp - 0x518]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x21c]
cmova eax, dword [ebp - 0x21c]
push ecx
lea ecx, [ebp - 0x204]
mov dword [ebp - 0x518], 0x200
push ecx
push 0
push 0
push eax
push dword [ebp - 0x510]
call edi
push dword [ebp - 0x510]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
call ebx
test esi, esi
je 0x4879b6
lea eax, [ebp - 0x234]
push esi
push eax
call fcn.00487b70
add esp, 8
push 0x50098c
push dword [ebp - 0x51c]
push str.Unable_to_query_registry_key_for_joystick_at_index
mov esi, eax
call fcn.0048fab0
push eax
call fcn.0040a90e
add esp, 8
mov ecx, eax
call fcn.0040946a
push eax
call fcn.0040a90e
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0xf
jbe 0x487988
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.0040b38f
push eax
call fcn.0040aacb
add esp, 0x10
lea ecx, [ebp - 0x234]
call fcn.00401e47
lea ecx, [ebp - 0x5c4]
call fcn.004851d0
jmp 0x487683
push 0x4f
push str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
lea ecx, [ebp - 0x21c]
call fcn.00485ea0
mov ecx, dword [ebp - 0x20c]
mov edx, dword [ebp - 0x208]
cmp ecx, edx
jae 0x4879fa
lea eax, [ecx + 1]
cmp edx, 7
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x21c]
cmova eax, dword [ebp - 0x21c]
mov dword [eax + ecx*2], 0x5c
jmp 0x487a16
push 0x5c
mov byte [ebp - 0x524], 0
lea ecx, [ebp - 0x21c]
push dword [ebp - 0x524]
push 1
call fcn.00484760
mov eax, dword [ebp - 0x518]
lea ecx, [ebp - 0x21c]
shr eax, 1
push eax
lea eax, [ebp - 0x204]
push eax
call fcn.00485e30
cmp dword [ebp - 0x208], 7
lea ecx, [ebp - 0x510]
push ecx
push 0x20019
lea eax, [ebp - 0x21c]
cmova eax, dword [ebp - 0x21c]
push 0
push eax
push dword [ebp - 0x514]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x487a89
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00487b70
add esp, 8
push 0x50098c
push dword [ebp - 0x51c]
push str.Unable_to_open_registry_key_for_joystick_at_index
jmp 0x48795e
lea eax, [ebp - 0x518]
mov dword [ebp - 0x518], 0x200
push eax
lea eax, [ebp - 0x204]
push eax
push 0
push 0
push str.OEMName
push dword [ebp - 0x510]
call edi
push dword [ebp - 0x510]
mov esi, eax
call ebx
test esi, esi
je 0x487ae5
lea eax, [ebp - 0x234]
push esi
push eax
call fcn.00487b70
add esp, 8
push 0x50098c
push dword [ebp - 0x51c]
push str.Unable_to_query_name_for_joystick_at_index
jmp 0x48795e
xor eax, eax
lea ecx, [ebp - 0x234]
mov word [ebp - 6], ax
lea eax, [ebp - 0x204]
push eax
call fcn.0048ef00
mov ecx, dword [ebp - 0x520]
lea eax, [ebp - 0x234]
push eax
call fcn.0048efa0
lea ecx, [ebp - 0x234]
call fcn.00407bbc
lea ecx, [ebp - 0x5c4]
call fcn.004851d0
mov ecx, dword [ebp - 0x208]
cmp ecx, 7
jbe 0x4876c3
mov edx, dword [ebp - 0x21c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4876b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4876b9
call fcn.004add4e
int3