Function at 0x40ea10
Capabilities:
Modify service
Query service configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x459074]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
jne 0x40ea2d
xor al, al
jmp 0x40ec8e
push 0x20000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x40ea9f
mov dword [ebp - 0x40], 0x450320
push 0x5c
mov eax, dword [ebp - 0x40]
push eax
call fcn.00423220
add esp, 8
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x40ea6e
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x44], ecx
jmp 0x40ea74
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x44], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x450388
push 0x21d
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 0x40ea45
xor al, al
jmp 0x40ec8e
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 0x40eb1f
mov dword [ebp - 0x4c], 0x4503a0
push 0x5c
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.00423220
add esp, 8
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x40eae4
mov edx, dword [ebp - 0x48]
add edx, 1
mov dword [ebp - 0x50], edx
jmp 0x40eaea
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x450408
push 0x223
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 0x40eabb
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x40ec8e
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 0x40eb5b
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 0x40ec8e
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 0x40eb89
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 0x40ec8e
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 0x40ec22
mov dword [ebp - 0x58], 0x450420
push 0x5c
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00423220
add esp, 8
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x40ebd4
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x5c], edx
jmp 0x40ebda
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 0x244
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 0x40ebab
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 0x40ec8e
mov dword [ebp - 0x64], 0x4504a8
push 0x5c
mov eax, dword [ebp - 0x64]
push eax
call fcn.00423220
add esp, 8
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x40ec4b
mov ecx, dword [ebp - 0x60]
add ecx, 1
mov dword [ebp - 0x68], ecx
jmp 0x40ec51
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x68], edx
push str.service_disabled_success
push 0x24b
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 0x40ec22
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.00421720
mov esp, ebp
pop ebp
ret