Function at 0x40ea70
Capabilities:
Modify service
Query service configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x45a074]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
jne 0x40ea8d
xor al, al
jmp 0x40ecee
push 0x20000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x40eaff
mov dword [ebp - 0x40], 0x4514a0
push 0x5c
mov eax, dword [ebp - 0x40]
push eax
call fcn.00423700
add esp, 8
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x40eace
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x44], ecx
jmp 0x40ead4
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x44], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x451234
push 0x220
mov eax, dword [ebp - 0x44]
push eax
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor ecx, ecx
jne 0x40eaa5
xor al, al
jmp 0x40ecee
push 0xf01ff
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x40eb7f
mov dword [ebp - 0x4c], 0x451520
push 0x5c
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.00423700
add esp, 8
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x40eb44
mov edx, dword [ebp - 0x48]
add edx, 1
mov dword [ebp - 0x50], edx
jmp 0x40eb4a
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4513fc
push 0x226
mov ecx, dword [ebp - 0x50]
push ecx
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor edx, edx
jne 0x40eb1b
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x40ecee
mov dword [ebp - 8], 0
lea ecx, [ebp - 8]
push ecx
push 0x24
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
cmp dword [ebp - 0x28], 4
jne 0x40ebbb
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x40ecee
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x40ebe9
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x40ecee
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
jne 0x40ec82
mov dword [ebp - 0x58], 0x451590
push 0x5c
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00423700
add esp, 8
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x40ec34
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x5c], edx
jmp 0x40ec3a
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.service_disabled_failed_:__d
push 0x247
mov ecx, dword [ebp - 0x5c]
push ecx
push 1
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor edx, edx
jne 0x40ec0b
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x40ecee
mov dword [ebp - 0x64], 0x451640
push 0x5c
mov eax, dword [ebp - 0x64]
push eax
call fcn.00423700
add esp, 8
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x40ecab
mov ecx, dword [ebp - 0x60]
add ecx, 1
mov dword [ebp - 0x68], ecx
jmp 0x40ecb1
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x68], edx
push str.service_disabled_success
push 0x24e
mov eax, dword [ebp - 0x68]
push eax
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x10
xor ecx, ecx
jne 0x40ec82
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421c00
mov esp, ebp
pop ebp
ret