Function at 0x403810
Capabilities:
Check for time delay via gettickcount
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp - 0x18]
push edi
xor edi, edi
push esi
xor esi, esi
push ebx
sub esp, 0xac
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x64], 0x409210
xor ebx, ebx
mov dword [esp], eax
mov dword [ebp - 0x60], 0x40cefc
mov dword [ebp - 0x58], 0x4039c0
mov dword [ebp - 0x54], esp
call fcn.0040b970
mov dword [ebp - 0x84], edi
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x90], ecx
mov edi, 0x5c
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x40], 0
mov dword [esp], eax
mov dword [ebp - 0x78], 0xffffffff
call sub.cygwin1.dll_strdup
mov dword [ebp - 0x94], eax
mov edx, 0x2f
mov dword [esp + 4], edx
mov dword [ebp - 0x48], eax
mov dword [esp], eax
call sub.cygwin1.dll_strrchr
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x94]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.cygwin1.dll_strrchr
cmp eax, dword [ebp - 0x98]
jae 0x4038c3
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x44], eax
test eax, eax
je 0x403a08
mov byte [eax], 0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x78], 0xffffffff
inc eax
mov dword [ebp - 0x44], eax
mov dword [esp], eax
call sub.cygwin1.dll_strdup
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x78], 1
mov eax, dword [ebp - 0x48]
mov esi, 3
mov dword [esp + 8], esi
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.ADVAPI32.DLL_OpenSCManagerA
mov dword [ebp - 0x80], eax
sub esp, 0xc
test eax, eax
mov ecx, str.OpenSCManager
je 0x403af5
mov dword [ebp - 0x78], 1
mov eax, dword [ebp - 0x44]
mov edx, 0xf01ff
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x80]
mov dword [esp], eax
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 0x84], eax
sub esp, 0xc
test eax, eax
je 0x403b96
mov dword [ebp - 0x78], 1
lea eax, [ebp - 0x38]
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x84]
mov dword [esp], eax
call sub.ADVAPI32.DLL_ControlService
sub esp, 0xc
test eax, eax
jne 0x403c03
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x90], eax
cmp eax, 0x425
jne 0x403c03
inc dword [ebp - 0x88]
cmp dword [ebp - 0x88], 0x1d
jg 0x403c03
mov dword [esp], 1
mov dword [ebp - 0x78], 1
call sub.cygwin1.dll_sleep
jmp 0x403951
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x44], eax
jmp 0x4038ea
mov eax, 0xcccccccd
mul dword [ebp - 0x20]
shr edx, 3
cmp edx, 0x3e7
ja 0x403cc2
mov edx, 0x3e8
mov dword [esp], edx
mov dword [ebp - 0x78], 1
call sub.KERNEL32.dll_Sleep
sub esp, 4
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x84]
mov dword [esp], eax
call sub.ADVAPI32.DLL_QueryServiceStatus
sub esp, 8
test eax, eax
je 0x403af0
cmp dword [ebp - 0x34], 3
jne 0x403c79
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x9c]
ja 0x403c57
mov dword [ebp - 0x78], 1
call sub.KERNEL32.dll_GetTickCount
mov edx, dword [ebp - 0xa0]
sub eax, edx
cmp eax, dword [ebp - 0x20]
jbe 0x403c6f
mov dword [esp], 0x41d
call sub.KERNEL32.dll_SetLastError
sub esp, 4
mov ecx, str.QueryServiceStatus
mov dword [ebp - 0x8c], ecx
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x84]
test eax, eax
je 0x403b28
mov dword [ebp - 0x78], 1
mov eax, dword [ebp - 0x84]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CloseServiceHandle
sub esp, 4
mov edi, dword [ebp - 0x80]
test edi, edi
je 0x403b44
mov dword [ebp - 0x78], 1
mov eax, dword [ebp - 0x80]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CloseServiceHandle
sub esp, 4
mov ebx, dword [ebp - 0x90]
xor esi, esi
mov dword [ebp - 0xa4], esi
test ebx, ebx
jne 0x403ba6
mov eax, dword [ebp - 0x48]
test eax, eax
jne 0x403bd5
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x403bf6
mov ecx, dword [ebp - 0x40]
test ecx, ecx
setne dl
cmp ecx, 0x80000002
setne al
test al, dl
jne 0x403be2
lea eax, [ebp - 0x7c]
mov dword [esp], eax
call fcn.0040ba10
mov eax, dword [ebp - 0xa4]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, str.OpenService
mov dword [ebp - 0x8c], eax
jmp 0x403afb
mov dword [esp], 0x2e
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x78], 1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x8c]
mov dword [esp + 4], eax
call fcn.00407e00
mov dword [ebp - 0xa4], eax
jmp 0x403b56
mov dword [esp], eax
call sub.cygwin1.dll_free
jmp 0x403b5d
mov dword [esp], ecx
mov dword [ebp - 0x78], 0xffffffff
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
jmp 0x403b7d
mov dword [esp], eax
call sub.cygwin1.dll_free
jmp 0x403b68
mov edi, dword [ebp - 0x90]
test edi, edi
setne dl
cmp dword [ebp - 0x90], 0x426
setne al
test al, dl
jne 0x403cab
mov ebx, dword [ebp - 0x90]
test ebx, ebx
jne 0x403c79
mov dword [ebp - 0x78], 1
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x84]
mov dword [esp], eax
call sub.ADVAPI32.DLL_QueryServiceStatus
sub esp, 8
test eax, eax
je 0x403af0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x78], 1
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0x34], 3
je 0x403a61
mov dword [ebp - 0x78], 1
xor eax, eax
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x84]
mov dword [esp], eax
call sub.ADVAPI32.DLL_DeleteService
sub esp, 4
test eax, eax
jne 0x403b06
mov eax, str.DeleteService
jmp 0x403b9b
mov dword [ebp - 0x78], 1
mov esi, str.ControlService
mov dword [ebp - 0x8c], esi
jmp 0x403afb
cmp edx, 0x2710
jbe 0x403a7d
mov edx, 0x2710
jmp 0x403a7d