Function at 0x40c260
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a2f47
mov eax, dword fs:[0]
push eax
sub esp, 0x29c
mov eax, dword [0x4be0f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.0040c200
test eax, eax
jne 0x40c58e
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
xor eax, eax
cmp edi, ebx
je 0x40c593
push 0x206
lea ecx, [ebp - 0x216]
push ebx
push ecx
mov word [ebp - 0x218], ax
call fcn.00458dc0
add esp, 0xc
push 0x104
lea edx, [ebp - 0x218]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov word [ebp - 0x234], ax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40c307
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x218]
lea esi, [ebp - 0x234]
call fcn.00401a50
push 5
mov eax, str.__srv
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.00409470
call fcn.0040c7c0
cmp dword [ebp - 0x220], 8
mov esi, dword [ebp - 0x234]
jae 0x40c353
lea esi, [ebp - 0x234]
mov edx, dword [0x4c0ccc]
mov eax, dword [0x4c0cb8]
mov ecx, eax
cmp edx, 8
jae 0x40c36c
mov ecx, 0x4c0cb8
mov eax, ecx
push ebx
push ebx
push 0x4b25b0
push ebx
push ebx
push esi
mov ebx, 1
push ebx
push 2
push 0x110
push 0xf01ff
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x40c491
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, str.error
lea ecx, [ebp - 0x250]
call fcn.00401b40
mov ecx, esi
lea eax, [ebp - 0x2a4]
mov byte [ebp - 4], bl
call fcn.004463b0
push 0
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x250]
mov byte [ebp - 4], 2
call fcn.00409380
mov byte [ebp - 4], bl
cmp dword [ebp - 0x290], 8
jb 0x40c3fa
mov ecx, dword [ebp - 0x2a4]
push ecx
call fcn.0044de0c
add esp, 4
lea edx, [ebp - 0x288]
push edx
lea ebx, [ebp - 0x250]
call fcn.0040cb70
mov esi, 8
add esp, 4
cmp dword [ebp - 0x274], esi
jb 0x40c42b
mov eax, dword [ebp - 0x288]
push eax
call fcn.0044de0c
add esp, 4
xor ebx, ebx
xor ecx, ecx
mov edi, 7
mov dword [ebp - 0x274], edi
mov dword [ebp - 0x278], ebx
mov word [ebp - 0x288], cx
cmp dword [ebp - 0x23c], esi
jb 0x40c45e
mov edx, dword [ebp - 0x250]
push edx
call fcn.0044de0c
add esp, 4
xor eax, eax
mov dword [ebp - 0x23c], edi
mov dword [ebp - 0x240], ebx
mov word [ebp - 0x250], ax
cmp dword [ebp - 0x220], esi
jb 0x40c48a
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.0044de0c
add esp, 4
xor eax, eax
jmp 0x40c593
sub esp, 0x1c
mov ecx, esp
xor edx, edx
mov dword [ebp - 0x2a8], esp
push edx
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push 0x4c0cb8
or eax, 0xffffffff
mov word [ecx], dx
call fcn.00401670
lea ebx, [ebp - 0x26c]
call fcn.00445f90
add esp, 0x1c
mov byte [ebp - 4], 3
cmp dword [0x4c0ce8], 0x10
mov ebx, dword [0x4c0cd4]
jae 0x40c4e3
mov ebx, 0x4c0cd4
push 0
lea eax, [ebp - 0x26c]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x2a8], esp
push 2
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push 0x4b2644
mov byte [ecx], 0
call fcn.00401480
mov byte [ebp - 4], 4
call fcn.00447310
mov ecx, ebx
mov edx, eax
mov byte [ebp - 4], 3
call fcn.00447030
push str.Service__add_successful
call fcn.0040c6b0
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
cmp dword [ebp - 0x258], 0x10
jb 0x40c55b
mov ecx, dword [ebp - 0x26c]
push ecx
call fcn.0044de0c
add esp, 4
cmp dword [ebp - 0x220], 8
mov dword [ebp - 0x258], 0xf
mov dword [ebp - 0x25c], 0
mov byte [ebp - 0x26c], 0
jb 0x40c58e
mov edx, dword [ebp - 0x234]
push edx
call fcn.0044de0c
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044de17
mov esp, ebp
pop ebp
ret