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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 8], esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x20]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edi
mov dword [esp + 8], eax
mov dword [ebp - 0x20], 0
mov eax, dword [esi + 0x10]
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
mov eax, dword [eax]
mov dword [esp], eax
call sub.advapi32.dll_RegCreateKeyW
sub esp, 0xc
test eax, eax
mov ebx, eax
je 0x4065a0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.advapi32.dll_RegCloseKey
mov esi, dword [ebp - 8]
mov eax, ebx
mov edi, dword [ebp - 4]
mov ebx, dword [ebp - 0xc]
sub esp, 4
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x54]
mov edx, str.DisplayName
mov eax, dword [ebp - 0x20]
call fcn.00406360
test eax, eax
mov ebx, eax
jne 0x40657d
mov ecx, dword [esi + 0x40]
mov edx, str.ImagePath
mov eax, dword [ebp - 0x20]
call fcn.00406360
test eax, eax
mov ebx, eax
jne 0x40657d
mov ecx, dword [esi + 0x44]
mov edx, str.Group
mov eax, dword [ebp - 0x20]
call fcn.00406360
test eax, eax
mov ebx, eax
jne 0x40657d
mov ecx, dword [esi + 0x50]
mov edx, str.ObjectName
mov eax, dword [ebp - 0x20]
call fcn.00406360
test eax, eax
mov ebx, eax
jne 0x40657d
mov ecx, dword [esi + 0x5c]
mov edx, str.Description
mov eax, dword [ebp - 0x20]
call fcn.00406360
test eax, eax
mov ebx, eax
jne 0x40657d
mov ecx, dword [esi + 0x60]
mov edx, str.DependOnService
mov eax, dword [ebp - 0x20]
call fcn.00405ec0
test eax, eax
mov ebx, eax
jne 0x40657d
mov ecx, dword [esi + 0x64]
mov edx, str.DependOnGroup
mov eax, dword [ebp - 0x20]
call fcn.00405ec0
test eax, eax
mov ebx, eax
jne 0x40657d
mov eax, 4
mov dword [esp + 0x14], eax
lea eax, [esi + 0x38]
mov dword [esp + 0x10], eax
mov eax, 4
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, str.Start
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.advapi32.dll_RegSetValueExW
sub esp, 0x18
test eax, eax
mov ebx, eax
jne 0x40657d
lea eax, [esi + 0x3c]
mov ecx, 4
mov dword [esp + 0x10], eax
mov eax, str.ErrorControl
mov ebx, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
xor edi, edi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
call sub.advapi32.dll_RegSetValueExW
sub esp, 0x18
test eax, eax
mov ebx, eax
jne 0x40657d
mov dword [esp + 0x14], 4
lea eax, [esi + 0x34]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.Type
mov dword [esp], eax
call sub.advapi32.dll_RegSetValueExW
sub esp, 0x18
test eax, eax
mov ebx, eax
jne 0x40657d
mov dword [esp + 0x14], 4
mov eax, dword [ebp - 0x20]
lea edi, [esi + 0x58]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.PreshutdownTimeout
mov dword [esp], eax
call sub.advapi32.dll_RegSetValueExW
sub esp, 0x18
test eax, eax
mov ebx, eax
jne 0x40657d
mov dword [esp + 0x14], 4
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.PreshutdownTimeout
mov dword [esp], eax
call sub.advapi32.dll_RegSetValueExW
sub esp, 0x18
test eax, eax
mov ebx, eax
jne 0x40657d
cmp dword [esi + 0x78], 0
jne 0x4067ec
cmp dword [esi + 0x48], 0
mov eax, dword [ebp - 0x20]
je 0x4067d6
mov dword [esp + 0x14], 4
add esi, 0x48
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], 0x41b560
mov dword [esp], eax
call sub.advapi32.dll_RegSetValueExW
sub esp, 0x18
mov ebx, eax
test ebx, 0xfffffffd
mov eax, 0
cmove ebx, eax
jmp 0x40657d
mov dword [esp + 4], 0x41b560
mov dword [esp], eax
call sub.advapi32.dll_RegDeleteValueW
push edx
mov ebx, eax
push edx
jmp 0x4067c3
mov dword [esp + 0x14], 4
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], str.WOW64
mov dword [esp], eax
mov dword [ebp - 0x1c], 1
call sub.advapi32.dll_RegSetValueExW
sub esp, 0x18
test eax, eax
mov ebx, eax
je 0x406786
jmp 0x40657d