Function at 0x418410
Capabilities:
Modify service
Query service configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x459074]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x34], 1
cmp dword [ebp + 8], 0
jne 0x418435
mov eax, dword [ebp - 0x34]
jmp 0x4186e9
push 0x20000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x4184a8
mov dword [ebp - 0x40], 0x453600
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 0x418476
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x44], ecx
jmp 0x41847c
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 0xef
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 0x41844d
mov eax, dword [ebp - 0x34]
jmp 0x4186e9
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 0x418529
mov dword [ebp - 0x4c], 0x453690
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 0x4184ed
mov edx, dword [ebp - 0x48]
add edx, 1
mov dword [ebp - 0x50], edx
jmp 0x4184f3
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 0xf5
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 0x4184c4
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x34]
jmp 0x4186e9
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 0x418566
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 0x4186e9
mov dword [ebp - 0x58], 0x453728
push 0x5c
mov eax, dword [ebp - 0x58]
push eax
call fcn.00423220
add esp, 8
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x41858f
mov ecx, dword [ebp - 0x54]
add ecx, 1
mov dword [ebp - 0x5c], ecx
jmp 0x418595
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x5c], edx
push str.autorun_service
push 0x103
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 0x418566
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 0x4185e1
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 0x4186e9
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 0x418675
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x64], 0x4537b0
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 0x418635
mov ecx, dword [ebp - 0x60]
add ecx, 1
mov dword [ebp - 0x68], ecx
jmp 0x41863b
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x6c]
push eax
push str.autorun_failed_:__d
push 0x119
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 0x41860c
cmp dword [ebp - 0x6c], 0x430
jne 0x418673
call fcn.00417d30
call fcn.004181e0
xor eax, eax
jmp 0x4186e9
jmp 0x4186c8
mov dword [ebp - 0x74], 0x453830
push 0x5c
mov eax, dword [ebp - 0x74]
push eax
call fcn.00423220
add esp, 8
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
je 0x41869e
mov ecx, dword [ebp - 0x70]
add ecx, 1
mov dword [ebp - 0x78], ecx
jmp 0x4186a4
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x78], edx
push str.autorun_success
push 0x121
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 0x418675
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.00421720
mov esp, ebp
pop ebp
ret