Function at 0x405130
Capabilities:
Accept command line arguments
Delete service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x429fa0]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [ebp - 0xc], 2
mov edi, eax
mov dword [ebp - 8], edi
jge 0x405174
push 0
push str.Intergy_Installer
push str.Intergy_Installer_Usage:_Installer.exe___install____remove____service____start____stop___n____install_t_tInstalls_the_service_in_the_SCMs_database._n____start_t_tStarts_the_service._n____start_t_tStops_the_service._n____remove_tRemoves_the_service_from_the_SCMs_database._n____service_t_tRuns_the_process_as_a_service__should_only_be_set_in_the_SCMs_database_.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4052e9
push esi
mov esi, 1
mov dword [ebp - 4], esi
cmp dword [ebp - 0xc], esi
jle 0x4052e8
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea ecx, [ecx]
mov ecx, dword [edi + esi*4]
movzx eax, word [ecx]
cmp eax, 0x2d
je 0x4051a4
cmp eax, 0x2f
jne 0x4052da
push str.install
lea eax, [ecx + 2]
push eax
call ebx
test eax, eax
jne 0x4051b8
call fcn.00402780
mov eax, dword [edi + esi*4]
push str.remove
add eax, 2
push eax
call ebx
test eax, eax
jne 0x405212
push 1
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
push 0x10000
mov esi, eax
push str.Intergy_Installer
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test edi, edi
je 0x4051ff
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
jmp 0x405205
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40520c
push esi
call edi
mov edi, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [edi + esi*4]
push str.stop
add eax, 2
push eax
call ebx
test eax, eax
jne 0x405229
call fcn.00402df0
mov eax, dword [edi + esi*4]
push str.start
add eax, 2
push eax
call ebx
test eax, eax
jne 0x405287
push 1
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
push 0xf01ff
mov esi, eax
push str.Intergy_Installer
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push 0
mov edi, eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test edi, edi
je 0x405274
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
jmp 0x40527a
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x405281
push esi
call edi
mov edi, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [edi + esi*4]
push str.debug
add eax, 2
push eax
call ebx
test eax, eax
jne 0x4052aa
push eax
jmp 0x4310d0
mov eax, dword [edi + esi*4]
push str.service
add eax, 2
push eax
call ebx
test eax, eax
jne 0x4052da
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], str.Intergy_Installer
mov dword [ebp - 0x18], fcn.004028c0
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
inc esi
mov dword [ebp - 4], esi
cmp esi, dword [ebp - 0xc]
jl 0x405190
pop ebx
pop esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 0x10