Function at 0x405150
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x41a320
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x4223f8]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4223f8]
xor eax, esp
push eax
lea eax, [esp + 0x5c]
mov dword fs:[0], eax
push 0x41b938
lea ecx, [esp + 0x2c]
call fcn.00404a70
lea eax, [esp + 0x20]
xor ebx, ebx
push eax
mov dword [esp + 0x68], ebx
call fcn.004050c0
add esp, 4
push eax
push 0x41b934
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x70], 1
call fcn.00404b60
push 0x41b934
push eax
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x70], 2
call fcn.00404ae0
mov eax, dword [esp + 0x24]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x422024]
je 0x4051fa
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4051fa
mov eax, dword [esp + 0x24]
add eax, 0xfffffff4
push eax
call fcn.00408bab
add esp, 4
mov eax, dword [esp + 0x20]
lea edx, [eax - 0xc]
mov byte [esp + 0x64], 5
cmp edx, dword [0x422024]
je 0x40522c
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40522c
mov eax, dword [esp + 0x20]
add eax, 0xfffffff4
push eax
call fcn.00408bab
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
mov edi, dword [esp + 0x28]
mov esi, dword [sym.imp.SHLWAPI.dll_SHSetValueW]
add ecx, ecx
push ecx
push eax
push 2
push str.ImagePath
push edi
push 0x80000002
call esi
push 0x41b918
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
push ebp
lea ecx, [esp + 0x18]
call fcn.004029e0
test eax, eax
je 0x4052a2
lea eax, [ebp + ebp]
lea edx, [eax + 2]
mov dword [esp + 0x1c], eax
cmp edx, eax
jb 0x405291
push eax
mov eax, dword [esp + 0x18]
push 0x41b918
push eax
call fcn.00408790
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [esp + 0x14]
mov dword [ecx - 8], ebp
mov ecx, dword [esp + 0x14]
xor edx, edx
mov word [eax + ecx], dx
mov eax, dword [esp + 0x14]
mov edx, dword [eax - 8]
add edx, edx
push edx
push eax
push 1
push str.Group
push edi
push 0x80000002
call esi
push str.RPCSS
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
push ebp
lea ecx, [esp + 0x18]
call fcn.004029e0
test eax, eax
je 0x40530e
lea eax, [ebp + ebp]
lea ecx, [eax + 2]
mov dword [esp + 0x1c], eax
cmp ecx, eax
jb 0x4052fd
mov edx, dword [esp + 0x14]
push eax
push str.RPCSS
push edx
call fcn.00408790
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [esp + 0x14]
mov dword [ecx - 8], ebp
mov ecx, dword [esp + 0x14]
xor edx, edx
mov word [eax + ecx], dx
mov eax, dword [esp + 0x14]
mov edx, dword [eax - 8]
add edx, edx
push edx
push eax
push 7
push str.DependOnService
push edi
push 0x80000002
call esi
push 4
lea eax, [esp + 0x1c]
push eax
push 4
push str.Type
push edi
push 0x80000002
mov dword [esp + 0x30], 0x10
call esi
push 4
lea ecx, [esp + 0x1c]
push ecx
push 4
push str.Start
push edi
push 0x80000002
mov dword [esp + 0x30], 2
call esi
push 4
lea edx, [esp + 0x1c]
push edx
push 4
push str.ErrorControl
push edi
push 0x80000002
mov dword [esp + 0x30], 1
call esi
push str.LocalSystem
lea ecx, [esp + 0x20]
call fcn.00404a70
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebp - 8]
add eax, eax
push eax
push ebp
push 1
push str.ObjectName
push edi
push 0x80000002
call esi
mov cl, 0x60
mov al, 0xea
mov byte [esp + 0x2c], 0x80
mov byte [esp + 0x2d], 0x51
mov byte [esp + 0x2e], 1
mov byte [esp + 0x2f], bl
mov byte [esp + 0x30], bl
mov byte [esp + 0x31], bl
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], bl
mov byte [esp + 0x34], bl
mov byte [esp + 0x35], bl
mov byte [esp + 0x36], bl
mov byte [esp + 0x37], bl
mov byte [esp + 0x38], 3
mov byte [esp + 0x39], bl
mov byte [esp + 0x3a], bl
mov byte [esp + 0x3b], bl
mov byte [esp + 0x3c], 0x53
mov byte [esp + 0x3d], bl
mov byte [esp + 0x3e], 0x65
mov byte [esp + 0x3f], bl
mov byte [esp + 0x40], 1
mov byte [esp + 0x41], bl
mov byte [esp + 0x42], bl
mov byte [esp + 0x43], bl
mov byte [esp + 0x44], cl
mov byte [esp + 0x45], al
mov byte [esp + 0x46], bl
mov byte [esp + 0x47], bl
mov byte [esp + 0x48], 1
push 0x2c
mov byte [esp + 0x50], cl
mov byte [esp + 0x58], cl
lea ecx, [esp + 0x30]
push ecx
push 3
push str.FailureActions
push edi
push 0x80000002
mov byte [esp + 0x61], bl
mov byte [esp + 0x62], bl
mov byte [esp + 0x63], bl
mov byte [esp + 0x65], al
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], bl
mov byte [esp + 0x68], 1
mov byte [esp + 0x69], bl
mov byte [esp + 0x6a], bl
mov byte [esp + 0x6b], bl
mov byte [esp + 0x6d], al
mov byte [esp + 0x6e], bl
mov byte [esp + 0x6f], bl
call esi
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [ebp - 0xc]
cmp edx, dword [0x422024]
je 0x4054a1
add ebp, 0xfffffff4
push ebp
call esi
test eax, eax
jg 0x4054a1
push ebp
call fcn.00408bab
add esp, 4
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x422024]
je 0x4054ca
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4054ca
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00408bab
add esp, 4
lea eax, [edi - 0xc]
cmp eax, dword [0x422024]
je 0x4054e8
add edi, 0xfffffff4
push edi
call esi
test eax, eax
jg 0x4054e8
push edi
call fcn.00408bab
add esp, 4
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.004090aa
add esp, 0x54
ret