Function at 0x40ef10
Capabilities:
Query service status
Start service

Disassembly:
sub esp, 0x228
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x224], eax
cmp dword [esp + 0x230], 1
push ebp
mov ebp, dword [esp + 0x238]
jge 0x40ef56
push 1
call fcn.004098d0
add esp, 4
pop ebp
mov ecx, dword [esp + 0x224]
xor ecx, esp
call fcn.00412cdc
add esp, 0x228
ret
push ebx
mov ebx, dword [ebp]
push esi
push 5
call fcn.0040ca70
mov esi, eax
add esp, 4
test esi, esi
jne 0x40ef9c
push 0x400001fb
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 8
lea eax, [esi + 2]
pop esi
pop ebx
pop ebp
mov ecx, dword [esp + 0x224]
xor ecx, esp
call fcn.00412cdc
add esp, 0x228
ret
push edi
mov edi, dword [esp + 0x23c]
mov eax, 4
cmp edi, 0x80
ja case.0x40efb8.4
movzx ecx, byte [edi + 0x40f284]
jmp dword [ecx*4 + 0x40f270]
mov eax, 0x14
jmp case.0x40efb8.4
mov eax, 0x44
jmp case.0x40efb8.4
mov eax, 0x24
jmp case.0x40efb8.4
mov eax, 0x104
push 0x100
lea edx, [esp + 0x38]
push edx
push eax
push ebx
push esi
call fcn.0040cab0
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x40f003
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [ebx + 3]
jmp 0x40f099
test edi, edi
jne 0x40f10f
mov eax, dword [esp + 0x240]
push ebp
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
mov edi, eax
call ebp
cmp edi, 0x3e5
jne 0x40f03c
xor edi, edi
jmp 0x40f047
cmp dword [esp + 0x10], 0
je 0x40f0dd
push 1
push 0
lea esi, [esp + 0x20]
call fcn.0040c560
add esp, 8
push ebx
mov esi, eax
call ebp
test esi, esi
je 0x40f0b2
push 0
call fcn.0040e4b0
mov ecx, dword [esp + 0x20]
add esp, 4
push eax
push ecx
call fcn.0040e5a0
add esp, 4
push eax
lea edx, [esp + 0x3c]
push edx
push 0x40000227
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 0x14
mov eax, 1
mov ecx, dword [esp + 0x234]
pop edi
pop esi
pop ebx
pop ebp
xor ecx, esp
call fcn.00412cdc
add esp, 0x228
ret
push edi
call fcn.004052c0
add esp, 4
push eax
push 0
call fcn.0040e4b0
add esp, 4
push eax
lea eax, [esp + 0x3c]
push eax
push str._s:__s:__s
call fcn.00413c2a
add esp, 0x10
xor eax, eax
jmp 0x40f099
push ebx
call ebp
push edi
call fcn.004052c0
add esp, 4
push eax
push 0
call fcn.0040e4b0
add esp, 4
push eax
lea ecx, [esp + 0x3c]
push ecx
push str._s:__s:__s
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00413b96
jmp 0x40f091
lea edx, [esp + 0x18]
push edx
cmp edi, 4
jne 0x40f175
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
je 0x40f14b
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040e5a0
push eax
push 0x41e84c
call fcn.00413c2a
add esp, 0xc
xor eax, eax
jmp 0x40f099
push eax
call fcn.004052c0
add esp, 4
push eax
lea ecx, [esp + 0x38]
push ecx
push str._s:__s_n
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00413b96
add esp, 0x10
jmp 0x40f094
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebp, eax
call esi
cmp ebp, 0x3e5
jne 0x40f1a6
xor ebp, ebp
jmp 0x40f1ad
cmp dword [esp + 0x10], 0
je 0x40f21b
mov ecx, dword [esp + 0x14]
push ecx
push edi
lea esi, [esp + 0x20]
call fcn.0040c560
add esp, 8
push ebx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40f1ee
push edi
call fcn.0040e4b0
mov edx, dword [esp + 0x20]
add esp, 4
push eax
push edx
call fcn.0040e5a0
add esp, 4
push eax
lea eax, [esp + 0x3c]
push eax
jmp 0x40f07e
push ebp
call fcn.004052c0
add esp, 4
push eax
push edi
call fcn.0040e4b0
add esp, 4
push eax
lea ecx, [esp + 0x3c]
push ecx
push str._s:__s:__s
call fcn.00413c2a
add esp, 0x10
xor eax, eax
jmp 0x40f099
push ebx
call esi
push ebp
call fcn.004052c0
add esp, 4
push eax
push edi
call fcn.0040e4b0
add esp, 4
push eax
lea edx, [esp + 0x3c]
push edx
push str._s:__s:__s
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00413b96
add esp, 0x14
cmp ebp, 0x426
jne 0x40f094
cmp edi, 5
je 0x40f267
cmp edi, 1
jne 0x40f094
xor eax, eax
jmp 0x40f099