Function at 0x589cf0
Capabilities:
Access peb ldr_data
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x8721cb
mov eax, dword fs:[0]
push eax
sub esp, 0x470
mov eax, dword [0x8ce6f4]
xor eax, esp
mov dword [esp + 0x46c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x484]
mov dword fs:[0], eax
mov ebp, ecx
xor ebx, ebx
push 0x4203c8
lea ecx, [esp + 0x1c]
xor esi, esi
mov dword [esp + 0x68], ebx
call fcn.004a8f10
mov dword [esp + 0x48c], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
push 0x4203b0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x498], 1
call fcn.004af3d0
mov eax, dword [eax]
add esp, 0xc
push 0x20019
push eax
push DirectSoundEnumerateW
lea ecx, [esp + 0x28]
call fcn.004afb40
test eax, eax
mov eax, dword [esp + 0x28]
setne byte [esp + 0x17]
add eax, 0xfffffff0
or edi, 0xffffffff
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x589db4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x17], 0
je 0x589de7
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x589dca
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x48c], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jmp 0x58a39e
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x74]
push edx
push esi
lea ecx, [esp + 0x28]
mov dword [esp + 0x44], 0x104
call fcn.004afbc0
test eax, eax
jne 0x589dbb
mov edi, dword [esp + 0x1c]
cmp edi, esi
je 0x589e1c
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x1c], esi
mov edi, esi
lea ecx, [esp + 0x70]
push ecx
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], esi
call fcn.004a8f10
push 0x420394
push eax
lea edx, [esp + 0x30]
push edx
mov byte [esp + 0x498], 2
call fcn.004af3d0
mov eax, dword [eax]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp + 0x130], eax
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x589e78
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x48c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x589ea0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x130]
cmp eax, esi
jne 0x589eb8
cmp edi, esi
je 0x58a383
push edi
jmp 0x58a37d
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x420384
push eax
call edi
mov ecx, dword [ebp + 0x130]
push 0x420378
push ecx
mov dword [ebp + 0x124], eax
call edi
mov edx, dword [ebp + 0x130]
push 0x420364
push edx
mov dword [ebp + 0x128], eax
call edi
mov dword [ebp + 0x12c], eax
cmp dword [ebp + 0x124], esi
je 0x58a374
cmp dword [ebp + 0x128], esi
je 0x58a374
cmp eax, esi
je 0x58a374
mov eax, dword [esp + 0x18]
push 0x20019
push eax
push DirectSoundEnumerateW
lea ecx, [esp + 0x28]
call fcn.004afb40
test eax, eax
jne 0x58a197
lea ecx, [esp + 0x28]
call fcn.005345e0
mov byte [esp + 0x48c], 3
mov edi, 0x104
mov dword [esp + 0x2c], esi
lea ecx, [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x30]
push esi
push esi
push esi
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x84]
push eax
push ecx
push edx
mov dword [esp + 0x58], edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x58a0f3
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
push 0x401fc4
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x68]
push ecx
mov byte [esp + 0x498], 4
mov dword [esp + 0x60], edi
call fcn.004af3d0
lea edx, [esp + 0x7c]
push edx
push eax
lea eax, [esp + 0x60]
or ebx, 1
push eax
mov byte [esp + 0x4a4], 5
mov dword [esp + 0x7c], ebx
call fcn.004af3d0
mov eax, dword [eax]
add esp, 0x18
push 0x20019
push eax
push DirectSoundEnumerateW
lea ecx, [esp + 0x4c]
or ebx, 2
call fcn.004afb40
test eax, eax
jne 0x58a00a
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x27c]
push edx
push esi
lea ecx, [esp + 0x4c]
call fcn.004afbc0
mov byte [esp + 0x17], 0
test eax, eax
je 0x58a00f
mov byte [esp + 0x17], 1
test bl, 2
je 0x58a020
lea ecx, [esp + 0x4c]
and ebx, 0xfffffffd
call fcn.004a8c20
mov dword [esp + 0x48c], 4
test bl, 1
je 0x58a03c
lea ecx, [esp + 0x60]
and ebx, 0xfffffffe
call fcn.004a8c20
cmp byte [esp + 0x17], 0
jne 0x58a0d9
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x40]
call fcn.004a8f10
push 0x3d
push eax
lea ecx, [esp + 0x58]
push ecx
mov byte [esp + 0x498], 6
call fcn.004c9780
lea edx, [esp + 0x284]
push edx
push eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0x4a4], 7
call fcn.004af3d0
push 0x7c
push eax
lea ecx, [esp + 0x7c]
push ecx
mov byte [esp + 0x4b0], 8
call fcn.004c9780
add esp, 0x24
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x494], 9
call fcn.004a9f20
lea ecx, [esp + 0x5c]
call fcn.004a8c20
lea ecx, [esp + 0x58]
call fcn.004a8c20
lea ecx, [esp + 0x50]
call fcn.004a8c20
lea ecx, [esp + 0x3c]
call fcn.004a8c20
lea ecx, [esp + 0x40]
mov byte [esp + 0x48c], 3
call fcn.004b0100
inc dword [esp + 0x2c]
jmp 0x589f4e
lea ecx, [esp + 0x1c]
call reloc.ole32.dll_CoUninitialize
mov edi, dword [esp + 0x28]
mov eax, dword [edi - 0xc]
cmp eax, esi
je 0x58a173
inc eax
push eax
call fcn.007c8558
add esp, 4
push edi
lea ecx, [esp + 0x40]
mov esi, eax
call fcn.004b6720
mov eax, dword [eax]
mov ecx, dword [edi - 0xc]
push eax
inc ecx
push ecx
push esi
call fcn.0080a48a
add esp, 0xc
lea ecx, [esp + 0x3c]
call fcn.004a8c20
mov eax, esi
xor ecx, ecx
lea ebx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x58a140
sub eax, ebx
je 0x58a15f
jmp 0x58a150
cmp byte [ecx + esi], 0x7c
jne 0x58a15a
mov byte [ecx + esi], 0
inc ecx
cmp ecx, eax
jb 0x58a150
mov edx, dword [ebp + 0x12c]
push esi
call edx
push esi
call fcn.007c8563
add esp, 4
xor esi, esi
lea eax, [edi - 0x10]
mov byte [esp + 0x48c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x58a197
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0x124]
lea edi, [ebp + 0x134]
push edi
call ecx
test eax, eax
je 0x58a1dd
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x58a1b9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x48c], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x58a39e
mov eax, dword [edi]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
lea edi, [ebp + 0x138]
push edi
push eax
call edx
test eax, eax
jne 0x58a2fb
mov eax, dword [edi]
push eax
lea ecx, [ebp + 0x144]
call fcn.00588910
test eax, eax
je 0x58a2fb
mov eax, dword [edi]
push eax
lea ecx, [ebp + 0x148]
call fcn.00588950
test eax, eax
je 0x58a2fb
mov eax, dword [edi]
push eax
lea ecx, [ebp + 0x13c]
call fcn.005888d0
mov eax, dword [ebp + 0x13c]
mov edx, dword [eax]
push 0
push 0
lea ecx, [ebp + 0x20]
push ecx
push eax
mov eax, dword [edx + 0x10]
call eax
mov eax, dword [ebp + 0x13c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x28]
push eax
call edx
push eax
lea ecx, [ebp + 0x140]
call fcn.005b1960
mov esi, dword [ebp + 0x13c]
push esi
lea ecx, [esp + 0x34]
call fcn.00588b40
mov eax, dword [esp + 0x30]
mov bl, 0xa
mov byte [esp + 0x48c], bl
test eax, eax
je 0x58a28e
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push 0x12c
push eax
call edx
mov eax, dword [edi]
push eax
lea ecx, [esp + 0x38]
call fcn.00588b70
mov eax, dword [esp + 0x34]
mov byte [esp + 0x48c], 0xb
test eax, eax
je 0x58a2ba
mov edx, dword [eax]
push 6
push 0
lea ecx, [ebp + 0xc]
push ecx
push eax
mov eax, dword [edx + 0xc]
call eax
mov eax, dword [edi]
mov edx, dword [eax]
lea ecx, [ebp + 0x10]
push ecx
push eax
mov eax, dword [edx + 0x40]
call eax
test eax, eax
je 0x58a312
mov eax, dword [esp + 0x34]
mov byte [esp + 0x48c], bl
test eax, eax
je 0x58a2e3
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x30]
mov byte [esp + 0x48c], 1
test eax, eax
je 0x58a2fb
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea ecx, [esp + 0x1c]
call fcn.004b0100
lea ecx, [esp + 0x18]
call fcn.004a8c20
jmp 0x58a3aa
mov edi, dword [edi]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
push ebp
push edi
call ecx
test eax, eax
mov eax, dword [esp + 0x34]
mov byte [esp + 0x48c], bl
je 0x58a33a
test eax, eax
je 0x58a2e3
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x58a2e3
test eax, eax
je 0x58a346
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x30]
mov byte [esp + 0x48c], 1
test eax, eax
je 0x58a35e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea ecx, [esp + 0x1c]
call fcn.004b0100
lea ecx, [esp + 0x18]
call fcn.004a8c20
mov al, 1
jmp 0x58a3ac
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x58a383
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x48c], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x58a3aa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x484]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x46c]
xor ecx, esp
call fcn.0080262b
add esp, 0x47c
ret