Function at 0x4026f0
Capabilities:
Create service
Delete service
Persist via windows service
Query service status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x13c
mov eax, dword [0x41f004]
xor eax, esp
mov dword [esp + 0x138], eax
mov eax, dword [ebp + 8]
mov dword [esp], 0x41c56c
mov dword [esp + 4], 0x402b90
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 2
jle 0x402758
mov ecx, dword [edi]
call fcn.00402500
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x4027fa
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
test eax, eax
jne 0x4027e3
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
push str.Qualcomm_MTU_Service
push str._s_start_error__u_n
call fcn.00403f40
add esp, 0xc
push dword [edi]
push str.To_run_in_console_mode__use:__s_app_n
call fcn.00403f40
push 0x41c56c
push str.To_run_in_service_mode__install_it_and_try:_net_start__s_n
call fcn.00403f40
add esp, 0x10
call esi
push eax
push str.Qualcomm_MTU_Service
push str._s_start_error__u_n
call fcn.00401010
add esp, 0xc
push dword [edi]
push str.To_run_in_console_mode__use:__s_app_n
call fcn.00401010
push 0x41c56c
push str.To_run_in_service_mode__install_it_and_try:_net_start__s_n
call fcn.00401010
add esp, 0x10
mov ecx, dword [edi]
call fcn.00402500
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
push 0x41c608
push dword [edi + 4]
call fcn.00404bc0
add esp, 8
test eax, eax
jne 0x4027dc
push 0x41c60c
push dword [edi + 4]
call fcn.00404bc0
add esp, 8
test eax, eax
jne 0x4027dc
mov edx, dword [edi + 4]
mov ecx, 0x41c610
mov eax, edx
nop dword [eax]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x402850
test bl, bl
je 0x40284c
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x402850
add eax, 2
add ecx, 2
test bl, bl
jne 0x402830
xor eax, eax
jmp 0x402855
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4028b2
push str.Qualcomm_MTU_Service
push str._s_running_in_application_console_mode._n
call fcn.00401010
push str.Press_ESC_to_exit_with_device_disconnected_n
call fcn.00401010
add esp, 0xc
push str.Qualcomm_MTU_Service
push str._s_running_in_application_console_mode._n
call fcn.00403f40
push str.Press_ESC_to_exit_with_device_disconnected_n
call fcn.00403f40
add esp, 0xc
mov ecx, 1
call fcn.00401090
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
mov ecx, str.app_debug
mov eax, edx
nop dword [eax]
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x4028e0
test bl, bl
je 0x4028dc
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x4028e0
add eax, 2
add ecx, 2
test bl, bl
jne 0x4028c0
xor eax, eax
jmp 0x4028e5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40294c
push str.Qualcomm_MTU_Service
push str._s_running_in_application_console_DEBUG_mode_n
call fcn.00401010
push str.Press_ESC_to_exit_with_device_disconnected_n
call fcn.00401010
add esp, 0xc
push str.Qualcomm_MTU_Service
push str._s_running_in_application_console_DEBUG_mode_n
call fcn.00403f40
push str.Press_ESC_to_exit_with_device_disconnected_n
call fcn.00403f40
add esp, 0xc
mov dword [0x4202e8], 1
mov ecx, 1
call fcn.00401090
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
mov ecx, str.install
mov eax, edx
mov bl, byte [eax]
cmp bl, byte [ecx]
jne 0x402973
test bl, bl
je 0x40296f
mov bl, byte [eax + 1]
cmp bl, byte [ecx + 1]
jne 0x402973
add eax, 2
add ecx, 2
test bl, bl
jne 0x402953
xor eax, eax
jmp 0x402978
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402aca
push str.Qualcomm_MTU_Service
push str.Installing:__s_n
call fcn.00403f40
add esp, 8
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x402a9a
push 0x105
lea eax, [esp + 0x3c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, eax
lea eax, [esp + 0x38]
push eax
push str.Installing_Module_Path:___s__n
call fcn.00403f40
lea eax, [esi - 1]
add esp, 8
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp eax, 0x103
ja 0x402a73
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x4c]
push eax
push 1
push 2
push 0x10
push 0xf01ff
push str.Qualcomm_MTU_Service
push 0x41c56c
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
je 0x402a40
push eax
call esi
push str.Qualcomm_MTU_Service
push str.Installed:__s_n
call fcn.00403f40
add esp, 8
push edi
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Qualcomm_MTU_Service
push str.CreateService_failure:___s__error__d_n
call fcn.00403f40
add esp, 0xc
push edi
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
push str.Error:_failed_to_obtain_service_path._n
call fcn.00403f40
add esp, 4
push edi
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Qualcomm_MTU_Service
push str.OpenSCManager_failure:___s__error__d_n
call fcn.00403f40
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
mov eax, str.uninstall
nop
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x402af0
test cl, cl
je 0x402aec
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x402af0
add edx, 2
add eax, 2
test cl, cl
jne 0x402ad0
xor eax, eax
jmp 0x402af5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402737
push str.Qualcomm_MTU_Service
push str.Uninstalling:__s_n
call fcn.00403f40
add esp, 8
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x4027e3
push 0x10004
push 0x41c56c
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x402b75
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x402b72
cmp dword [esp + 0x20], 1
jne 0x402b72
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push str.Qualcomm_MTU_Service
push str.Uninstalled:__s_n
call fcn.00403f40
add esp, 8
push esi
call ebx
push edi
call ebx
mov ecx, dword [esp + 0x144]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00403f9d
mov esp, ebp
pop ebp
ret