Function at 0x402590
Capabilities:
Create service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56d750
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x5cfff4]
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.004047a0
mov dword [ebp - 4], 0
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x402684
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4025e5
sub ecx, edx
sar ecx, 1
inc ecx
cmp ecx, 0x3fffffff
jg 0x40262f
lea ebx, [ecx + ecx]
mov eax, ebx
call fcn.0054c7e0
mov esi, esp
test esi, esi
je 0x40262f
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 0x402631
xor esi, esi
test esi, esi
je 0x402684
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402640
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x1c], eax
cmp eax, 0x3fffffff
jg 0x402684
add eax, eax
call fcn.0054c7e0
mov ebx, esp
test ebx, ebx
je 0x402684
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 0x402686
xor ebx, ebx
push dword [edi - 8]
push edi
call fcn.005540dd
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x402896
mov eax, dword [ebp - 0x18]
cmp ecx, dword [eax - 8]
jg 0x402896
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.004047a0
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x402778
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4026d6
sub ecx, edx
sar ecx, 1
inc ecx
cmp ecx, 0x3fffffff
jg 0x402726
lea eax, [ecx + ecx]
mov dword [ebp - 0x20], eax
call fcn.0054c7e0
mov edi, esp
test edi, edi
je 0x402726
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 0x402728
xor edi, edi
test edi, edi
je 0x402778
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402731
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x20], eax
cmp eax, 0x3fffffff
jg 0x402778
add eax, eax
call fcn.0054c7e0
mov esi, esp
test esi, esi
je 0x402778
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 0x40277a
xor esi, esi
mov eax, dword [ebp - 0x1c]
push dword [eax - 8]
push eax
call fcn.005540dd
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x402896
mov eax, dword [ebp - 0x14]
cmp ecx, dword [eax - 8]
jg 0x402896
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 0x402834
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 0x4027f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x4027f5
cmp eax, 0x431
jne 0x40282b
push 0xf01ff
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x40282b
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 0x402831
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 0x402855
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 0x402874
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.0054bbdc
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00401ee0
int3