Function at 0x5399d0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x86acc6
mov eax, dword fs:[0]
push eax
sub esp, 0x238
mov eax, dword [0x8ce6f4]
xor eax, esp
mov dword [esp + 0x234], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x24c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x260]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x25c]
mov ecx, dword [eax - 0xc]
mov dword [esp + 0x254], 0
mov byte [esp + 0x17], 0
test ecx, ecx
je 0x539fd3
jge 0x539a3f
or eax, 0xffffffff
jmp 0x539a5f
push 0x404c48
push eax
call fcn.0080292f
add esp, 8
test eax, eax
jne 0x539a56
or eax, 0xffffffff
jmp 0x539a5f
sub eax, dword [esp + 0x25c]
sar eax, 1
inc eax
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x264]
call fcn.004ac570
push 0x3a
mov ecx, eax
mov byte [esp + 0x258], 1
call fcn.004d4200
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.004a9b50
lea esi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x24], esi
mov eax, dword [esp + 0x28]
mov bl, 3
add eax, 0xfffffff0
mov byte [esp + 0x254], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x539ac1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi - 0xc]
test eax, eax
je 0x539ade
push 0x407f58
push esi
call fcn.00801f5b
add esp, 8
test eax, eax
jne 0x539b95
mov ecx, dword [esp + 0x25c]
push 0x2e
push ecx
call fcn.00806ba1
add esp, 8
test eax, eax
jne 0x539af9
or eax, 0xffffffff
jmp 0x539b02
sub eax, dword [esp + 0x25c]
sar eax, 1
inc eax
push eax
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x264]
call fcn.004aa4c0
push eax
lea eax, [esp + 0x20]
push 0x410468
push eax
mov byte [esp + 0x260], 4
call fcn.004b1a10
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x258], 5
call fcn.004aa540
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x254], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x539b6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x254], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x539b91
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x24]
push 0
push ecx
lea ebp, [esi - 0x10]
mov dword [esp + 0x48], esp
mov edi, esp
push ebp
mov dword [esp + 0x50], ebp
call fcn.004a9b50
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov byte [esp + 0x25c], 6
call fcn.007c9a2f
mov ecx, dword [eax + 4]
lea ecx, [ecx + 0x360]
mov byte [esp + 0x25c], bl
call fcn.00528900
xor edi, edi
cmp eax, edi
je 0x539c2e
lea ecx, [esp + 0x1c]
push ecx
mov ecx, eax
mov byte [esp + 0x1b], 1
call fcn.004e0260
mov ecx, dword [esp + 0x3c]
push eax
mov byte [esp + 0x258], 7
call fcn.004aa540
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x254], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x539faa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x539faa
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
push 0x402a88
lea ecx, [esp + 0x1c]
mov byte [esp + 0x258], 8
call fcn.004a8f10
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x20]
push 0x40957c
push edx
mov byte [esp + 0x260], 9
call fcn.004b1a10
add esp, 0xc
mov eax, dword [esp + 0x1c]
push 0x2001f
push eax
push DirectSoundEnumerateW
lea ecx, [esp + 0x3c]
mov byte [esp + 0x260], 0xa
call fcn.004afb40
test eax, eax
jne 0x539ca1
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004aa540
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], edi
jne 0x539cca
push 0x2001f
push esi
push DirectSoundEnumerateW
lea ecx, [esp + 0x3c]
call fcn.004afb40
test eax, eax
jne 0x539f4b
mov eax, dword [esp + 0x18]
mov byte [esp + 0x17], 1
cmp dword [eax - 0xc], edi
jne 0x539ce6
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x1c]
call fcn.004aa540
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x38]
mov esi, eax
mov dword [esp + 0x2c], 0
test edi, edi
je 0x539d4b
cmp dword [edi], 0
je 0x539d3e
push 0x402cf8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x539d13
mov eax, 1
jmp 0x539d63
push 0x402ce0
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x539d0c
mov ecx, dword [edi]
push 0
push ecx
lea edx, [esp + 0x34]
push edx
push 0x2001f
push 0
push esi
push DirectSoundEnumerateW
call eax
jmp 0x539d63
cmp dword [edi + 4], 0
je 0x539d0c
lea ecx, [esp + 0x2c]
push ecx
jmp 0x539d50
lea edx, [esp + 0x2c]
push edx
push 0x2001f
push 0
push eax
push DirectSoundEnumerateW
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x539f39
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x539d7a
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0
test eax, eax
jne 0x539f39
push 0x200
push eax
lea eax, [esp + 0x50]
push eax
call fcn.00802690
add esp, 0xc
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x48]
push eax
push 0
push 0
push esi
mov dword [esp + 0x40], 0x200
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x539f39
mov eax, dword [esp + 0x40]
cmp eax, 1
je 0x539de1
cmp eax, 2
jne 0x539f39
mov eax, dword [esp + 0x28]
test eax, eax
je 0x539e01
test al, 1
jne 0x539f39
shr eax, 1
cmp word [esp + eax*2 + 0x46], 0
jne 0x539f39
jmp 0x539e08
xor ecx, ecx
mov word [esp + 0x48], cx
lea edx, [esp + 0x48]
push edx
lea ecx, [esp + 0x24]
call fcn.004a8f10
lea ecx, [esp + 0x20]
mov byte [esp + 0x254], 0xb
call fcn.004aa620
mov ecx, eax
call fcn.004aa3a0
mov ebp, dword [esp + 0x20]
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x539f15
mov esi, dword [esp + 0x18]
xor eax, eax
test esi, esi
setne al
test eax, eax
je 0x539f0b
mov ecx, esi
mov eax, ebp
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x539e7a
test dx, dx
je 0x539e76
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x539e7a
add eax, 4
add ecx, 4
test dx, dx
jne 0x539e54
xor eax, eax
jmp 0x539e7f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
jne 0x539f15
lea eax, [ebp - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x539ede
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x539ecf
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x539ecf
push eax
call fcn.004a9b50
add esp, 4
mov ebp, eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x539ec6
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
add ebp, 0x10
mov dword [esp + 0x18], ebp
jmp 0x539eda
push ebx
push ebp
lea ecx, [esp + 0x20]
call fcn.004a8db0
mov ebp, dword [esp + 0x20]
lea eax, [ebp - 0x10]
mov byte [esp + 0x254], 0xa
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x539ce2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x539ce2
push 0x80004005
call fcn.004a8210
lea eax, [ebp - 0x10]
mov byte [esp + 0x254], 0xa
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x539f39
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x40]
call fcn.004aa540
mov ebp, dword [esp + 0x44]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x254], 9
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x539f73
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x254], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x539f9b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x539faa
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x254], 0
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x539fcc
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov eax, dword [esp + 0x25c]
add eax, 0xfffffff0
mov dword [esp + 0x254], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x539ffa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x24c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.0080262b
add esp, 0x244
ret