Function at 0x1004fb30
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1014aa99
mov eax, dword fs:[0]
push eax
sub esp, 0x5dc
mov eax, dword [0x1024b600]
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 - 0x550], eax
lea edi, [ebp - 0x518]
mov ecx, 0xb6
mov dword [ebp - 0x540], eax
mov eax, dword [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x52c], eax
mov dword [ebp - 0x538], 1
push 1
mov dword [ebp - 4], 0
call fcn.1006a0cd
add esp, 4
mov dword [ebp - 0x544], eax
mov ecx, dword [ebp - 0x540]
lea eax, [ebp - 0x548]
push eax
push str.Unknown_Joystick
mov dword [ebp - 4], 1
call fcn.10042510
mov dword [ebp - 0x538], 1
mov ecx, dword [ebp - 0x544]
test ecx, ecx
je 0x1004fbeb
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
mov ecx, eax
test ecx, ecx
je 0x1004fbeb
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.1004e950
mov ecx, dword [ebp - 0x218]
mov edx, 0x7ffffffe
mov esi, dword [ebp - 0x214]
mov dword [ebp - 0x530], ecx
mov dword [ebp - 0x534], esi
cmp ecx, esi
jae 0x1004fc71
lea eax, [ecx + 1]
cmp esi, 7
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x228]
cmova eax, dword [ebp - 0x228]
mov dword [eax + ecx*2], 0x5c
jmp 0x1004fd7b
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x1005067d
lea eax, [ecx + 1]
mov ecx, eax
mov dword [ebp - 0x528], eax
or ecx, 7
cmp ecx, edx
jbe 0x1004fc94
mov ecx, edx
jmp 0x1004fcac
mov edi, esi
mov eax, edx
shr edi, 1
sub eax, edi
cmp esi, eax
jbe 0x1004fca4
mov ecx, edx
jmp 0x1004fcac
lea eax, [esi + edi]
cmp ecx, eax
cmovb ecx, eax
lea eax, [ebp - 0x520]
mov dword [ebp - 0x520], ecx
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.100069d4
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x528]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp - 0x530]
mov dword [ebp - 0x51c], ecx
lea edx, [eax + eax]
lea eax, [edx + ecx]
mov dword [ebp - 0x520], eax
push edx
cmp esi, 7
jbe 0x1004fd53
mov esi, dword [ebp - 0x228]
push esi
push ecx
call fcn.1006f830
mov eax, dword [ebp - 0x520]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x534]
lea ecx, [eax*2 + 2]
cmp ecx, 0x1000
jb 0x1004fd47
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x10050682
mov esi, edx
push ecx
push esi
call fcn.1006dd11
add esp, 8
jmp 0x1004fd6f
lea eax, [ebp - 0x228]
push eax
push ecx
call fcn.1006f830
mov eax, dword [ebp - 0x520]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x51c]
mov dword [ebp - 0x228], eax
lea ecx, [ebp - 0x488]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004fd84
sub ecx, edx
lea eax, [ebp - 0x488]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x228]
call fcn.10005032
mov ecx, dword [ebp - 0x218]
mov esi, dword [ebp - 0x214]
mov dword [ebp - 0x528], ecx
mov dword [ebp - 0x544], esi
cmp ecx, esi
jae 0x1004fde7
lea eax, [ecx + 1]
cmp esi, 7
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x228]
cmova eax, dword [ebp - 0x228]
mov dword [eax + ecx*2], 0x5c
jmp 0x1004ff05
mov edx, 0x7ffffffe
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x1005067d
lea eax, [ecx + 1]
mov ecx, eax
mov dword [ebp - 0x530], eax
or ecx, 7
cmp ecx, edx
jbe 0x1004fe0f
mov ecx, edx
jmp 0x1004fe36
mov eax, esi
shr eax, 1
mov dword [ebp - 0x534], eax
mov eax, edx
mov edx, dword [ebp - 0x534]
sub eax, edx
cmp esi, eax
jbe 0x1004fe2e
mov ecx, 0x7ffffffe
jmp 0x1004fe36
lea eax, [esi + edx]
cmp ecx, eax
cmovb ecx, eax
lea eax, [ebp - 0x51c]
mov dword [ebp - 0x51c], ecx
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.100069d4
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x530]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x51c]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp - 0x528]
mov dword [ebp - 0x520], ecx
lea edx, [eax + eax]
lea eax, [edx + ecx]
mov dword [ebp - 0x51c], eax
push edx
cmp esi, 7
jbe 0x1004fedd
mov esi, dword [ebp - 0x228]
push esi
push ecx
call fcn.1006f830
mov eax, dword [ebp - 0x51c]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x544]
lea ecx, [eax*2 + 2]
cmp ecx, 0x1000
jb 0x1004fed1
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x10050682
mov esi, edx
push ecx
push esi
call fcn.1006dd11
add esp, 8
jmp 0x1004fef9
lea eax, [ebp - 0x228]
push eax
push ecx
call fcn.1006f830
mov eax, dword [ebp - 0x51c]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x228], eax
push 0x17
push str.CurrentJoystickSettings
lea ecx, [ebp - 0x228]
call fcn.10005032
cmp dword [ebp - 0x214], 7
lea ecx, [ebp - 0x524]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x228]
cmova eax, dword [ebp - 0x228]
push ecx
push 0x20019
push 0
push eax
push 0x80000001
mov dword [ebp - 0x528], 0x80000001
call esi
test eax, eax
je 0x10050063
cmp dword [ebp - 0x214], 7
lea ecx, [ebp - 0x524]
push ecx
push 0x20019
lea eax, [ebp - 0x228]
mov dword [ebp - 0x528], 0x80000002
cmova eax, dword [ebp - 0x228]
push 0
push eax
push 0x80000002
call esi
test eax, eax
je 0x10050063
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.10050690
add esp, 8
mov esi, eax
mov eax, dword [ebp - 0x52c]
push 0x102385d8
push eax
push str.Unable_to_open_registry_for_joystick_at_index
mov byte [ebp - 4], 5
call fcn.10043400
push eax
call fcn.10030560
add esp, 8
mov ecx, eax
call fcn.10031750
push eax
call fcn.10030560
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0xf
jbe 0x1004ffe4
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.10034ea0
push eax
call fcn.10030f40
add esp, 0x10
lea ecx, [ebp - 0x240]
call fcn.10005247
mov ecx, dword [ebp - 0x214]
cmp ecx, 7
jbe 0x10050042
mov edx, dword [ebp - 0x228]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10050038
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10050682
push ecx
push edx
call fcn.1006dd11
add esp, 8
mov eax, dword [ebp - 0x540]
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.1006d7ba
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x598]
mov dword [ebp - 0x5e8], 0x10158cf4
call fcn.1004d6e0
mov eax, dword [ebp - 0x5e8]
push 0
mov byte [ebp - 4], 6
mov dword [ebp - 0x538], 3
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x5e8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x5ec], eax
lea eax, [ebp - 0x5e4]
push eax
mov eax, dword [ebp - 0x5e8]
lea ecx, [ebp - 0x5e8]
add ecx, dword [eax + 4]
call fcn.100507d0
mov eax, dword [ebp - 0x5e8]
xorps xmm0, xmm0
push 8
mov dword [ebp - 4], 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 - 0x5e8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x5ec], 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 - 0x5e0], xmm0
movups xmmword [ebp - 0x5d0], xmm0
movups xmmword [ebp - 0x5c0], xmm0
call fcn.1006d8ad
mov esi, eax
add esp, 4
test esi, esi
je 0x1005013d
push 1
mov byte [ebp - 4], 9
call fcn.1006a0cd
add esp, 4
mov dword [esi + 4], eax
jmp 0x1005013f
xor esi, esi
lea ecx, [ebp - 0x5e4]
mov dword [ebp - 0x5b0], esi
call fcn.1004e1d0
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 - 0x5ac], 0
mov dword [ebp - 0x5a8], 4
mov eax, dword [ebp - 0x52c]
lea ecx, [ebp - 0x5e8]
inc eax
mov byte [ebp - 4], 0xa
push eax
call fcn.1004db10
push 8
push str.Joystick
lea ecx, [ebp - 0x228]
call fcn.1004e950
mov edx, dword [ebp - 0x5a8]
xor eax, eax
xorps xmm0, xmm0
mov dword [ebp - 0x544], eax
movups xmmword [ebp - 0x240], xmm0
mov word [ebp - 0x240], ax
xor esi, esi
mov eax, edx
mov byte [ebp - 4], 0xb
and al, 0x22
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x22c], 7
mov dword [ebp - 0x538], 0x13
movq qword [ebp - 0x54c], xmm0
cmp al, 2
je 0x1005020d
mov eax, dword [ebp - 0x5c4]
mov ecx, dword [eax]
test ecx, ecx
je 0x1005020d
cmp ecx, dword [ebp - 0x5ac]
mov eax, dword [ebp - 0x5d4]
cmovb ecx, dword [ebp - 0x5ac]
mov edx, dword [eax]
sub ecx, edx
sar ecx, 1
jmp 0x10050243
test dl, 4
jne 0x10050237
mov eax, dword [ebp - 0x5c8]
mov ecx, dword [eax]
test ecx, ecx
je 0x10050237
mov eax, dword [ebp - 0x5d8]
mov edx, dword [eax]
mov eax, dword [ebp - 0x5b8]
mov eax, dword [eax]
lea ecx, [ecx + eax*2]
sub ecx, edx
sar ecx, 1
jmp 0x10050243
mov ecx, dword [ebp - 0x548]
mov edx, dword [ebp - 0x54c]
test edx, edx
je 0x1005025a
push ecx
push edx
lea ecx, [ebp - 0x240]
call fcn.1004e950
mov esi, dword [ebp - 0x230]
mov dword [ebp - 4], 0xa
mov dword [ebp - 0x538], 0xb
cmp dword [ebp - 0x22c], 7
lea eax, [ebp - 0x240]
push esi
cmova eax, dword [ebp - 0x240]
lea ecx, [ebp - 0x228]
push eax
mov byte [ebp - 4], 0xc
call fcn.10005032
mov ecx, dword [ebp - 0x22c]
mov byte [ebp - 4], 0xa
cmp ecx, 7
jbe 0x100502d4
mov edx, dword [ebp - 0x240]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x100502ca
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10050682
push ecx
push edx
call fcn.1006dd11
add esp, 8
push 7
push str.OEMName
lea ecx, [ebp - 0x228]
call fcn.10005032
cmp dword [ebp - 0x214], 7
lea ecx, [ebp - 0x53c]
push ecx
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x53c], 0x200
push ecx
push 0
lea eax, [ebp - 0x228]
cmova eax, dword [ebp - 0x228]
push 0
push eax
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 0x100503b5
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.10050690
add esp, 8
mov esi, eax
push 0x102385d8
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xd
push str.Unable_to_query_registry_key_for_joystick_at_index
call fcn.10043400
push eax
call fcn.10030560
add esp, 8
mov ecx, eax
call fcn.10031750
push eax
call fcn.10030560
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0xf
jbe 0x10050387
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.10034ea0
push eax
call fcn.10030f40
add esp, 0x10
lea ecx, [ebp - 0x240]
call fcn.10005247
lea ecx, [ebp - 0x5e8]
call fcn.1004dcb0
jmp 0x10050002
push 0x4f
push str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
lea ecx, [ebp - 0x228]
call fcn.1004e950
mov ecx, dword [ebp - 0x218]
mov esi, dword [ebp - 0x214]
mov dword [ebp - 0x534], ecx
mov dword [ebp - 0x530], esi
cmp ecx, esi
jae 0x10050408
lea eax, [ecx + 1]
cmp esi, 7
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x228]
cmova eax, dword [ebp - 0x228]
mov dword [eax + ecx*2], 0x5c
jmp 0x10050517
mov edx, 0x7ffffffe
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x1005067d
lea eax, [ecx + 1]
mov ecx, eax
mov dword [ebp - 0x544], eax
or ecx, 7
cmp ecx, edx
jbe 0x10050430
mov ecx, edx
jmp 0x10050448
mov eax, esi
shr eax, 1
sub edx, eax
cmp esi, edx
jbe 0x10050441
mov ecx, 0x7ffffffe
jmp 0x10050448
add eax, esi
cmp ecx, eax
cmovb ecx, eax
lea eax, [ebp - 0x51c]
mov dword [ebp - 0x51c], ecx
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.100069d4
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x544]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x51c]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp - 0x534]
mov dword [ebp - 0x520], ecx
lea edx, [eax + eax]
lea eax, [ecx + edx]
mov dword [ebp - 0x51c], eax
push edx
cmp esi, 7
jbe 0x100504ef
mov esi, dword [ebp - 0x228]
push esi
push ecx
call fcn.1006f830
mov eax, dword [ebp - 0x51c]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x530]
lea ecx, [eax*2 + 2]
cmp ecx, 0x1000
jb 0x100504e3
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x10050682
mov esi, edx
push ecx
push esi
call fcn.1006dd11
add esp, 8
jmp 0x1005050b
lea eax, [ebp - 0x228]
push eax
push ecx
call fcn.1006f830
mov eax, dword [ebp - 0x51c]
add esp, 0xc
mov dword [eax], 0x5c
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x53c]
lea ecx, [ebp - 0x228]
shr eax, 1
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.10005032
cmp dword [ebp - 0x214], 7
lea ecx, [ebp - 0x524]
push ecx
push 0x20019
lea eax, [ebp - 0x228]
cmova eax, dword [ebp - 0x228]
push 0
push eax
push dword [ebp - 0x528]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x10050590
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.10050690
add esp, 8
mov esi, eax
push 0x102385d8
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xe
push str.Unable_to_open_registry_key_for_joystick_at_index
jmp 0x1005035f
lea eax, [ebp - 0x53c]
mov dword [ebp - 0x53c], 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 0x100505fa
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.10050690
add esp, 8
mov esi, eax
push 0x102385d8
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xf
push str.Unable_to_query_name_for_joystick_at_index
jmp 0x1005035f
xor eax, eax
lea ecx, [ebp - 0x240]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x210]
push eax
call fcn.100425f0
mov ecx, dword [ebp - 0x540]
lea eax, [ebp - 0x240]
push eax
mov byte [ebp - 4], 0x10
call fcn.100426b0
lea ecx, [ebp - 0x240]
call fcn.10004350
lea ecx, [ebp - 0x5e8]
call fcn.1004dcb0
mov ecx, dword [ebp - 0x214]
cmp ecx, 7
jbe 0x10050042
mov edx, dword [ebp - 0x228]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10050038
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10050682
jmp 0x10050038
call fcn.1000281b
call fcn.100735b5
int3