Function at 0x401790
Capabilities:
Set registry value

Disassembly:
sub esp, 0x828
mov eax, dword [0x442abc]
xor eax, esp
mov dword [esp + 0x824], eax
cmp dword [esp + 0x82c], 0
mov eax, dword [esp + 0x844]
push ebp
mov ebp, dword [esp + 0x858]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x854]
mov esi, edx
mov edx, dword [esp + 0x858]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x85c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
je 0x4017f4
push str.SoftwareCreative_TechAudioMonitoringOutput
lea ecx, [esp + 0x34]
push ecx
jmp 0x401814
cmp dword [esp + 0x84c], 0x65
jne 0x40180a
push str.SoftwareCreative_TechAudioMonitoringInput_A_
lea edx, [esp + 0x34]
push edx
jmp 0x401814
push str.SoftwareCreative_TechAudioMonitoringInput
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x43b4b0
lea ecx, [esp + 0x38]
push ecx
call ebx
push edi
lea edx, [esp + 0x38]
push edx
call ebx
push esi
lea eax, [esp + 0x38]
push eax
call ebx
cmp dword [esp + 0x840], 0
pop ebx
je 0x401a0e
push edi
call fcn.00401370
add esp, 4
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x10]
push edx
push 0
push 0x20006
push 0
push 0
mov dword [esp + 0x34], eax
push 0
lea eax, [esp + 0x4c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4018b0
mov edx, dword [esp + 0xc]
push 4
lea ecx, [esp + 0x20]
push ecx
push 4
push eax
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x4018a5
mov eax, dword [esp + 0xc]
push eax
jmp 0x4018aa
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push 0x4372b8
lea edx, [esp + 0x38]
push edx
push 0x80000002
call fcn.004066b0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x401a22
push esi
push str.Dest
lea eax, [esp + 0x38]
push eax
push 0x80000002
call fcn.004066b0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x401a22
mov ecx, dword [esp + 0x840]
push 4
lea edx, [esp + 0x1c]
push edx
push 1
push 0x4372a4
lea eax, [esp + 0x40]
push eax
push 0x80000002
mov dword [esp + 0x30], ecx
call fcn.00406610
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x401a22
mov ecx, dword [esp + 0x844]
push 4
lea edx, [esp + 0x18]
push edx
push 1
push 0x43729c
lea eax, [esp + 0x40]
push eax
push 0x80000002
mov dword [esp + 0x2c], ecx
call fcn.00406610
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x401a22
mov ecx, dword [esp + 0x848]
push 4
lea edx, [esp + 0x14]
push edx
push 1
push str.MonFlag
lea eax, [esp + 0x40]
push eax
push 0x80000002
mov dword [esp + 0x28], ecx
call fcn.00406610
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x401a22
lea ecx, [esp + 0x20]
push 0x43b4f0
push ecx
call section..text
add esp, 8
test eax, eax
jne 0x401a22
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.ole32.dll_StringFromCLSID]
test eax, eax
jne 0x401a22
mov ecx, dword [esp + 0xc]
push ecx
push str.AudEncoding
lea edx, [esp + 0x38]
push edx
push 0x80000002
call fcn.004066b0
mov edi, eax
mov eax, dword [esp + 0x1c]
add esp, 0x10
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
jne 0x401a22
test ebp, ebp
je 0x401a22
push 0x404
push ebp
push edi
push 0x43b46c
lea ecx, [esp + 0x40]
push ecx
push 0x80000002
call fcn.00406610
add esp, 0x18
jmp 0x401a20
lea edx, [esp + 0x30]
push edx
push 0x80000002
call fcn.00406930
add esp, 8
mov edi, eax
mov ecx, dword [esp + 0x830]
mov eax, edi
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004217dd
add esp, 0x828
ret