Function at 0x402620
Capabilities:
Create service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56dc40
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x5cfff0]
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
mov dword [ebp - 0x20], edx
push ecx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x24], 0
call fcn.00404d30
mov dword [ebp - 4], 0
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x402714
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402675
sub ecx, edx
sar ecx, 1
inc ecx
cmp ecx, 0x3fffffff
jg 0x4026bf
lea ebx, [ecx + ecx]
mov eax, ebx
call fcn.0054ccc0
mov esi, esp
test esi, esi
je 0x4026bf
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, dword [ebp - 0x18]
xor ecx, ecx
test eax, eax
cmove esi, ecx
jmp 0x4026c1
xor esi, esi
test esi, esi
je 0x402714
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4026d0
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x1c], eax
cmp eax, 0x3fffffff
jg 0x402714
add eax, eax
call fcn.0054ccc0
mov ebx, esp
test ebx, ebx
je 0x402714
push dword [ebp - 0x1c]
xor eax, eax
push ebx
push 0xffffffffffffffff
push esi
push eax
push 3
mov word [ebx], ax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, dword [ebp - 0x18]
xor ecx, ecx
test eax, eax
cmove ebx, ecx
jmp 0x402716
xor ebx, ebx
push dword [edi - 8]
push edi
call fcn.005545fc
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x402926
mov eax, dword [ebp - 0x18]
cmp ecx, dword [eax - 8]
jg 0x402926
push dword [ebp - 0x20]
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x18]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x14]
call fcn.00404d30
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x402808
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402766
sub ecx, edx
sar ecx, 1
inc ecx
cmp ecx, 0x3fffffff
jg 0x4027b6
lea eax, [ecx + ecx]
mov dword [ebp - 0x20], eax
call fcn.0054ccc0
mov edi, esp
test edi, edi
je 0x4027b6
push 0
push 0
push dword [ebp - 0x20]
mov byte [edi], 0
push edi
push 0xffffffffffffffff
push esi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ecx, ecx
test eax, eax
mov eax, dword [ebp - 0x14]
cmove edi, ecx
mov dword [ebp - 0x1c], eax
jmp 0x4027b8
xor edi, edi
test edi, edi
je 0x402808
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4027c1
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x20], eax
cmp eax, 0x3fffffff
jg 0x402808
add eax, eax
call fcn.0054ccc0
mov esi, esp
test esi, esi
je 0x402808
push dword [ebp - 0x20]
xor eax, eax
push esi
push 0xffffffffffffffff
push edi
push eax
push 3
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
test eax, eax
mov eax, dword [ebp - 0x14]
cmove esi, ecx
mov dword [ebp - 0x1c], eax
jmp 0x40280a
xor esi, esi
mov eax, dword [ebp - 0x1c]
push dword [eax - 8]
push eax
call fcn.005545fc
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x402926
mov eax, dword [ebp - 0x14]
cmp ecx, dword [eax - 8]
jg 0x402926
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x14]
push 0xf003f
push edx
push edx
mov word [eax + ecx*2], dx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x4028c4
push 0
push 0
push 0
push 0
push 0
push esi
push 0
push 3
push 1
push 0xf01ff
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
jne 0x402885
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x402885
cmp eax, 0x431
jne 0x4028bb
push 0xf01ff
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x4028bb
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
mov ecx, 1
cmovne eax, ecx
mov dword [ebp - 0x24], eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x4028c1
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov edx, dword [ebp - 0x14]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4028e5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x402904
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x24]
lea esp, [ebp - 0x34]
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.0054c0c7
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00401ee0
int3