Function at 0x4c41e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50d7d9
mov eax, dword fs:[0]
push eax
sub esp, 0x5d4
mov eax, dword [0x5cfc24]
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 - 0x5e0], eax
lea edi, [ebp - 0x518]
mov ecx, 0xb6
mov dword [ebp - 0x538], eax
mov eax, dword [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x528], eax
mov dword [ebp - 0x530], 1
push 1
mov dword [ebp - 4], 0
call fcn.004dcad5
add esp, 4
mov dword [ebp - 0x53c], eax
mov ecx, dword [ebp - 0x538]
lea eax, [ebp - 0x540]
push eax
push str.Unknown_Joystick
mov dword [ebp - 4], 1
call fcn.004c6a80
mov dword [ebp - 0x530], 1
mov ecx, dword [ebp - 0x53c]
test ecx, ecx
je 0x4c429b
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
mov ecx, eax
test ecx, ecx
je 0x4c429b
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.004c3150
mov ecx, dword [ebp - 0x218]
mov edx, 0x7ffffffe
mov edi, dword [ebp - 0x214]
mov dword [ebp - 0x52c], ecx
cmp ecx, edi
jae 0x4c431b
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 0x4c440c
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x4c4d10
lea eax, [ecx + 1]
mov esi, eax
mov dword [ebp - 0x51c], eax
or esi, 7
cmp esi, edx
jbe 0x4c433e
mov esi, edx
jmp 0x4c4356
mov ecx, edi
mov eax, edx
shr ecx, 1
sub eax, ecx
cmp edi, eax
jbe 0x4c434e
mov esi, edx
jmp 0x4c4356
lea eax, [edi + ecx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x228]
call fcn.004bd150
mov dword [ebp - 0x214], esi
mov ecx, eax
mov eax, dword [ebp - 0x51c]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x52c]
mov dword [ebp - 0x520], ecx
lea edx, [eax + eax]
lea eax, [edx + ecx]
mov dword [ebp - 0x51c], eax
push edx
cmp edi, 8
jb 0x4c43e4
mov esi, dword [ebp - 0x228]
push esi
push ecx
call fcn.004e1300
mov ecx, dword [ebp - 0x51c]
lea edi, [edi*2 + 2]
add esp, 0xc
mov dword [ecx], 0x5c
cmp edi, 0x1000
jb 0x4c43d8
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x4c4d15
mov esi, ecx
push edi
push esi
call fcn.004dded2
add esp, 8
jmp 0x4c4400
lea eax, [ebp - 0x228]
push eax
push ecx
call fcn.004e1300
mov eax, dword [ebp - 0x51c]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x228], eax
lea ecx, [ebp - 0x488]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4c4415
sub ecx, edx
lea eax, [ebp - 0x488]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x228]
call fcn.004c2fd0
mov ecx, dword [ebp - 0x218]
mov edi, dword [ebp - 0x214]
mov dword [ebp - 0x520], ecx
cmp ecx, edi
jae 0x4c4472
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 0x4c4568
mov edx, 0x7ffffffe
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x4c4d10
lea eax, [ecx + 1]
mov esi, eax
mov dword [ebp - 0x52c], eax
or esi, 7
cmp esi, edx
jbe 0x4c449a
mov esi, edx
jmp 0x4c44b2
mov ecx, edi
mov eax, edx
shr ecx, 1
sub eax, ecx
cmp edi, eax
jbe 0x4c44aa
mov esi, edx
jmp 0x4c44b2
lea eax, [edi + ecx]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x228]
call fcn.004bd150
mov dword [ebp - 0x214], esi
mov ecx, eax
mov eax, dword [ebp - 0x52c]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x51c], ecx
lea edx, [eax + eax]
lea eax, [edx + ecx]
mov dword [ebp - 0x520], eax
push edx
cmp edi, 8
jb 0x4c4540
mov esi, dword [ebp - 0x228]
push esi
push ecx
call fcn.004e1300
mov ecx, dword [ebp - 0x520]
lea edi, [edi*2 + 2]
add esp, 0xc
mov dword [ecx], 0x5c
cmp edi, 0x1000
jb 0x4c4534
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x4c4d15
mov esi, ecx
push edi
push esi
call fcn.004dded2
add esp, 8
jmp 0x4c455c
lea eax, [ebp - 0x228]
push eax
push ecx
call fcn.004e1300
mov eax, dword [ebp - 0x520]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x51c]
mov dword [ebp - 0x228], eax
push 0x17
push str.CurrentJoystickSettings
lea ecx, [ebp - 0x228]
call fcn.004c2fd0
cmp dword [ebp - 0x214], 8
lea ecx, [ebp - 0x524]
mov edi, 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 - 0x51c], 0x80000001
call edi
test eax, eax
je 0x4c46c6
cmp dword [ebp - 0x214], 8
lea ecx, [ebp - 0x524]
push ecx
push 0x20019
lea eax, [ebp - 0x228]
mov dword [ebp - 0x51c], 0x80000002
cmovae eax, dword [ebp - 0x228]
push 0
push eax
push 0x80000002
call edi
test eax, eax
je 0x4c46c6
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.004c4d20
add esp, 8
mov esi, eax
mov eax, dword [ebp - 0x528]
push 0x50f4f8
push eax
push str.Unable_to_open_registry_for_joystick_at_index
mov byte [ebp - 4], 5
call fcn.004c7b90
push eax
call fcn.00414310
add esp, 8
mov ecx, eax
call fcn.00454f10
push eax
call fcn.00414310
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x4c4647
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.00402a10
push eax
call fcn.00452070
add esp, 0x10
lea ecx, [ebp - 0x240]
call fcn.004049e0
mov ecx, dword [ebp - 0x214]
cmp ecx, 8
jb 0x4c46a5
mov edx, dword [ebp - 0x228]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4c469b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4c4d15
push ecx
push edx
call fcn.004dded2
add esp, 8
mov eax, dword [ebp - 0x538]
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.004dde94
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x5dc], 0x52e804
mov dword [ebp - 0x584], 0
mov dword [ebp - 0x564], 0
mov dword [ebp - 0x560], 0
mov dword [ebp - 0x55c], 0
mov dword [ebp - method.std::basic_ios_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
push 0
push 0
lea eax, [ebp - 0x5d8]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x5dc]
mov dword [ebp - 0x530], 3
call fcn.004bc830
mov eax, dword [ebp - 0x5dc]
push 8
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 - 0x5dc]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x5e0], 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
call fcn.004ddea2
mov edi, eax
add esp, 4
test edi, edi
je 0x4c4781
push 1
mov byte [ebp - 4], 8
call fcn.004dcad5
add esp, 4
mov dword [edi + 4], eax
jmp 0x4c4783
xor edi, edi
lea eax, [ebp - 0x5d4]
mov dword [ebp - 0x5a4], edi
mov dword [ebp - 0x5cc], eax
lea eax, [ebp - 0x5d0]
mov dword [ebp - 0x5c8], eax
lea eax, [ebp - 0x5c4]
mov dword [ebp - 0x5bc], eax
lea eax, [ebp - 0x5c0]
mov dword [ebp - 0x5b8], eax
lea eax, [ebp - 0x5b4]
mov dword [ebp - 0x5ac], eax
lea eax, [ebp - 0x5b0]
mov dword [ebp - 0x5a8], eax
mov dword [ebp - 0x5d0], 0
mov dword [ebp - 0x5c0], 0
mov dword [ebp - 0x5b0], 0
mov dword [ebp - 0x5d4], 0
mov dword [ebp - 0x5c4], 0
mov dword [ebp - 0x5b4], 0
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 - 0x5a0], 0
mov dword [ebp - 0x59c], 4
mov eax, dword [ebp - 0x528]
lea ecx, [ebp - 0x5dc]
inc eax
mov byte [ebp - 4], 9
push eax
call fcn.004c20a0
push 8
push str.Joystick
lea ecx, [ebp - 0x228]
call fcn.004c3150
mov edx, dword [ebp - 0x59c]
xor eax, eax
xorps xmm0, xmm0
mov dword [ebp - 0x53c], eax
movups xmmword [ebp - 0x240], xmm0
mov word [ebp - 0x240], ax
mov eax, edx
and al, 0x22
mov byte [ebp - 4], 0xa
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 7
mov dword [ebp - 0x530], 0xb
movq qword [ebp - 0x544], xmm0
cmp al, 2
je 0x4c48cc
mov eax, dword [ebp - 0x5b8]
mov ecx, dword [eax]
test ecx, ecx
je 0x4c48cc
cmp ecx, dword [ebp - 0x5a0]
mov eax, dword [ebp - 0x5c8]
cmovb ecx, dword [ebp - 0x5a0]
mov edx, dword [eax]
sub ecx, edx
sar ecx, 1
jmp 0x4c4903
test dl, 4
jne 0x4c48f7
mov eax, dword [ebp - 0x5bc]
mov edi, dword [eax]
test edi, edi
je 0x4c48f7
mov eax, dword [ebp - 0x5cc]
mov edx, dword [eax]
mov eax, dword [ebp - 0x5ac]
mov ecx, dword [eax]
add ecx, ecx
sub ecx, edx
add ecx, edi
sar ecx, 1
jmp 0x4c4903
mov ecx, dword [ebp - 0x540]
mov edx, dword [ebp - 0x544]
test edx, edx
je 0x4c4914
push ecx
push edx
lea ecx, [ebp - 0x240]
call fcn.004c3150
mov dword [ebp - 4], 9
mov dword [ebp - 0x530], 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], 0xb
call fcn.004c2fd0
mov ecx, dword [ebp - 0x22c]
mov byte [ebp - 4], 9
cmp ecx, 8
jb 0x4c4993
mov edx, dword [ebp - 0x240]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4c4989
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4c4d15
push ecx
push edx
call fcn.004dded2
add esp, 8
push 7
push str.OEMName
lea ecx, [ebp - 0x228]
call fcn.004c2fd0
cmp dword [ebp - 0x214], 8
lea ecx, [ebp - 0x534]
push ecx
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x534], 0x200
push ecx
push 0
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
push 0
push eax
push dword [ebp - 0x524]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x524]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x4c4a70
lea eax, [ebp - 0x240]
push edi
push eax
call fcn.004c4d20
add esp, 8
mov esi, eax
push 0x50f4f8
push dword [ebp - 0x528]
mov byte [ebp - 4], 0xc
push str.Unable_to_query_registry_key_for_joystick_at_index
call fcn.004c7b90
push eax
call fcn.00414310
add esp, 8
mov ecx, eax
call fcn.00454f10
push eax
call fcn.00414310
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x4c4a42
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.00402a10
push eax
call fcn.00452070
add esp, 0x10
lea ecx, [ebp - 0x240]
call fcn.004049e0
lea ecx, [ebp - 0x5dc]
call fcn.004bcd80
jmp 0x4c4665
push 0x4f
push str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
lea ecx, [ebp - 0x228]
call fcn.004c3150
mov ecx, dword [ebp - 0x218]
mov edi, dword [ebp - 0x214]
mov dword [ebp - 0x53c], ecx
cmp ecx, edi
jae 0x4c4abd
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 0x4c4baa
mov edx, 0x7ffffffe
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x4c4d10
lea eax, [ecx + 1]
mov esi, eax
mov dword [ebp - 0x52c], eax
or esi, 7
cmp esi, edx
jbe 0x4c4ae5
mov esi, edx
jmp 0x4c4afd
mov eax, edi
shr eax, 1
sub edx, eax
cmp edi, edx
jbe 0x4c4af6
mov esi, 0x7ffffffe
jmp 0x4c4afd
add eax, edi
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x228]
call fcn.004bd150
mov ecx, dword [ebp - 0x52c]
mov dword [ebp - 0x218], ecx
mov ecx, dword [ebp - 0x53c]
add ecx, ecx
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x520], eax
push ecx
lea esi, [eax + ecx]
mov dword [ebp - 0x53c], esi
cmp edi, 8
jb 0x4c4b88
mov esi, dword [ebp - 0x228]
push esi
push eax
call fcn.004e1300
mov ecx, dword [ebp - 0x53c]
lea edi, [edi*2 + 2]
add esp, 0xc
mov dword [ecx], 0x5c
cmp edi, 0x1000
jb 0x4c4b7c
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x4c4d15
mov esi, ecx
push edi
push esi
call fcn.004dded2
add esp, 8
jmp 0x4c4b9e
lea ecx, [ebp - 0x228]
push ecx
push eax
call fcn.004e1300
add esp, 0xc
mov dword [esi], 0x5c
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x534]
lea ecx, [ebp - 0x228]
shr eax, 1
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004c2fd0
cmp dword [ebp - 0x214], 8
lea ecx, [ebp - 0x524]
push ecx
push 0x20019
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
push 0
push eax
push dword [ebp - 0x51c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4c4c23
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.004c4d20
add esp, 8
mov esi, eax
push 0x50f4f8
push dword [ebp - 0x528]
mov byte [ebp - 4], 0xd
push str.Unable_to_open_registry_key_for_joystick_at_index
jmp 0x4c4a1a
lea eax, [ebp - 0x534]
mov dword [ebp - 0x534], 0x200
push eax
lea eax, [ebp - 0x210]
push eax
push 0
push 0
push str.OEMName
push dword [ebp - 0x524]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x524]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4c4c8d
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.004c4d20
add esp, 8
mov esi, eax
push 0x50f4f8
push dword [ebp - 0x528]
mov byte [ebp - 4], 0xe
push str.Unable_to_query_name_for_joystick_at_index
jmp 0x4c4a1a
xor eax, eax
lea ecx, [ebp - 0x240]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x210]
push eax
call fcn.004c6b60
mov ecx, dword [ebp - 0x538]
lea eax, [ebp - 0x240]
push eax
mov byte [ebp - 4], 0xf
call fcn.004c6c60
lea ecx, [ebp - 0x240]
call fcn.00414a60
lea ecx, [ebp - 0x5dc]
call fcn.004bcd80
mov ecx, dword [ebp - 0x214]
cmp ecx, 8
jb 0x4c46a5
mov edx, dword [ebp - 0x228]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4c469b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4c4d15
jmp 0x4c469b
call fcn.00406710
call fcn.004e5195
int3