Function at 0x405560
Capabilities:
Create service
Modify service

Disassembly:
sub esp, 0x418
mov eax, dword [0x430710]
xor eax, esp
mov dword [esp + 0x414], eax
push ebx
mov ebx, dword [esp + 0x42c]
push ebp
mov ebp, ecx
mov ecx, dword [esp + 0x428]
push esi
mov esi, dword [esp + 0x430]
mov eax, ecx
push edi
lea edi, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x405594
sub eax, edi
sar eax, 1
push eax
lea edx, [ebp + 4]
push ecx
mov ecx, edx
call fcn.00401960
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4055b4
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp + 0x20]
push esi
call fcn.00401960
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4055d2
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp + 0x3c]
push ebx
call fcn.00401960
xor esi, esi
push 0x206
lea eax, [esp + 0x1a]
push esi
push eax
mov word [esp + 0x20], si
call fcn.004092b0
add esp, 0xc
push 0x104
lea ecx, [esp + 0x220]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x21c]
push 0x5c
push edx
call fcn.00409047
add esp, 8
mov word [eax + 2], si
xor eax, eax
jmp 0x405640
movzx ecx, word [esp + eax + 0x21c]
mov word [esp + eax + 0x14], cx
add eax, 2
cmp cx, si
jne 0x405640
lea eax, [esp + 0x14]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
cmp cx, si
jne 0x405660
mov ecx, dword [str.Util32.exe]
mov edx, dword [0x4266a4]
mov dword [eax], ecx
mov ecx, dword [0x4266a8]
mov dword [eax + 4], edx
mov edx, dword [0x4266ac]
mov dword [eax + 8], ecx
mov ecx, dword [0x4266b0]
mov dword [eax + 0xc], edx
mov dx, word [0x4266b4]
lea edi, [esp + 0x14]
mov dword [eax + 0x10], ecx
mov word [eax + 0x14], dx
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, si
jne 0x4056b0
mov ecx, 6
mov esi, str.__RunService
rep movsd dword es:[edi], dword [esi]
mov ebx, 8
cmp dword [ebp + 0x1c], ebx
movsw word es:[edi], word [esi]
jb 0x4056d9
mov eax, dword [ebp + 8]
jmp 0x4056dc
lea eax, [ebp + 8]
push eax
mov ecx, ebp
call fcn.00405230
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x405749
cmp dword [ebp + 0x38], ebx
jb 0x405703
mov ecx, dword [ebp + 0x24]
jmp 0x405706
lea ecx, [ebp + 0x24]
cmp dword [ebp + 0x1c], ebx
jb 0x405710
mov eax, dword [ebp + 8]
jmp 0x405713
lea eax, [ebp + 8]
push 0
push 0
push 0x42637c
push 0
push 0
lea edx, [esp + 0x28]
push edx
push 1
push 3
push 0x110
push 0xf01ff
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x40574d
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x4057a8
cmp dword [ebp + 0x54], ebx
jb 0x40575b
mov eax, dword [ebp + 0x40]
mov dword [esp + 0x10], eax
jmp 0x405762
lea ecx, [ebp + 0x40]
mov dword [esp + 0x10], ecx
lea edx, [esp + 0x10]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov ecx, ebp
call fcn.004052b0
push 0x4e20
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp + 0x1c], ebx
jb 0x405798
mov eax, dword [ebp + 8]
jmp 0x40579b
lea eax, [ebp + 8]
push eax
mov ecx, ebp
call fcn.00405230
mov eax, 1
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040932a
add esp, 0x418
ret 0x10