Function at 0x10066320
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10161f39
mov eax, dword fs:[0]
push eax
sub esp, 0x5dc
mov eax, dword [0x102a0600]
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.100806ce
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.10058e50
mov dword [ebp - 0x538], 1
mov ecx, dword [ebp - 0x544]
test ecx, ecx
je 0x100663db
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
mov ecx, eax
test ecx, ecx
je 0x100663db
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.10065350
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 0x10066461
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 0x1006656b
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x10066e6d
lea eax, [ecx + 1]
mov ecx, eax
mov dword [ebp - 0x528], eax
or ecx, 7
cmp ecx, edx
jbe 0x10066484
mov ecx, edx
jmp 0x1006649c
mov edi, esi
mov eax, edx
shr edi, 1
sub eax, edi
cmp esi, eax
jbe 0x10066494
mov ecx, edx
jmp 0x1006649c
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.1002a523
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 0x10066543
mov esi, dword [ebp - 0x228]
push esi
push ecx
call fcn.10086560
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 0x10066537
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x10066e72
mov esi, edx
push ecx
push esi
call fcn.100849ca
add esp, 8
jmp 0x1006655f
lea eax, [ebp - 0x228]
push eax
push ecx
call fcn.10086560
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 0x10066574
sub ecx, edx
lea eax, [ebp - 0x488]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x228]
call fcn.1000af24
mov ecx, dword [ebp - 0x218]
mov esi, dword [ebp - 0x214]
mov dword [ebp - 0x528], ecx
mov dword [ebp - 0x544], esi
cmp ecx, esi
jae 0x100665d7
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 0x100666f5
mov edx, 0x7ffffffe
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x10066e6d
lea eax, [ecx + 1]
mov ecx, eax
mov dword [ebp - 0x530], eax
or ecx, 7
cmp ecx, edx
jbe 0x100665ff
mov ecx, edx
jmp 0x10066626
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 0x1006661e
mov ecx, 0x7ffffffe
jmp 0x10066626
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.1002a523
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 0x100666cd
mov esi, dword [ebp - 0x228]
push esi
push ecx
call fcn.10086560
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 0x100666c1
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x10066e72
mov esi, edx
push ecx
push esi
call fcn.100849ca
add esp, 8
jmp 0x100666e9
lea eax, [ebp - 0x228]
push eax
push ecx
call fcn.10086560
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.1000af24
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 0x10066853
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 0x10066853
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.10066e80
add esp, 8
mov esi, eax
mov eax, dword [ebp - 0x52c]
push 0x10169560
push eax
push str.Unable_to_open_registry_for_joystick_at_index
mov byte [ebp - 4], 5
call fcn.10059d40
push eax
call fcn.10046620
add esp, 8
mov ecx, eax
call fcn.10047840
push eax
call fcn.10046620
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0xf
jbe 0x100667d4
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.1004af50
push eax
call fcn.10046f60
add esp, 0x10
lea ecx, [ebp - 0x240]
call fcn.1000b0cb
mov ecx, dword [ebp - 0x214]
cmp ecx, 7
jbe 0x10066832
mov edx, dword [ebp - 0x228]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10066828
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10066e72
push ecx
push edx
call fcn.100849ca
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.10084465
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x598]
mov dword [ebp - 0x5e8], 0x1016db64
call fcn.10064520
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.10066fc0
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.10084566
mov esi, eax
add esp, 4
test esi, esi
je 0x1006692d
push 1
mov byte [ebp - 4], 9
call fcn.100806ce
add esp, 4
mov dword [esi + 4], eax
jmp 0x1006692f
xor esi, esi
lea ecx, [ebp - 0x5e4]
mov dword [ebp - 0x5b0], esi
call fcn.10055900
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.10064860
push 8
push str.Joystick
lea ecx, [ebp - 0x228]
call fcn.10065350
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 0x100669fd
mov eax, dword [ebp - 0x5c4]
mov ecx, dword [eax]
test ecx, ecx
je 0x100669fd
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 0x10066a33
test dl, 4
jne 0x10066a27
mov eax, dword [ebp - 0x5c8]
mov ecx, dword [eax]
test ecx, ecx
je 0x10066a27
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 0x10066a33
mov ecx, dword [ebp - 0x548]
mov edx, dword [ebp - 0x54c]
test edx, edx
je 0x10066a4a
push ecx
push edx
lea ecx, [ebp - 0x240]
call fcn.10065350
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.1000af24
mov ecx, dword [ebp - 0x22c]
mov byte [ebp - 4], 0xa
cmp ecx, 7
jbe 0x10066ac4
mov edx, dword [ebp - 0x240]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10066aba
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10066e72
push ecx
push edx
call fcn.100849ca
add esp, 8
push 7
push str.OEMName
lea ecx, [ebp - 0x228]
call fcn.1000af24
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 0x10066ba5
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.10066e80
add esp, 8
mov esi, eax
push 0x10169560
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xd
push str.Unable_to_query_registry_key_for_joystick_at_index
call fcn.10059d40
push eax
call fcn.10046620
add esp, 8
mov ecx, eax
call fcn.10047840
push eax
call fcn.10046620
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0xf
jbe 0x10066b77
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.1004af50
push eax
call fcn.10046f60
add esp, 0x10
lea ecx, [ebp - 0x240]
call fcn.1000b0cb
lea ecx, [ebp - 0x5e8]
call fcn.10064a00
jmp 0x100667f2
push 0x4f
push str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
lea ecx, [ebp - 0x228]
call fcn.10065350
mov ecx, dword [ebp - 0x218]
mov esi, dword [ebp - 0x214]
mov dword [ebp - 0x534], ecx
mov dword [ebp - 0x530], esi
cmp ecx, esi
jae 0x10066bf8
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 0x10066d07
mov edx, 0x7ffffffe
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x10066e6d
lea eax, [ecx + 1]
mov ecx, eax
mov dword [ebp - 0x544], eax
or ecx, 7
cmp ecx, edx
jbe 0x10066c20
mov ecx, edx
jmp 0x10066c38
mov eax, esi
shr eax, 1
sub edx, eax
cmp esi, edx
jbe 0x10066c31
mov ecx, 0x7ffffffe
jmp 0x10066c38
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.1002a523
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 0x10066cdf
mov esi, dword [ebp - 0x228]
push esi
push ecx
call fcn.10086560
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 0x10066cd3
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x10066e72
mov esi, edx
push ecx
push esi
call fcn.100849ca
add esp, 8
jmp 0x10066cfb
lea eax, [ebp - 0x228]
push eax
push ecx
call fcn.10086560
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.1000af24
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 0x10066d80
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.10066e80
add esp, 8
mov esi, eax
push 0x10169560
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xe
push str.Unable_to_open_registry_key_for_joystick_at_index
jmp 0x10066b4f
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 0x10066dea
lea eax, [ebp - 0x240]
push esi
push eax
call fcn.10066e80
add esp, 8
mov esi, eax
push 0x10169560
push dword [ebp - 0x52c]
mov byte [ebp - 4], 0xf
push str.Unable_to_query_name_for_joystick_at_index
jmp 0x10066b4f
xor eax, eax
lea ecx, [ebp - 0x240]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x210]
push eax
call fcn.10058f30
mov ecx, dword [ebp - 0x540]
lea eax, [ebp - 0x240]
push eax
mov byte [ebp - 4], 0x10
call fcn.10058ff0
lea ecx, [ebp - 0x240]
call fcn.1000a01e
lea ecx, [ebp - 0x5e8]
call fcn.10064a00
mov ecx, dword [ebp - 0x214]
cmp ecx, 7
jbe 0x10066832
mov edx, dword [ebp - 0x228]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10066828
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10066e72
jmp 0x10066828
call fcn.10002923
call fcn.1009532c
int3