Function at 0x406700
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x14]
sub esp, 0x24
mov dword [ebp - 0x14], 0
mov esi, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCreateKeyW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x406750
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
push eax
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esi + 0x54]
mov edx, str.DisplayName
mov eax, dword [ebp - 0x14]
call fcn.00405ab0
mov ebx, eax
test eax, eax
jne 0x406738
mov ecx, dword [esi + 0x40]
mov edx, str.ImagePath
mov eax, dword [ebp - 0x14]
call fcn.00405ab0
mov ebx, eax
test eax, eax
jne 0x406738
mov ecx, dword [esi + 0x44]
mov edx, str.Group
mov eax, dword [ebp - 0x14]
call fcn.00405ab0
mov ebx, eax
test eax, eax
jne 0x406738
mov ecx, dword [esi + 0x50]
mov edx, str.ObjectName
mov eax, dword [ebp - 0x14]
call fcn.00405ab0
mov ebx, eax
test eax, eax
jne 0x406738
mov ecx, dword [esi + 0x5c]
mov edx, str.Description
mov eax, dword [ebp - 0x14]
call fcn.00405ab0
mov ebx, eax
test eax, eax
jne 0x406738
mov ecx, dword [esi + 0x60]
mov edx, str.DependOnService
mov eax, dword [ebp - 0x14]
call fcn.00405b30
mov ebx, eax
test eax, eax
jne 0x406738
mov ecx, dword [esi + 0x64]
mov edx, str.DependOnGroup
mov eax, dword [ebp - 0x14]
call fcn.00405b30
mov ebx, eax
test eax, eax
jne 0x406738
lea eax, [esi + 0x38]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.Start
mov dword [esp], eax
mov edi, dword [sym.imp.advapi32.dll_RegSetValueExW]
call edi
sub esp, 0x18
mov ebx, eax
test eax, eax
jne 0x406738
lea eax, [esi + 0x3c]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.ErrorControl
mov dword [esp], eax
call edi
sub esp, 0x18
mov ebx, eax
test eax, eax
jne 0x406738
lea eax, [esi + 0x34]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.Type
mov dword [esp], eax
call edi
sub esp, 0x18
mov ebx, eax
test eax, eax
jne 0x406738
lea edx, [esi + 0x58]
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.PreshutdownTimeout
mov dword [esp], eax
mov dword [ebp - 0x18], edx
call edi
sub esp, 0x18
mov ebx, eax
test eax, eax
jne 0x406738
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.PreshutdownTimeout
mov dword [esp], eax
call edi
sub esp, 0x18
mov ebx, eax
test eax, eax
jne 0x406738
cmp dword [esi + 0x78], 0
mov eax, dword [ebp - 0x14]
jne 0x406995
cmp dword [esi + 0x48], 0
je 0x40697e
add esi, 0x48
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], 0x41b640
mov dword [esp], eax
call edi
sub esp, 0x18
mov ebx, eax
test ebx, 0xfffffffd
jne 0x406738
xor ebx, ebx
jmp 0x406738
mov dword [esp + 4], 0x41b640
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteValueW]
mov ebx, eax
push edx
push edx
jmp 0x40696b
lea edx, [ebp - 0x10]
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.WOW64
mov dword [esp], eax
mov dword [ebp - 0x10], 1
call edi
sub esp, 0x18
mov ebx, eax
test eax, eax
jne 0x406738
mov eax, dword [ebp - 0x14]
jmp 0x406934