Function at 0x47fbe0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90c
push esi
push edi
mov dword [ebp - 0x900], ecx
mov ecx, dword [ebp + 8]
call fcn.0040d670
mov dword [ebp - 0x21c], 0
cmp dword [ebp + 0xc], 0
jne 0x47fd0a
call dword [sym.imp.WINMM.dll_waveOutGetNumDevs]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], 0
jmp 0x47fc34
mov eax, dword [ebp - 0x220]
add eax, 1
mov dword [ebp - 0x220], eax
mov ecx, dword [ebp - 0x220]
cmp ecx, dword [ebp - 0x21c]
jge 0x47fd05
push 0x54
lea edx, [ebp - 0x2c4]
push edx
mov eax, dword [ebp - 0x220]
push eax
call dword [sym.imp.WINMM.dll_waveOutGetDevCapsW]
test eax, eax
jne 0x47fd00
mov ecx, dword [ebp - 0x900]
cmp dword [ecx + 0x6fe38], 0
jne 0x47fc9a
lea edx, [ebp - 0x2bc]
push edx
push 0x533a54
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x47fc9a
push 0x5307b8
mov ecx, dword [ebp + 8]
call fcn.0040d610
jmp 0x47fd00
lea eax, [ebp - 0x2bc]
push eax
push 0x5325e8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47fcca
lea ecx, [ebp - 0x2bc]
push ecx
push 0x533a54
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x47fcdb
lea edx, [ebp - 0x2bc]
push edx
mov ecx, dword [ebp + 8]
call fcn.0040d610
jmp 0x47fd00
lea eax, [ebp - 0x2bc]
push eax
push 0x532e08
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x47fd00
push 0x5325e8
mov ecx, dword [ebp + 8]
call fcn.0040d610
jmp 0x47fc25
jmp 0x47ff20
cmp dword [ebp + 0xc], 1
jne 0x47ff20
call dword [sym.imp.WINMM.dll_waveInGetNumDevs]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], 0
jmp 0x47fd3b
mov ecx, dword [ebp - 0x220]
add ecx, 1
mov dword [ebp - 0x220], ecx
mov edx, dword [ebp - 0x220]
cmp edx, dword [ebp - 0x21c]
jge 0x47ff20
push 0x50
lea eax, [ebp - 0x270]
push eax
mov ecx, dword [ebp - 0x220]
push ecx
call dword [sym.imp.WINMM.dll_waveInGetDevCapsW]
test eax, eax
jne 0x47ff1b
mov edx, dword [ebp - 0x900]
cmp dword [edx + 0x6fe38], 0
jne 0x47fdd4
lea eax, [ebp - 0x268]
push eax
push 0x5309b8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47fdc2
lea ecx, [ebp - 0x268]
push ecx
push 0x533248
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47fdc2
lea edx, [ebp - 0x268]
push edx
push 0x5329e8
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x47fdd4
push 0x533048
mov ecx, dword [ebp + 8]
call fcn.0040d610
jmp 0x47ff1b
lea eax, [ebp - 0x268]
push eax
push 0x533454
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea ecx, [ebp - 0x268]
push ecx
push 0x5309b8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea edx, [ebp - 0x268]
push edx
push 0x533248
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea eax, [ebp - 0x268]
push eax
push 0x533ca0
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea ecx, [ebp - 0x268]
push ecx
push 0x5323e8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea edx, [ebp - 0x268]
push edx
push 0x531fe0
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea eax, [ebp - 0x268]
push eax
push 0x5321e8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea ecx, [ebp - 0x268]
push ecx
push 0x532be8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea edx, [ebp - 0x268]
push edx
push 0x5327e8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea eax, [ebp - 0x268]
push eax
push 0x533654
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea ecx, [ebp - 0x268]
push ecx
push 0x533854
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x47ff0c
lea edx, [ebp - 0x268]
push edx
push 0x5329e8
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x47ff1b
lea eax, [ebp - 0x268]
push eax
mov ecx, dword [ebp + 8]
call fcn.0040d610
jmp 0x47fd2c
mov dword [ebp - 4], 0
mov dword [ebp - 8], 1
mov ecx, 0x26
mov esi, str.SYSTEMCurrentControlSetControlMediaResourcesSetupPreferredAudioDevices_
lea edi, [ebp - 0x4d0]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x5c
xor eax, eax
lea edi, [ebp - 0x438]
rep stosd dword es:[edi], eax
mov dword [ebp - 0xc], 4
mov dword [ebp - 0x2c8], 0x208
mov dword [ebp - 0x10], 4
lea ecx, [ebp - 4]
push ecx
push 0x2001f
push 0
lea edx, [ebp - 0x4d0]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x47ffd2
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x2c8]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0
push 0x510e2c
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x47ffd0
push ecx
mov ecx, esp
mov dword [ebp - 0x8f4], esp
push 0x510e6c
call fcn.004d02f7
mov dword [ebp - 0x904], eax
mov ecx, dword [ebp - 0x900]
call fcn.00480ddb
jmp 0x47fff6
push ecx
mov ecx, esp
mov dword [ebp - 0x8f8], esp
push str.default1.ini
call fcn.004d02f7
mov dword [ebp - 0x908], eax
mov ecx, dword [ebp - 0x900]
call fcn.00480ddb
lea ecx, [ebp - 4]
push ecx
push 1
push 0
lea edx, [ebp - 0x4d0]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x480034
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x2c8]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0
push 0x510ea4
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 4], 0
mov dword [ebp - 8], 1
push 0x510ee4
lea ecx, [ebp - 0x4d0]
push ecx
call fcn.004ba79a
add esp, 8
mov dword [ebp - 0x10], 0x208
mov dword [ebp - 0xc], 1
push 0x5304e0
lea edx, [ebp - 0x218]
push edx
call fcn.004ba79a
add esp, 8
lea eax, [ebp - 4]
push eax
push 0x2001f
push 0
lea ecx, [ebp - 0x4d0]
push ecx
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4800bd
push ecx
mov ecx, esp
mov dword [ebp - 0x8fc], esp
push str.default.ini
call fcn.004d02f7
mov dword [ebp - 0x90c], eax
mov ecx, dword [ebp - 0x900]
call fcn.00480ddb
lea edx, [ebp - 4]
push edx
push 0x2001f
push 0
lea eax, [ebp - 0x4d0]
push eax
push reloc.DSOUND.dll_DirectSoundCreate
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x480593
cmp dword [ebp + 0xc], 0
jne 0x480330
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0xc]
push eax
push 0
push 0x510f54
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x48032b
mov byte [ebp - 0x4d4], 0
mov dword [ebp - 0x220], 0
jmp 0x480136
mov edx, dword [ebp - 0x220]
add edx, 1
mov dword [ebp - 0x220], edx
mov ecx, dword [ebp + 8]
call fcn.004047c0
cmp dword [ebp - 0x220], eax
jge 0x4802e2
lea eax, [ebp - 0x6dc]
push eax
mov ecx, dword [ebp - 0x220]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00404820
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x6dc]
push eax
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x480195
mov ecx, dword [ebp - 0x220]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004047f0
mov byte [ebp - 0x4d4], 1
jmp 0x480223
lea edx, [ebp - 0x6dc]
push edx
push 0x5325e8
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x4801dd
lea eax, [ebp - 0x218]
push eax
push 0x532e08
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x4801dd
mov ecx, dword [ebp - 0x220]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004047f0
mov byte [ebp - 0x4d4], 1
jmp 0x480223
lea edx, [ebp - 0x218]
push edx
push 0x533a54
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x480223
lea eax, [ebp - 0x6dc]
push eax
push 0x5307b8
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x480223
mov ecx, dword [ebp - 0x220]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004047f0
mov byte [ebp - 0x4d4], 1
mov edx, dword [ebp - 0x900]
cmp dword [edx + 0x119c], 0
je 0x4802cb
mov eax, dword [ebp - 0x4d4]
and eax, 0xff
test eax, eax
je 0x4802cb
lea ecx, [ebp - 0x6dc]
push ecx
push 0x5325e8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x480279
lea edx, [ebp - 0x218]
push edx
push 0x532e08
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x48028b
mov eax, dword [ebp - 0x900]
mov dword [eax + 0x6e74c], 0
jmp 0x4802cb
lea ecx, [ebp - 0x6dc]
push ecx
push 0x533a54
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x4802bb
lea edx, [ebp - 0x6dc]
push edx
push 0x5307b8
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x4802cb
mov eax, dword [ebp - 0x900]
mov dword [eax + 0x6e74c], 2
mov ecx, dword [ebp - 0x4d4]
and ecx, 0xff
test ecx, ecx
je 0x4802dd
jmp 0x4802e2
jmp 0x480127
mov edx, dword [ebp - 0x4d4]
and edx, 0xff
test edx, edx
jne 0x48032b
push 0x510f68
push 0
mov ecx, dword [ebp + 8]
call fcn.004821a0
mov dword [ebp - 0x6e0], eax
cmp dword [ebp - 0x6e0], 0xffffffff
jne 0x48031c
push 0
mov ecx, dword [ebp + 8]
call fcn.004047f0
jmp 0x48032b
mov eax, dword [ebp - 0x6e0]
push eax
mov ecx, dword [ebp + 8]
call fcn.004047f0
jmp 0x480577
cmp dword [ebp + 0xc], 1
jne 0x480577
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0xc]
push eax
push 0
push 0x510f78
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x480577
mov byte [ebp - 0x6e4], 0
mov dword [ebp - 0x220], 0
jmp 0x480384
mov edx, dword [ebp - 0x220]
add edx, 1
mov dword [ebp - 0x220], edx
mov ecx, dword [ebp + 8]
call fcn.004047c0
cmp dword [ebp - 0x220], eax
jge 0x48052e
lea eax, [ebp - 0x8ec]
push eax
mov ecx, dword [ebp - 0x220]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00404820
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x8ec]
push eax
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x4803e0
mov ecx, dword [ebp - 0x220]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004047f0
mov byte [ebp - 0x6e4], 1
jmp 0x480456
lea edx, [ebp - 0x218]
push edx
push 0x5309b8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x480428
lea eax, [ebp - 0x218]
push eax
push 0x533248
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x480428
lea ecx, [ebp - 0x218]
push ecx
push 0x5329e8
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x480456
lea edx, [ebp - 0x8ec]
push edx
push 0x533048
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x480456
mov eax, dword [ebp - 0x220]
push eax
mov ecx, dword [ebp + 8]
call fcn.004047f0
mov byte [ebp - 0x6e4], 1
mov ecx, dword [ebp - 0x900]
cmp dword [ecx + 0x119c], 0
je 0x480517
mov edx, dword [ebp - 0x6e4]
and edx, 0xff
test edx, edx
je 0x480517
lea eax, [ebp - 0x8ec]
push eax
push 0x533454
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x4804a7
mov ecx, dword [ebp - 0x900]
mov dword [ecx + 0x6e74c], 1
jmp 0x480517
lea edx, [ebp - 0x8ec]
push edx
push 0x5309b8
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x480507
lea eax, [ebp - 0x8ec]
push eax
push 0x533248
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x480507
lea ecx, [ebp - 0x8ec]
push ecx
push 0x533048
call fcn.004ba71e
add esp, 8
test eax, eax
je 0x480507
lea edx, [ebp - 0x8ec]
push edx
push 0x5329e8
call fcn.004ba71e
add esp, 8
test eax, eax
jne 0x480517
mov eax, dword [ebp - 0x900]
mov dword [eax + 0x6e74c], 3
mov ecx, dword [ebp - 0x6e4]
and ecx, 0xff
test ecx, ecx
je 0x480529
jmp 0x48052e
jmp 0x480375
mov edx, dword [ebp - 0x6e4]
and edx, 0xff
test edx, edx
jne 0x480577
push 0x510f88
push 0
mov ecx, dword [ebp + 8]
call fcn.004821a0
mov dword [ebp - 0x8f0], eax
cmp dword [ebp - 0x8f0], 0xffffffff
jne 0x480568
push 0
mov ecx, dword [ebp + 8]
call fcn.004047f0
jmp 0x480577
mov eax, dword [ebp - 0x8f0]
push eax
mov ecx, dword [ebp + 8]
call fcn.004047f0
push 4
lea ecx, [ebp - 0x2c8]
push ecx
push 4
push 0
push 0x510f98
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8