Function at 0x45da10
Capabilities:
Query service status
Start service
Stop service

Disassembly:
sub esp, 0x2c
mov eax, dword [str.EnableService__]
mov edx, dword [0x4e9abc]
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov dword [esp + 0x10], eax
mov ecx, dword [0x4e9ab8]
mov eax, dword [0x4e9ac0]
push 0xf003f
push 0
push 0
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x45da98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4e9a94
lea ecx, [esi + 0x55]
push 0xfff
push ecx
call fcn.00466ca7
mov ecx, dword [0x4d30ac]
mov edx, dword [esi]
add esp, 0x10
lea eax, [esp + 0x10]
push 0x511
push eax
push ecx
mov ecx, esi
call dword [edx + 0x10]
pop edi
pop esi
pop ebp
mov eax, 0x10
pop ebx
add esp, 0x2c
ret 8
mov ebp, dword [esp + 0x40]
push 0xf01ff
push ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x45db08
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
push ebp
push 0x4e9a74
lea edx, [esi + 0x55]
push 0xfff
push edx
call fcn.00466ca7
mov edx, dword [0x4d30ac]
mov eax, dword [esi]
add esp, 0x14
lea ecx, [esp + 0x10]
push 0x51d
push ecx
push edx
mov ecx, esi
call dword [eax + 0x10]
mov eax, edi
pop edi
sub eax, 0x424
pop esi
neg eax
sbb eax, eax
pop ebp
and al, 0xed
pop ebx
add eax, 0x23
add esp, 0x2c
ret 8
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x45db52
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4e9a50
lea ecx, [esi + 0x55]
push 0xfff
push ecx
call fcn.00466ca7
mov ecx, dword [0x4d30ac]
mov edx, dword [esi]
add esp, 0x10
lea eax, [esp + 0x10]
push 0x52d
push eax
push ecx
mov ecx, esi
call dword [edx + 0x10]
jmp 0x45dd30
mov al, byte [esp + 0x44]
test al, al
mov eax, dword [esp + 0x24]
je 0x45dba9
cmp eax, 4
je 0x45dbb2
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x45dbca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x45dbca
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebp
push 0x4e9a30
lea edx, [esi + 0x55]
push 0xfff
push edx
call fcn.00466ca7
mov eax, dword [esi]
add esp, 0x14
push 0x541
jmp 0x45dd1f
cmp eax, 1
jne 0x45dc7e
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret 8
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x45dbfc
cmp dword [esp + 0x24], 4
je 0x45dc37
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x20]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x45dbda
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebp
push 0x4e9a0c
lea eax, [esi + 0x55]
push 0xfff
push eax
call fcn.00466ca7
mov ecx, dword [0x4d30ac]
mov edx, dword [esi]
add esp, 0x14
lea eax, [esp + 0x10]
push 0x555
push eax
push ecx
mov ecx, esi
call dword [edx + 0x10]
jmp 0x45dd30
push ebp
push 0x4e99f8
lea edx, [esi + 0x55]
push 0xfff
push edx
call fcn.00466ca7
mov edx, dword [0x4d30a4]
mov eax, dword [esi]
add esp, 0x10
lea ecx, [esp + 0x10]
push 0x54c
push ecx
push edx
mov ecx, esi
call dword [eax + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret 8
lea edx, [esp + 0x20]
push edx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x45dcc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebp
push 0x4e99d8
lea eax, [esi + 0x55]
push 0xfff
push eax
call fcn.00466ca7
mov ecx, dword [0x4d30ac]
mov edx, dword [esi]
add esp, 0x14
lea eax, [esp + 0x10]
push 0x55d
push eax
push ecx
mov ecx, esi
call dword [edx + 0x10]
jmp 0x45dd30
lea edx, [esp + 0x20]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x45dcfa
cmp dword [esp + 0x24], 1
je 0x45dd4b
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x45dcd8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebp
push 0x4e9a0c
lea edx, [esi + 0x55]
push 0xfff
push edx
call fcn.00466ca7
mov eax, dword [esi]
add esp, 0x14
push 0x571
mov edx, dword [0x4d30ac]
lea ecx, [esp + 0x14]
push ecx
push edx
mov ecx, esi
call dword [eax + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
mov eax, 0x10
pop ebx
add esp, 0x2c
ret 8
push ebp
push 0x4e99c4
lea ecx, [esi + 0x55]
push 0xfff
push ecx
call fcn.00466ca7
mov ecx, dword [0x4d30a4]
mov edx, dword [esi]
add esp, 0x10
lea eax, [esp + 0x10]
push 0x568
push eax
push ecx
mov ecx, esi
call dword [edx + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret 8