Function at 0x4314e0
Capabilities:
Create service
Modify service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x4e5a30]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x230], eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0
mov dword [ebp - 0x22c], ecx
mov dword [ebp - 0x234], edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x431557
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.0046bbed
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00469ca2
mov esp, ebp
pop ebp
ret
push 3
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x238], eax
test eax, eax
jne 0x431592
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.0046bbed
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00469ca2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x234]
mov edx, dword [ebp - 0x22c]
push ecx
push edx
push ebx
push 0
push 0
lea ecx, [ebp - 0x20c]
push ecx
push 1
push edi
mov edi, dword [ebp - 0x230]
push 0x110
push 0xf01ff
push esi
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x4315df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed_w_err_0x_08lx_n
jmp 0x4316df
lea edx, [ebp - 0x22c]
push edx
push 1
push esi
mov dword [ebp - 0x22c], str.The_crash_handler_service_automatically_updates_Torch_to_the_latest_version_and_sends_anonymous_crash_reports_when_Torch_unexpectedly_shuts_down__to_ensure_that_Torch_offers_the_best_performance_and_security.
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x431611
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_setting_service_description_0x_08lx_n
call fcn.0046bbed
add esp, 8
push edi
push str._s_is_installed._n
call fcn.0046bbed
add esp, 8
cmp byte [ebp + 0x20], 0
je 0x4316e7
xor eax, eax
push eax
push eax
push esi
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x210], eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push edi
test eax, eax
je 0x4316da
push 0x4c3f50
call fcn.0046bbed
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
push 0x3e8
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x228]
push eax
push esi
call ebx
test eax, eax
je 0x4316bc
cmp dword [ebp - 0x224], 2
jne 0x4316bc
push 0x4c3f4c
call fcn.0046bbed
add esp, 4
push 0x3e8
call edi
lea ecx, [ebp - 0x228]
push ecx
push esi
call ebx
test eax, eax
jne 0x431691
cmp dword [ebp - 0x224], 4
jne 0x4316d3
mov edx, dword [ebp - 0x230]
push edx
push str._n_s_is_started._n
jmp 0x4316df
mov eax, dword [ebp - 0x230]
push eax
push str._n_s_failed_to_start._n
call fcn.0046bbed
add esp, 8
mov ecx, dword [ebp - 0x238]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ecx
call edi
test esi, esi
je 0x4316fd
push esi
call edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00469ca2
mov esp, ebp
pop ebp
ret