Function at 0x404e70
Capabilities:
Query service configuration
Query service status

Disassembly:
push ebp
mov ebp, esp
lea edx, [ebp - 0x18]
push edi
push esi
xor esi, esi
push ebx
sub esp, 0xbc
mov dword [ebp - 0x5c], edx
xor ebx, ebx
movzx eax, byte [ebp + 0xc]
mov dword [ebp - 0x64], 0x409210
mov dword [ebp - 0x60], 0x40cf0e
mov dword [ebp - 0x58], 0x405017
mov byte [ebp - 0x85], al
lea eax, [ebp - 0x7c]
mov dword [esp], eax
mov dword [ebp - 0x54], esp
call fcn.0040b970
mov dword [ebp - 0x8c], esi
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x40], 0
mov dword [esp], eax
mov dword [ebp - 0x78], 0xffffffff
call sub.cygwin1.dll_strdup
mov dword [ebp - 0x9c], 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 - 0xa0], eax
mov eax, 0x5c
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
call sub.cygwin1.dll_strrchr
cmp eax, dword [ebp - 0xa0]
jae 0x404f25
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x44], eax
test eax, eax
je 0x405060
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 [esp], 0x2000
mov dword [ebp - 0x78], 1
call sub.cygwin1.dll_malloc
mov dword [ebp - 0x90], eax
test eax, eax
je 0x4050c1
mov dword [ebp - 0x78], 1
mov eax, dword [ebp - 0x48]
mov esi, 1
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 - 0x8c], eax
sub esp, 0xc
test eax, eax
je 0x405192
mov dword [ebp - 0x78], 1
mov eax, dword [ebp - 0x44]
mov edx, 5
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 0x84], eax
sub esp, 0xc
test eax, eax
je 0x405188
mov dword [ebp - 0x78], 1
mov eax, dword [ebp - 0x84]
lea edx, [ebp - 0x38]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.ADVAPI32.DLL_QueryServiceStatus
sub esp, 8
test eax, eax
jne 0x40521c
mov eax, str.QueryServiceStatus
mov dword [ebp - 0x94], eax
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x98], eax
jmp 0x4050e6
mov dword [ebp - 0x48], 0
mov edx, dword [ebp - 0x9c]
mov dword [ebp - 0x44], edx
jmp 0x404f4c
mov dword [esp], 0xe
mov eax, str.malloc
mov edi, 0xe
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x98], edi
call sub.KERNEL32.dll_SetLastError
sub esp, 4
mov eax, dword [ebp - 0x84]
test eax, eax
jne 0x4051a2
mov ecx, dword [ebp - 0x8c]
test ecx, ecx
je 0x405116
mov dword [ebp - 0x78], 1
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call sub.ADVAPI32.DLL_CloseServiceHandle
sub esp, 4
mov edx, dword [ebp - 0x90]
test edx, edx
je 0x40512e
mov edx, dword [ebp - 0x90]
mov dword [esp], edx
call sub.cygwin1.dll_free
xor eax, eax
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0x98]
test eax, eax
jne 0x4051b9
mov eax, dword [ebp - 0x48]
test eax, eax
jne 0x4051eb
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x40520f
mov ecx, dword [ebp - 0x40]
test ecx, ecx
setne dl
cmp ecx, 0x80000002
setne al
test al, dl
jne 0x4051f8
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
jmp 0x405001
mov ecx, str.OpenSCManager
mov dword [ebp - 0x94], ecx
jmp 0x405007
mov dword [esp], eax
mov dword [ebp - 0x78], 1
call sub.ADVAPI32.DLL_CloseServiceHandle
sub esp, 4
jmp 0x4050f4
mov dword [esp], 0x31
mov eax, dword [ebp - 0x98]
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0x78], 1
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call fcn.00407e00
mov dword [ebp - 0xa4], eax
jmp 0x405140
mov dword [esp], eax
call sub.cygwin1.dll_free
jmp 0x40514b
mov dword [esp], ecx
mov dword [ebp - 0x78], 0xffffffff
call sub.ADVAPI32.DLL_RegCloseKey
sub esp, 4
jmp 0x40516f
mov dword [esp], eax
call sub.cygwin1.dll_free
jmp 0x405156
mov dword [ebp - 0x78], 1
lea eax, [ebp - 0x80]
mov edi, 0x2000
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x90]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x84]
mov dword [esp], eax
call sub.ADVAPI32.DLL_QueryServiceConfigA
sub esp, 0x10
test eax, eax
jne 0x405262
mov esi, str.QueryServiceConfig
mov dword [ebp - 0x94], esi
jmp 0x405007
mov dword [ebp - 0x78], 1
lea edx, [ebp - 0x48]
mov dword [esp], edx
call fcn.0040ce60
movzx edx, byte [ebp - 0x85]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x44]
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x90]
mov dword [esp], ecx
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x38]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x84]
mov dword [esp + 8], edx
call fcn.004047f0
xor ebx, ebx
mov dword [ebp - 0x98], ebx
jmp 0x4050e6