Function at 0x4188c0
Capabilities:
Modify service
Query service configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x45a074]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x34], 1
cmp dword [ebp + 8], 0
jne 0x4188e5
mov eax, dword [ebp - 0x34]
jmp 0x418b99
push 0x20000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x418958
mov dword [ebp - 0x40], 0x454560
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 0x418926
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x44], ecx
jmp 0x41892c
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x44], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.sc_Manager_is_NULL:__d
push 0xf0
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 0x4188fd
mov eax, dword [ebp - 0x34]
jmp 0x418b99
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 - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x4189d9
mov dword [ebp - 0x4c], 0x4545d8
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 0x41899d
mov edx, dword [ebp - 0x48]
add edx, 1
mov dword [ebp - 0x50], edx
jmp 0x4189a3
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.sc_service_is_NULL:__d
push 0xf6
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 0x418974
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x34]
jmp 0x418b99
mov dword [ebp - 8], 0
lea ecx, [ebp - 8]
push ecx
push 0x24
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
cmp dword [ebp - 0x28], 2
jne 0x418a16
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x34]
jmp 0x418b99
mov dword [ebp - 0x58], 0x454650
push 0x5c
mov eax, dword [ebp - 0x58]
push eax
call fcn.00423700
add esp, 8
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x418a3f
mov ecx, dword [ebp - 0x54]
add ecx, 1
mov dword [ebp - 0x5c], ecx
jmp 0x418a45
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x5c], edx
push str.autorun_service
push 0x104
mov eax, dword [ebp - 0x5c]
push eax
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x10
xor ecx, ecx
jne 0x418a16
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
jne 0x418a91
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x34]
jmp 0x418b99
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
jne 0x418b25
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x64], 0x4546c0
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 0x418ae5
mov ecx, dword [ebp - 0x60]
add ecx, 1
mov dword [ebp - 0x68], ecx
jmp 0x418aeb
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x6c]
push eax
push str.autorun_failed_:__d
push 0x11a
mov ecx, dword [ebp - 0x68]
push ecx
push 1
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor edx, edx
jne 0x418abc
cmp dword [ebp - 0x6c], 0x430
jne 0x418b23
call fcn.004181e0
call fcn.00418690
xor eax, eax
jmp 0x418b99
jmp 0x418b78
mov dword [ebp - 0x74], 0x454758
push 0x5c
mov eax, dword [ebp - 0x74]
push eax
call fcn.00423700
add esp, 8
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
je 0x418b4e
mov ecx, dword [ebp - 0x70]
add ecx, 1
mov dword [ebp - 0x78], ecx
jmp 0x418b54
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x78], edx
push str.autorun_success
push 0x122
mov eax, dword [ebp - 0x78]
push eax
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x10
xor ecx, ecx
jne 0x418b25
mov dword [ebp - 0x34], 1
mov edx, dword [ebp - 0x7c]
push edx
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421c00
mov esp, ebp
pop ebp
ret