Function at 0x4012f0
Capabilities:
Accept command line arguments
Delete service
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineA]
call esi
test eax, eax
jne 0x40131f
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004015fc
mov esp, ebp
pop ebp
ret
push 0x2f
push eax
call fcn.00401d7e
add esp, 8
test eax, eax
jne 0x401330
call esi
push ebx
push edi
push str._uninstall
push eax
call fcn.00401e24
add esp, 8
test eax, eax
je 0x401436
push 0xf003f
push 0
push 0
or esi, 0xffffffff
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x40141e
push 0xf01ff
push str.guarder
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4013b5
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov eax, dword [ebp - 0x1c]
cmp eax, 1
jne 0x4013a8
xor esi, esi
jmp 0x4013b0
xor ecx, ecx
cmp eax, 3
cmove esi, ecx
push dword [ebp - 0x24]
call edi
push ebx
call edi
test esi, esi
js 0x40141e
push 0xf003f
push 0
push 0
or esi, 0xffffffff
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x401416
push 0xf01ff
push str.guarder
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
test ebx, ebx
jne 0x4013f0
xor esi, esi
jmp 0x401411
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40140e
xor eax, eax
cmp esi, 0x430
cmove esi, eax
push ebx
call edi
push dword [ebp - 0x24]
call edi
test esi, esi
jns 0x40150a
pop edi
mov esi, 0x21
pop ebx
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004015fc
mov esp, ebp
pop ebp
ret
call fcn.004010d0
test eax, eax
jns 0x401457
pop edi
mov esi, 0x15
pop ebx
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004015fc
mov esp, ebp
pop ebp
ret
call fcn.00401190
test eax, eax
jns 0x401478
pop edi
mov esi, 0x11
pop ebx
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004015fc
mov esp, ebp
pop ebp
ret
call fcn.00401240
test eax, eax
jns 0x401499
pop edi
mov esi, 0x12
pop ebx
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004015fc
mov esp, ebp
pop ebp
ret
push 0xf003f
push 0
push 0
or esi, 0xffffffff
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x401500
push 0xf01ff
push str.guarder
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x4014f9
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov eax, dword [ebp - 0x1c]
cmp eax, 4
jne 0x4014ea
xor esi, esi
jmp 0x4014f2
xor ecx, ecx
cmp eax, 2
cmove esi, ecx
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
mov eax, 0x13
cmovs esi, eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.004015fc
mov esp, ebp
pop ebp
ret