Function at 0x40bc40
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x45c028
push 0x439ec0
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, 0x20d0
call fcn.00439e90
mov eax, dword [0x45f478]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, dword [ebp + 8]
mov dword [ebp - 0x20e8], edi
mov dword [ebp - 4], 0
test edi, edi
je 0x40bc97
mov byte [edi], 0
mov byte [ebp - 0xdc], 0
push 0x7f
push 0
lea eax, [ebp - 0xdb]
push eax
call fcn.0043a6b0
mov byte [ebp - 0x5c], 0
push 0x3f
push 0
lea eax, [ebp - 0x5b]
push eax
call fcn.0043a6b0
add esp, 0x18
push str.get_module_name
lea eax, [ebp - 0x5c]
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
call ebx
test eax, eax
je 0x40bd23
push 0
push 1
lea eax, [ebp - 0xdc]
push eax
call fcn.00404250
add esp, 0xc
test al, al
je 0x40bd23
push 0x44b808
lea eax, [ebp - 0x5c]
push eax
call ebx
test eax, eax
je 0x40bd23
push 0x460b08
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [0x460b04], eax
test eax, eax
je 0x40bd23
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x40bdb5
test edi, edi
je 0x40bd99
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov byte [ebp - 0x20dc], 0
push 0xfff
push 0
lea eax, [ebp - 0x20db]
push eax
call fcn.0043a6b0
lea eax, [ebp - 0x20dc]
push eax
push esi
call fcn.0040c5d0
add esp, 0x14
lea eax, [ebp - 0x5c]
push eax
push edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
call ebx
push str._completed_with_unsuccess._r_n_r_ncommon_environment_state_:_r_n_r_nthreads_last_error_code_value_is
push edi
call ebx
push 0xa
push 0xc
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, edi
push eax
push esi
call fcn.0043971d
add esp, 0x10
push 0x44b880
push edi
call ebx
lea eax, [ebp - 0x20dc]
push eax
push edi
call ebx
jmp 0x40bd9f
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0
push 0
push 0x60000001
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
cmp dword [0x460b08], 2
jl 0x40be87
push str._install
push dword [eax + 4]
call esi
test eax, eax
je 0x40be0f
push str._remove
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
je 0x40be0f
push str._service
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
je 0x40be0f
push str._application
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40be87
push str._install
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40be2b
cmp dword [0x460b08], 4
jg 0x40be87
push str._remove
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40be47
cmp dword [0x460b08], 3
jg 0x40be87
push str._service
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40be63
cmp dword [0x460b08], 2
jg 0x40be87
push str._application
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40bf10
cmp dword [0x460b08], 2
jle 0x40bf10
push str.Unregulated_program_usage__r_n_r_n
push edi
call ebx
push str.Following_usage_scenarios_are_supported_:_r_n_r_n
push edi
call ebx
push str.1._Install_module_as_service_r_n
push edi
call ebx
lea eax, [ebp - 0xdc]
push eax
push edi
call ebx
push str.__install__service_name___service_description__r_n_r_n
push edi
call ebx
push str.2._Deinstall_module_installed_as_service_r_n
push edi
call ebx
lea eax, [ebp - 0xdc]
push eax
push edi
call ebx
push str.__remove__service_name__r_n_r_n
push edi
call ebx
push str.3._Run_module_as_service_r_n
push edi
call ebx
lea eax, [ebp - 0xdc]
push eax
push edi
call ebx
push str.__service_r_n_r_n
push edi
call ebx
push str.4._Run_module_as_application_r_n
push edi
call ebx
lea eax, [ebp - 0xdc]
push eax
push edi
call ebx
push str.__appication_r_n
push edi
call ebx
push 0
push 0
push 0
push 0x60000001
call dword [sym.imp.KERNEL32.dll_RaiseException]
push str._install
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40bf35
mov eax, 1
mov word [0x460b00], ax
mov al, al
jmp 0x40c0bf
push str._remove
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40bf5a
mov eax, 2
mov word [0x460b00], ax
mov al, 1
jmp 0x40c0bf
push str._service
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40c042
mov eax, 3
mov word [0x460b00], ax
push str.CreateEvent
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
test eax, eax
je 0x40bfbf
push 0
push 0
push 1
push 0
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
call esi
mov dword [0x460b10], eax
test eax, eax
je 0x40bfbf
push 0
push 0
push 1
push 0
call esi
mov dword [0x460b14], eax
test eax, eax
jne 0x40c06c
test edi, edi
je 0x40c02d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov byte [ebp - 0x10dc], 0
push 0xfff
push 0
lea eax, [ebp - 0x10db]
push eax
call fcn.0043a6b0
lea eax, [ebp - 0x10dc]
push eax
push esi
call fcn.0040c5d0
add esp, 0x14
lea eax, [ebp - 0x5c]
push eax
push edi
call ebx
push str._completed_with_unsuccess._r_n_r_ncommon_environment_state_:_r_n_r_nthreads_last_error_code_value_is
push edi
call ebx
push 0xa
push 0xc
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, edi
push eax
push esi
call fcn.0043971d
add esp, 0x10
push 0x44b880
push edi
call ebx
lea eax, [ebp - 0x10dc]
push eax
push edi
call ebx
push 0
push 0
push 0
push 0x60000001
call dword [sym.imp.KERNEL32.dll_RaiseException]
push str._application
mov eax, dword [0x460b04]
push dword [eax + 4]
call esi
test eax, eax
jne 0x40c064
mov eax, 4
mov word [0x460b00], ax
mov al, 1
jmp 0x40c0bf
xor eax, eax
mov word [0x460b00], ax
mov al, 1
jmp 0x40c0bf
mov byte [ebp - 0x20dd], al
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00439a01
mov esp, ebp
pop ebp
ret