Function at 0x4d3a10
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x51c
xor eax, eax
nop
mov dword [eax*4 + 0x5e5d08], 0
mov dword [eax*4 + 0x5e7688], 0
inc eax
cmp eax, 0x10
jne 0x4d3a20
call sub.WINMM.DLL_joyGetNumDevs
mov dword [ebp - 0x4f0], eax
test eax, eax
jle 0x4d3d24
mov ebx, 1
mov dword [ebp - 0x4ec], 0
lea eax, [ebp - 0x4e8]
mov dword [ebp - 0x4fc], eax
jmp 0x4d3a86
cmp dword [ebp - 0x4f0], ebx
jle 0x4d3c28
inc ebx
cmp dword [ebp - 0x4ec], 0xf
jg 0x4d3c28
mov dword [ebp - 0x54], 0x34
mov dword [ebp - 0x50], 0xff
lea esi, [ebx - 1]
lea edx, [ebp - 0x54]
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.WINMM.DLL_joyGetPosEx
sub esp, 8
test eax, eax
jne 0x4d3a6c
mov dword [esp + 8], 0x194
lea eax, [ebp - 0x4e8]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.WINMM.DLL_joyGetDevCapsA
sub esp, 0xc
test eax, eax
jne 0x4d3a6c
mov edx, dword [ebp - 0x4ec]
mov dword [edx*4 + 0x5e5d08], esi
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
lea edi, [eax*4 + 0x5e5d48]
mov ecx, 0x65
mov esi, dword [ebp - 0x4fc]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x14], str.CurrentJoystickSettings
lea eax, [ebp - 0x478]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.SystemCurrentControlSetControlMediaResourcesJoystick
mov dword [esp + 8], str._s_s_s
mov dword [esp + 4], 0x100
lea edx, [ebp - 0x154]
mov dword [esp], edx
call fcn.0053cc40
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
lea edx, [ebp - 0x154]
mov dword [esp + 4], edx
mov dword [esp], 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
sub esp, 0x14
test eax, eax
jne 0x4d3c38
mov esi, 0x80000002
mov dword [ebp - 0x20], 0x100
mov dword [esp + 0x10], str.OEMName
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.Joystick_d_s
mov dword [esp + 4], 0x100
lea eax, [ebp - 0x254]
mov dword [esp], eax
call fcn.0053cc40
lea edi, [ebp - 0x20]
mov dword [esp + 0x14], edi
lea edx, [ebp - 0x354]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x254]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov dword [ebp - 0x4f4], edx
call sub.ADVAPI32.DLL_RegQueryValueExA
sub esp, 0x18
mov ecx, eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov dword [ebp - 0x4f8], ecx
call sub.ADVAPI32.DLL_RegCloseKey
push eax
mov ecx, dword [ebp - 0x4f8]
test ecx, ecx
mov edx, dword [ebp - 0x4f4]
je 0x4d3c76
lea esi, [esi]
xor esi, esi
mov eax, dword [ebp - 0x4ec]
mov dword [eax*4 + 0x5e7688], esi
inc eax
mov dword [ebp - 0x4ec], eax
cmp dword [ebp - 0x4f0], ebx
jg 0x4d3a78
nop
mov eax, dword [ebp - 0x4ec]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
lea edx, [ebp - 0x154]
mov dword [esp + 4], edx
mov dword [esp], 0x80000001
call sub.ADVAPI32.DLL_RegOpenKeyExA
sub esp, 0x14
test eax, eax
jne 0x4d3c04
mov esi, 0x80000001
jmp 0x4d3b6d
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.SystemCurrentControlSetControlMediaPropertiesPrivatePropertiesJoystickOEM
mov dword [esp + 8], str._s_s
mov dword [esp + 4], 0x100
lea edx, [ebp - 0x154]
mov dword [esp], edx
call fcn.0053cc40
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x20019
mov dword [esp + 8], 0
lea edx, [ebp - 0x154]
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.ADVAPI32.DLL_RegOpenKeyExA
sub esp, 0x14
test eax, eax
jne 0x4d3c04
mov dword [ebp - 0x20], 0x100
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.OEMName
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegQueryValueExA
sub esp, 0x18
xor esi, esi
test eax, eax
je 0x4d3d33
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegCloseKey
push edi
jmp 0x4d3c06
mov dword [ebp - 0x4ec], 0
jmp 0x4d3c28
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je 0x4d3d13
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.OEMName
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.ADVAPI32.DLL_RegQueryValueExA
sub esp, 0x18
jmp 0x4d3d13