Function at 0x405840
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x423cb8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x448090]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
mov edx, dword [ebp + 8]
test edx, edx
jne 0x405879
mov edx, 0x43dab0
lea esi, [ebx + 0x474]
mov dword [ebp + 8], esi
test edx, edx
jne 0x40588a
xor eax, eax
jmp 0x405899
mov eax, edx
lea edi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405890
sub eax, edi
mov edi, eax
push edx
mov eax, esi
call fcn.004043a0
mov edi, dword [ebp + 0x10]
test edi, edi
jne 0x4058af
mov edi, 0x43dab0
lea eax, [ebx + 0x47c]
mov dword [ebp - 0x1c], eax
test edi, edi
jne 0x4058c0
xor ecx, ecx
jmp 0x4058d1
mov ecx, edi
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x4058c5
sub ecx, esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
call fcn.004043a0
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jle 0x4059a6
push 0x3b
push eax
call fcn.00412d44
add esp, 8
test eax, eax
je 0x4059a6
sub eax, dword [esi]
mov edi, eax
js 0x4059a6
mov edx, dword [ebp + 8]
lea ecx, [edi + 1]
lea esi, [ebp - 0x18]
call fcn.004091e0
add ebx, 0x478
mov dword [ebp - 4], 0
mov dword [ebp + 0x10], ebx
call fcn.004040f0
or esi, 0xffffffff
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40594a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp + 8]
mov eax, edi
lea ecx, [ebp + 8]
mov edx, ebx
call fcn.00404160
mov dword [ebp - 4], 1
call fcn.004040f0
mov dword [ebp - 4], esi
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jg 0x405984
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x484]
mov ecx, dword [ebp + 0xc]
mov dword [ebx + 0x488], ecx
cmp eax, 0xc
ja case.default.0x40599f
jmp dword [eax*4 + 0x405de8]
lea esi, [ebx + 0x478]
mov dword [ebp + 0x10], esi
call fcn.00404340
jmp 0x405987
mov edx, str.WAMAAPO
jmp 0x405a2b
mov edx, str.WAMADOCKAAPO
jmp 0x405a2b
mov edx, str.WAMADOCKBAPO
jmp 0x405a2b
mov edx, str.WAMABAPO
jmp 0x405a2b
mov edx, str.WAMAAPOCAPTURE
jmp 0x405a2b
mov edx, str.WAMVSDAPO
jmp 0x405a2b
mov edx, str.WAMVSDAPOCAPTURE
jmp 0x405a2b
mov edx, str.WAMVAPOCAPTURE
jmp 0x405a2b
mov edx, str.WAMVDOCKAPOCAPTURE
jmp 0x405a2b
add ebx, 0x480
mov edx, str.WAMSAPOCAPTURE
call fcn.00404260
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x490], 0
mov ebx, edx
jmp case.default.0x40599f
mov eax, dword [ebp - 0x1c]
add ebx, 0x480
call fcn.004040f0
jmp 0x405a36
mov edx, str.WAMVPSSAPOCAPTURE
add ebx, 0x480
call fcn.00404260
mov ebx, dword [ebp - 0x10]
lea eax, [ebp + 0xc]
push eax
lea esi, [ebx + 0x480]
call fcn.00409380
mov dword [ebp - 4], 2
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x14]
push edx
mov esi, eax
call fcn.00409200
add esp, 0xc
mov byte [ebp - 4], 4
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a84
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebx + 0x480]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
mov dword [ebp + 8], 0
jge 0x405ab5
mov eax, 0x104
lea ecx, [ebx + 0x480]
call fcn.00404880
mov edx, dword [ebp - 0x14]
mov eax, dword [ebx + 0x46c]
mov ecx, dword [ebx + 0x480]
push edx
push eax
lea edx, [ebp + 8]
call fcn.00438af0
mov eax, dword [ebx + 0x480]
mov ecx, dword [eax - 8]
add esp, 8
test eax, eax
je 0x405af0
push ecx
push eax
call fcn.004130e3
add esp, 8
test eax, eax
js 0x405ddd
mov ecx, dword [ebx + 0x480]
cmp eax, dword [ecx - 8]
jg 0x405ddd
mov dword [ecx - 0xc], eax
mov ecx, dword [ebx + 0x480]
mov byte [eax + ecx], 0
mov eax, dword [ebx + 0x484]
test eax, eax
je 0x405b5e
cmp eax, 8
je 0x405b5e
cmp eax, 9
je 0x405b5e
cmp eax, 6
je 0x405b5e
cmp eax, 2
je 0x405b5e
cmp eax, 4
je 0x405b5e
cmp eax, 0xc
je 0x405b5e
cmp eax, 5
je 0x405b5e
cmp eax, 7
je 0x405b5e
cmp eax, 0xb
je 0x405b5e
lea esi, [ebx + 0x498]
lea eax, [ebx + 0x494]
mov ebx, esi
call fcn.004040f0
mov ebx, dword [ebp - 0x10]
jmp 0x405cc9
mov eax, dword [ebx + 0x498]
lea esi, [ebx + 0x498]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x405b8a
mov eax, 0x104
mov ecx, esi
call fcn.00404880
mov eax, dword [esi]
mov ecx, dword [ebp + 8]
mov edx, dword [ebx + 0x484]
call fcn.00439030
mov eax, dword [ebx + 0x4a8]
lea edi, [ebx + 0x4a8]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x405bc6
mov eax, 0x104
mov ecx, edi
call fcn.00404880
mov eax, dword [edi]
mov ecx, dword [ebp + 8]
mov edx, dword [ebx + 0x484]
call fcn.00439240
mov eax, dword [esi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x405bf1
push ecx
push eax
call fcn.004130e3
add esp, 8
test eax, eax
js 0x405ddd
mov ecx, dword [esi]
cmp eax, dword [ecx - 8]
jg 0x405ddd
mov dword [ecx - 0xc], eax
mov edx, dword [esi]
mov byte [eax + edx], 0
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x405c20
push ecx
push eax
call fcn.004130e3
add esp, 8
test eax, eax
js 0x405ddd
mov ecx, dword [edi]
cmp eax, dword [ecx - 8]
jg 0x405ddd
push str.Mode__d__d__u
mov dword [ecx - 0xc], eax
mov ecx, dword [edi]
lea edx, [ebp + 0x10]
push edi
push edx
mov byte [eax + ecx], 0
call fcn.004092b0
add esp, 0xc
mov byte [ebp - 4], 5
mov ecx, dword [eax]
mov edi, dword [ebx + 0x4a4]
lea eax, [ecx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x405ca6
cmp dword [edi + 0xc], 0
jl 0x405c97
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x405c97
call fcn.00404440
mov dword [ebp + 8], eax
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405c89
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp + 8]
add ecx, 0x10
mov dword [ebx + 0x4a4], ecx
jmp 0x405ca6
mov edi, dword [ecx - 0xc]
push ecx
lea eax, [ebx + 0x4a4]
call fcn.004043a0
mov byte [ebp - 4], 4
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405cc9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebx + 0x488]
mov ecx, eax
and ecx, 2
xor edi, edi
cmp cl, 2
jne 0x405ce2
mov edi, 0x200
jmp 0x405cee
and eax, 4
cmp al, 4
jne 0x405cee
mov edi, 0x100
mov edx, dword [esi]
mov eax, dword [ebx + 0x460]
lea esi, [ebx + 0x460]
mov dword [ebp + 8], edx
test eax, eax
je 0x405d1a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esi], 0
mov dword [ebx + 0x464], 0
mov eax, dword [ebp + 8]
push 0
push esi
push 0
or edi, 0x20017
push edi
push 0
push 0
push 0
push eax
push 0x80000002
mov dword [esi], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [ebp + 8]
push ecx
mov ecx, dword [ebx + 0x460]
lea edx, [ebx + 0x550]
push edx
lea eax, [ebp + 0x10]
push eax
push 0
push str.ActiveOutputMode
mov edi, 4
push ecx
mov dword [ebp + 8], edi
call esi
lea edx, [ebp + 0x10]
push edx
mov edx, dword [ebx + 0x460]
lea eax, [ebx + 0x554]
push eax
lea ecx, [ebp - 0x1c]
push ecx
push 0
push str.ActiveSoundMode
push edx
mov dword [ebp + 0x10], edi
call esi
mov eax, dword [ebx]
mov edx, dword [eax + 0x9c]
mov ecx, ebx
call edx
test eax, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405dc7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0x80070057
call fcn.00401b20
nop
mov dh, 0x59
inc eax
add dl, dl
pop ecx
inc eax
add cl, bl
pop ecx
inc eax
add al, ah
pop ecx
inc eax
add bh, ah
pop ecx
inc eax
add ch, dh
pop ecx
inc eax
add bl, cl
pop ecx
inc eax
add byte [esi], ah
pop edx
inc eax
add byte [ebp - 0x3bffbfa7], bh
pop ecx
inc eax
add byte [esi], dl
pop edx
inc eax
add byte [esi - 0x11ffbfa7], dh
pop ecx
inc eax
add ah, cl
int3