Function at 0xafed20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x52c
nop
mov dword [eax*4 + 0x1a526e0], 0
mov dword [eax*4 + 0x1a50940], 0
add eax, 1
cmp eax, 0x10
jne 0xafed30
call dword [sym.imp.WINMM.DLL_joyGetNumDevs]
mov dword [ebp - 0x4f4], 0
test eax, eax
mov dword [ebp - 0x4f8], eax
jle 0xafedbe
lea eax, [ebp - 0x4e8]
mov ebx, 1
mov dword [ebp - 0x50c], eax
lea esi, [esi]
lea eax, [ebp - 0x54]
lea esi, [ebx - 1]
mov dword [ebp - 0x54], 0x34
mov dword [ebp - 0x50], 0xff
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.WINMM.DLL_joyGetPosEx]
sub esp, 8
test eax, eax
je 0xafedd0
mov esi, ebx
add ebx, 1
cmp dword [ebp - 0x4f4], 0xf
jg 0xafedbe
cmp dword [ebp - 0x4f8], esi
jg 0xafed80
mov eax, dword [ebp - 0x4f4]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x4e8]
mov dword [esp + 8], 0x194
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.WINMM.DLL_joyGetDevCapsA]
sub esp, 0xc
test eax, eax
jne 0xafeda8
mov eax, dword [ebp - 0x4f4]
mov ecx, 0x65
mov dword [eax*4 + 0x1a526e0], esi
imul eax, eax, 0x194
mov esi, dword [ebp - 0x50c]
add eax, 0x1a50da0
mov edi, eax
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x478]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x154]
mov dword [esp + 0x14], 0x125afc0
mov dword [esp + 0xc], str.SystemCurrentControlSetControlMediaResourcesJoystick
mov dword [esp + 8], str._s_s_s
mov dword [esp + 4], 0x100
mov dword [esp], eax
call fcn.01088520
lea eax, [ebp - 0x1c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x154]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0x80000002
call edi
mov ecx, 0x80000002
sub esp, 0x14
test eax, eax
jne 0xafef60
lea edx, [ebp - 0x254]
mov esi, ebx
mov dword [ebp - 0x500], ecx
mov dword [esp], edx
mov dword [esp + 0x10], str.OEMName
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.Joystick_d_s
mov dword [esp + 4], 0x100
mov dword [ebp - 0x504], edx
mov dword [ebp - 0x20], 0x100
call fcn.01088520
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 0x504]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x354]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], 0
mov dword [esp + 4], edx
mov dword [esp + 8], 0
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x4ec], eax
call eax
mov dword [ebp - 0x4fc], eax
mov eax, dword [ebp - 0x1c]
sub esp, 0x18
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x4f0], eax
call eax
mov ecx, dword [ebp - 0x4fc]
xor edx, edx
sub esp, 4
test ecx, ecx
je 0xafef9b
lea esi, [esi]
mov eax, dword [ebp - 0x4f4]
mov dword [eax*4 + 0x1a50940], edx
add eax, 1
mov dword [ebp - 0x4f4], eax
jmp 0xafedaa
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x154]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0x80000001
call edi
sub esp, 0x14
test eax, eax
je 0xaff073
mov esi, ebx
xor edx, edx
jmp 0xafef40
lea eax, [ebp - 0x354]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x154]
mov dword [ebp - 0x504], edx
mov dword [esp + 0xc], str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
mov dword [esp + 8], 0x125b080
mov dword [esp + 4], 0x100
mov dword [esp], eax
call fcn.01088520
mov ecx, dword [ebp - 0x500]
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x154]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], ecx
call edi
mov edx, dword [ebp - 0x504]
sub esp, 0x14
test eax, eax
jne 0xafef40
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], 0x100
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.OEMName
mov dword [esp], eax
call dword [ebp - 0x4ec]
mov edx, dword [ebp - 0x504]
sub esp, 0x18
test eax, eax
je 0xaff07d
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x504], edx
mov dword [esp], eax
call dword [ebp - 0x4f0]
mov edx, dword [ebp - 0x504]
push eax
jmp 0xafef40
mov ecx, 0x80000001
jmp 0xafee91
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov edx, eax
je 0xaff055
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x10], edx
mov dword [ebp - 0x504], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.OEMName
mov dword [esp], eax
call dword [ebp - 0x4ec]
mov edx, dword [ebp - 0x504]
sub esp, 0x18
jmp 0xaff055