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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x423ef8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
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 esi, ecx
mov edx, dword [esi + 0x460]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x10]
push eax
lea edi, [esi + 0x550]
push edi
lea ecx, [ebp - 0x18]
push ecx
push 0
push str.ActiveOutputMode
push edx
mov dword [ebp - 0x10], 4
call ebx
lea ecx, [ebp - 0x10]
push ecx
lea eax, [esi + 0x554]
push eax
mov eax, dword [esi + 0x460]
lea edx, [ebp - 0x18]
push edx
push 0
push str.ActiveSoundMode
push eax
mov dword [ebp - 0x10], 4
call ebx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
jne 0x4077f6
mov ebx, dword [edi]
mov edx, dword [0x44924c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44924c
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
push ebx
push str.SoundModeOnOutput_d
lea edi, [ebp - 0x10]
mov dword [ebp - 4], 0
call fcn.0040a990
mov edi, dword [ebp + 0xc]
add esp, 8
cmp edi, 0xffffffff
jne 0x40785e
mov ecx, dword [esi + 0x554]
lea edx, [ebp + 0xc]
push edx
mov edx, dword [ebp - 0x10]
lea eax, [ebp + 8]
push eax
mov eax, dword [esi + 0x460]
mov dword [ebp + 8], ecx
lea ecx, [ebp - 0x18]
push ecx
push 0
push edx
push eax
mov dword [ebp + 0xc], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, dword [ebp + 8]
mov byte [ebp + 0xb], 0
test ebx, ebx
js 0x407986
test edi, edi
js 0x407986
push 1
push edi
push ebx
push esi
call fcn.00408970
mov dword [ebp + 0xc], eax
test eax, eax
je 0x4079e8
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x14]
push edx
mov edx, dword [eax + 4]
lea ecx, [ebp - 0x18]
push ecx
push 0
push str.Type
push edx
mov dword [ebp - 0x14], 0
mov dword [ebp + 8], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
neg eax
sbb eax, eax
inc eax
jne 0x4078d8
push edi
push ebx
lea edx, [esi + 0x4bc]
call fcn.0040cb00
test eax, eax
je 0x4078d8
mov edx, dword [ebp + 0xc]
push eax
mov ecx, str.Type
call fcn.0040fac0
mov ecx, dword [ebp - 0x10]
cmp dword [esi + 0x550], ebx
mov edx, dword [esi + 0x460]
push 4
lea eax, [ebp - 0x18]
push eax
push 4
push 0
push ecx
mov dword [esi + 0x554], edi
mov dword [ebp - 0x18], edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push edx
setne byte [ebp + 0xb]
mov dword [esi + 0x550], ebx
call edi
mov edx, dword [esi + 0x460]
mov eax, dword [esi + 0x550]
push 4
lea ecx, [ebp - 0x18]
push ecx
push 4
push 0
push str.ActiveOutputMode
push edx
mov dword [ebp - 0x18], eax
call edi
mov edx, dword [esi + 0x460]
mov eax, dword [esi + 0x554]
push 4
lea ecx, [ebp - 0x18]
push ecx
push 4
push 0
push str.ActiveSoundMode
push edx
mov dword [ebp - 0x18], eax
call edi
mov bl, byte [ebp + 0xb]
test bl, bl
je 0x407964
mov eax, dword [esi]
mov edx, dword [eax + 0x44]
push 0
push 0
mov ecx, esi
call edx
mov eax, dword [ebp + 0xc]
push 0
push eax
push 0
mov edi, esi
call fcn.00408d20
test bl, bl
je 0x4079e4
mov edx, dword [esi]
mov eax, dword [edx + 0x44]
push 0
push 1
mov ecx, esi
call eax
jmp 0x4079e4
mov eax, 0xfffffffe
cmp ebx, eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jne 0x4079ba
mov edx, dword [esi + 0x460]
push 4
lea ecx, [ebp + 8]
push ecx
push 4
push 0
push str.ActiveOutputMode
push edx
mov dword [esi + 0x550], eax
mov dword [ebp + 8], eax
call ebx
mov byte [ebp + 0xb], 1
mov eax, 0xfffffffe
cmp edi, eax
jne 0x4079e8
mov ecx, dword [esi + 0x460]
push 4
mov dword [esi + 0x554], eax
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
push eax
push 4
push 0
push str.ActiveSoundMode
push ecx
call ebx
mov byte [ebp + 0xb], 1
mov dword [ebp - 4], 0xffffffff
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 0x407a0e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [ebp + 0xb]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8