Function at 0x40a9a0
Capabilities:
Set registry value

Disassembly:
sub esp, 0x174
push ebx
push ebp
push esi
push edi
mov edi, str.SoftwareSigmaTel
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x80]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x78], vtable.CRegistry.0
mov eax, ecx
mov esi, edi
mov edi, ebx
mov byte [esp + 0x80], 0
shr ecx, 2
mov dword [esp + 0x7c], SysReAllocStringLen
mov dl, 1
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov byte [esp + 0x13], dl
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, str.GlobalStateSTSysTray1.0
test ecx, ecx
je 0x40aa5a
mov edi, 0x4135b4
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x80]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea ebx, [esp + 0x80]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.GlobalStateSTSysTray1.0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x188]
mov dword [esp + 0x18], 0
mov eax, dword [edi + 0x1e4]
test eax, eax
jbe 0x40abc1
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea edx, [edi + 0x2d8]
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x28]
mov esi, dword [eax - 0xf0]
push esi
push str.JackDeviceType_x
push ecx
call ebp
mov edx, dword [esp + 0x20]
add esp, 0xc
lea ecx, [esp + 0x20]
mov eax, dword [edx]
push 0
push ecx
push 0
push 0xf003f
push 0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x90]
push 0x415e2c
lea edx, [esp + 0x98]
push 0
push edx
push eax
call ebx
test eax, eax
jne 0x40ab10
lea ecx, [esp + 0x1c]
push 4
push ecx
push 4
push eax
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x38]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0x20]
mov edi, eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
mov edi, dword [esp + 0x188]
je 0x40ab15
mov byte [esp + 0x13], 0
push esi
lea edx, [esp + 0x2c]
push str.JackDeviceSeq_x
push edx
call ebp
mov ecx, dword [esp + 0x24]
add esp, 0xc
lea edx, [esp + 0x24]
xor eax, eax
mov al, byte [edi + ecx + 0x358]
mov ecx, dword [esp + 0x7c]
push 0
push edx
push 0
push 0xf003f
mov dword [esp + 0x2c], eax
push 0
push 0x415e2c
lea eax, [esp + 0x98]
push 0
push eax
push ecx
call ebx
test eax, eax
jne 0x40ab8b
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x1c]
push 4
push edx
push 4
push eax
lea eax, [esp + 0x38]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x24]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x40ab90
mov byte [esp + 0x13], 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ecx, dword [edi + 0x1e4]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
jb 0x40aa8d
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
pop edi
pop esi
pop ebp
mov al, dl
pop ebx
add esp, 0x174
ret