Function at 0x4cf180
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x8619ff
mov eax, dword fs:[0]
push eax
sub esp, 0x45c
mov eax, dword [0x8ce6f4]
xor eax, esp
mov dword [esp + 0x458], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x470]
mov dword fs:[0], eax
mov eax, dword [esp + 0x484]
mov edi, ecx
mov ecx, dword [esp + 0x488]
push ecx
push eax
push ecx
mov dword [esp + 0x54], ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push 0x402a88
mov dword [esp + 0x2c], edi
mov dword [esp + 0x54], eax
call fcn.004a8f10
mov eax, dword [esp + 0x48c]
push eax
mov ecx, edi
call fcn.004cdf60
xor ebp, ebp
mov dword [esp + 0x478], ebp
mov dword [edi], 0x407478
call fcn.007cff5d
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x4cf222
push 0x80004005
call fcn.004a8210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [edi + 0x88], eax
mov dword [edi + 0x8c], ebp
lea esi, [edi + 8]
push 0x48b790
push esi
mov byte [esp + 0x480], 2
call fcn.004c17a0
add esp, 8
test eax, eax
jne 0x4cf711
lea ecx, [esp + 0x34]
push esi
push ecx
call fcn.005c7660
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x24]
push 0x4074ec
push eax
mov byte [esp + 0x48c], 4
call fcn.004b1a10
mov eax, dword [eax]
add esp, 0x14
push 0x20019
push eax
push DirectSoundEnumerateW
lea ecx, [esp + 0x2c]
call fcn.004afb40
test eax, eax
mov eax, dword [esp + 0x18]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4cf2cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
mov ebx, dword [esp + 0x20]
je 0x4cf3bc
lea ecx, [esp + 0x2c]
push ecx
push ebp
lea edx, [esp + 0x20]
push edx
push ebp
push ebp
push ebx
mov dword [esp + 0x44], ebp
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebp
jne 0x4cf3a7
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x4cf30a
cmp eax, 2
jne 0x4cf3a7
mov esi, dword [esp + 0x2c]
shr esi, 1
mov dword [esp + 0x2c], esi
call fcn.007cff5d
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x4cf32e
push 0x80004005
call fcn.004a8210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x2c]
push ecx
push esi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x480], 5
call fcn.004a8cd0
push eax
push ebp
lea ecx, [esp + 0x2c]
call fcn.004afbc0
test eax, eax
jne 0x4cf37f
mov edx, dword [esp + 0x2c]
push edx
lea ecx, [esp + 0x18]
call fcn.004b0180
lea eax, [esp + 0x14]
lea ecx, [edi + 0x18]
push eax
call fcn.004aa540
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x478], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4cf3a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp ebx, ebp
je 0x4cf3b8
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
push 0x20019
push 0x407480
push DirectSoundEnumerateW
lea ecx, [esp + 0x44]
mov byte [esp + 0x484], 6
call fcn.004afb40
test eax, eax
jne 0x4cf6b3
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
push 0x20019
push ecx
push edx
lea ecx, [esp + 0x2c]
call fcn.004afb40
test eax, eax
je 0x4cf50f
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov ebx, dword [esp + 0x20]
xor esi, esi
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x3c]
push ebp
push ebp
push ebp
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x80]
push edx
push esi
push eax
mov dword [esp + 0x34], 0x100
call edi
test eax, eax
jne 0x4cf515
mov edx, dword [esp + 0x38]
push 0x20019
lea ecx, [esp + 0x70]
push ecx
push edx
lea ecx, [esp + 0x2c]
call fcn.004afb40
test eax, eax
jne 0x4cf501
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x270]
push ecx
push 0x402dd0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], 0x100
call fcn.004afbc0
test eax, eax
jne 0x4cf4e2
push ecx
lea edx, [esp + 0x270]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.004a8f10
lea eax, [esp + 0x50]
push eax
call fcn.005c4ec0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x64], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x68], edx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x24]
add eax, 8
push eax
lea eax, [esp + 0x68]
push eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edx
call fcn.004c17a0
add esp, 0x10
test eax, eax
jne 0x4cf50b
mov ebx, dword [esp + 0x20]
cmp ebx, ebp
je 0x4cf4f7
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebp
inc esi
jmp 0x4cf41c
mov ebx, dword [esp + 0x20]
inc esi
jmp 0x4cf41c
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
jmp 0x4cf519
mov edi, dword [esp + 0x1c]
cmp ebx, ebp
je 0x4cf6b3
lea ecx, [esp + 0x14]
push ecx
push ebp
lea edx, [esp + 0x20]
push edx
push ebp
push 0x407458
push ebx
mov dword [esp + 0x2c], ebp
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebp
jne 0x4cf61f
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x4cf557
cmp eax, 2
jne 0x4cf61f
mov esi, dword [esp + 0x14]
shr esi, 1
mov dword [esp + 0x18], esi
call fcn.007cff5d
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x4cf57b
push 0x80004005
call fcn.004a8210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov byte [esp + 0x478], 7
cmp esi, ebp
jge 0x4cf5a1
push 0x80070057
call fcn.004a8210
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, esi
or eax, ecx
jge 0x4cf5c0
push esi
lea ecx, [esp + 0x18]
call fcn.004a8a90
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push edi
push 0x407458
lea ecx, [esp + 0x2c]
call fcn.004afbc0
test eax, eax
jne 0x4cf5f7
mov edx, dword [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
call fcn.004b0180
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
add ecx, 0x18
push eax
call fcn.004aa540
add edi, 0xfffffff0
mov byte [esp + 0x478], 6
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4cf61b
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push eax
push ebp
lea ecx, [esp + 0x20]
push ecx
push ebp
push 0x407440
push ebx
mov dword [esp + 0x44], ebp
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebp
jne 0x4cf6aa
mov edi, 3
cmp dword [esp + 0x18], edi
jne 0x4cf6a6
mov dword [esp + 0x18], ebp
mov edx, dword [esp + 0x2c]
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x47c], 8
call fcn.004cd4f0
mov esi, dword [esp + 0x18]
test al, al
je 0x4cf69d
lea eax, [esp + 0x2c]
push eax
push esi
lea ecx, [esp + 0x1c]
push ecx
push ebp
push 0x407440
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebp
jne 0x4cf69d
cmp dword [esp + 0x14], edi
jne 0x4cf69d
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
push edx
push esi
call fcn.004cd990
push esi
call fcn.007c8563
add esp, 4
mov edi, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov eax, dword [esp + 0x44]
cmp eax, 0x10000
jne 0x4cf6c5
cmp dword [esp + 0x48], 0x20
je 0x4cf6cf
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0x48]
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x38]
cmp eax, ebp
je 0x4cf6de
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, ebp
je 0x4cf6e9
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x478], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4cf711
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x470]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x458]
xor ecx, esp
call fcn.0080262b
add esp, 0x468
ret 0xc