Function at 0x1400258c0
Capabilities:
Delete file

Disassembly:
push rsi
sub rsp, 0x160
mov rax, qword [0x1400a37d8]
xor rax, rsp
mov qword [rsp + 0x140], rax
lea rax, [0x140025e30]
mov r9d, 7
mov qword [rsp + 0x28], rax
lea r8, [0x1400a2a40]
lea rax, [0x1400260b0]
mov qword [rsp + 0x20], rax
call fcn.1400243d0
mov rsi, rax
test rax, rax
jne 0x140025915
lea eax, [rsi - 1]
jmp 0x140025d9c
xor ecx, ecx
mov qword [rsp + 0x180], rbx
call fcn.140001060
test eax, eax
jne 0x140025941
mov rcx, rsi
call fcn.140024350
lea rdx, str.Failed_to_redirect_output_n
mov ecx, 0x3e7
call fcn.14001a710
mov edx, 6
mov rcx, rsi
lea r8d, [rdx - 4]
call fcn.140024540
mov ebx, eax
test eax, eax
je 0x14002599b
mov rcx, rsi
call fcn.140024350
cmp ebx, 0xfffffffb
jne 0x140025975
xor edx, edx
xor ecx, ecx
call fcn.14001a710
xor eax, eax
jmp 0x140025d94
cmp ebx, 0xfffffff8
jne 0x140025a58
lea rcx, str.Please_run_this_as_root__n
call fcn.140001250
lea rdx, [0x14006e9b0]
mov ecx, 0x3e7
call fcn.14001a710
cmp dword [rsi + 0x64], 0
mov qword [rsp + 0x158], rbp
mov qword [rsp + 0x150], rdi
je 0x140025aba
lea rdx, [0x140086060]
lea rcx, str.C:Program_FilesNVIDIA_CorporationNVSMI_nvsmi_pid.txt
call fcn.140048c90
mov rbx, rax
test rax, rax
je 0x140025aa4
lea r8, [rsp + 0x30]
mov rcx, rax
lea rdx, [0x140086064]
call fcn.140025870
mov rcx, rbx
test eax, eax
jle 0x140025a9f
mov ebp, dword [rsp + 0x30]
call fcn.14004881c
mov r8d, ebp
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rcx, rax
xor edx, edx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0x102
jne 0x140025aa4
mov r9d, ebp
lea r8, str.taskkill__pid__d__f
lea edx, [rbx - 2]
lea rcx, [rsp + 0x40]
call fcn.14000c210
lea rcx, [rsp + 0x40]
call fcn.14005792c
test eax, eax
jne 0x140025db5
jmp 0x140025a70
lea rdx, str.Failed_to_process_command_line__n_n
mov ecx, 0x3e7
call fcn.14001a710
mov eax, ebx
jmp 0x140025d94
lea rcx, str.C:Program_FilesNVIDIA_CorporationNVSMI_nvsmi_pid.txt
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x140025aa4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.DeleteFile_failed___d__n_n
lea rcx, str.ERROR_C:_dvs_p4_build_sw_rel_gpu_drv_r470_r470_00_apps_nvml_nvsmi_stats_daemon.c:225
call fcn.140001100
jmp 0x140025aa4
call fcn.14004881c
mov rcx, rsi
call fcn.140024350
lea rdx, [0x14006e9b0]
xor ecx, ecx
call fcn.14001a710
lea rdx, [0x140086060]
lea rcx, str.C:Program_FilesNVIDIA_CorporationNVSMI_nvsmi_pid.txt
call fcn.140048c90
mov rbx, rax
test rax, rax
je 0x140025b5c
lea r8, [rsp + 0x30]
mov rcx, rax
lea rdx, [0x140086064]
call fcn.140025870
mov rcx, rbx
test eax, eax
jle 0x140025b57
mov ebp, dword [rsp + 0x30]
call fcn.14004881c
mov r8d, ebp
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rcx, rax
xor edx, edx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0x102
jne 0x140025b5c
mov edx, ebp
lea rcx, str.Daemon_already_running_with_pid__ld_n
call fcn.140006be0
mov rcx, rsi
call fcn.140024350
lea rdx, [0x14006e9b0]
mov ecx, 0x3e7
call fcn.14001a710
jmp 0x140025b5c
call fcn.14004881c
lea rdx, [0x140086060]
lea rcx, str.C:Program_FilesNVIDIA_CorporationNVSMI_nvsmi_pid.txt
call fcn.140048c90
mov rbx, rax
test rax, rax
je 0x140025bd7
lea r8, [rsp + 0x30]
mov rcx, rax
lea rdx, [0x140086064]
call fcn.140025870
mov rcx, rbx
test eax, eax
jle 0x140025bd2
mov ebp, dword [rsp + 0x30]
call fcn.14004881c
mov r8d, ebp
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rcx, rax
xor edx, edx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0x102
je 0x140025dd8
jmp 0x140025bd7
call fcn.14004881c
lea rcx, str.C:Program_FilesNVIDIA_CorporationNVSMI_nvsmi_pid.txt
call fcn.140057844
call sub.KERNEL32.dll_GetCurrentProcessId
lea rdx, [0x140086068]
mov edi, eax
lea rcx, str.C:Program_FilesNVIDIA_CorporationNVSMI_nvsmi_pid.txt
call fcn.140048c90
mov rbx, rax
test rax, rax
je 0x140025df1
mov r8d, edi
lea rdx, str._ld_n
mov rcx, rax
call fcn.1400010b0
mov rcx, rbx
call fcn.14004881c
call fcn.140042800
test eax, eax
je 0x140025c3e
mov rcx, rsi
call fcn.140024350
mov eax, 0xffffffff
jmp 0x140025d84
lea rdx, [0x14007a228]
lea rcx, [0x1400a4968]
call fcn.140042920
test eax, eax
je 0x140025c6e
mov rcx, rsi
call fcn.140024350
lea rdx, str.Mismatch_in_versions_between_nvidia_smi_and_NVML._nAre_you_sure_you_are_using_nvidia_smi_provided_with_the_driver__n
mov ecx, 0x3e7
call fcn.14001a710
call fcn.1400314b0
test eax, eax
je 0x140025c90
mov rcx, rsi
call fcn.140024350
lea rdx, str.Failed_to_install_the_control_handler_n_n
mov ecx, 0x3e7
call fcn.14001a710
xor edx, edx
mov rcx, rsi
lea r8d, [rdx + 0x10]
call fcn.140024e10
mov ebx, eax
test eax, eax
je 0x140025cc6
lea rdx, str.Failed_to_find_any_supported_device_n
lea rcx, str.ERROR_C:_dvs_p4_build_sw_rel_gpu_drv_r470_r470_00_apps_nvml_nvsmi_stats_daemon.c:449
call fcn.140001100
mov rcx, rsi
call fcn.140024350
mov eax, ebx
jmp 0x140025d84
lea rdx, str.nvsmi_daemon_started_n
lea rcx, str.DEBUG_C:_dvs_p4_build_sw_rel_gpu_drv_r470_r470_00_apps_nvml_nvsmi_stats_daemon.c:454
call fcn.140001100
mov rcx, rsi
call fcn.14001ec20
mov rbx, rax
test rax, rax
jne 0x140025d15
lea rdx, str.Failed_to_Initialize_Monitor_Handler_n
lea rcx, str.ERROR_C:_dvs_p4_build_sw_rel_gpu_drv_r470_r470_00_apps_nvml_nvsmi_stats_daemon.c:463
call fcn.140001100
mov rcx, rsi
call fcn.140024350
xor edx, edx
mov ecx, 0x3e7
call fcn.14001a710
lea eax, [rbx - 3]
jmp 0x140025d84
mov rcx, rbx
call fcn.14001ed90
mov edi, eax
test eax, eax
je 0x140025d56
lea rdx, str.Failed_to_Run_Monitor_Handler_n
lea rcx, str.ERROR_C:_dvs_p4_build_sw_rel_gpu_drv_r470_r470_00_apps_nvml_nvsmi_stats_daemon.c:474
call fcn.140001100
mov rcx, rbx
call fcn.14001ebe0
mov rcx, rsi
call fcn.140024350
xor edx, edx
mov ecx, 0x3e7
call fcn.14001a710
mov eax, edi
jmp 0x140025d84
mov rcx, rbx
call fcn.14001ebe0
mov rcx, rsi
call fcn.140024350
lea rdx, str.nvsmi_daemon_terminated_n
lea rcx, str.DEBUG_C:_dvs_p4_build_sw_rel_gpu_drv_r470_r470_00_apps_nvml_nvsmi_stats_daemon.c:487
call fcn.140001100
xor edx, edx
xor ecx, ecx
call fcn.14001a710
xor eax, eax
mov rbp, qword [rsp + 0x158]
mov rdi, qword [rsp + 0x150]
mov rbx, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.140032ca0
add rsp, 0x160
pop rsi
ret
lea r8, [rsp + 0x40]
lea rdx, str.Failed_to__s__n
lea rcx, str.ERROR_C:_dvs_p4_build_sw_rel_gpu_drv_r470_r470_00_apps_nvml_nvsmi_stats_daemon.c:220
call fcn.140001100
mov ecx, 1
call fcn.140054fcc
int3
mov edx, ebp
lea rcx, str.Daemon_already_running_with_pid__ld_n
call fcn.140006be0
mov ecx, 1
call fcn.140054fcc
int3
lea rdx, str.C:Program_FilesNVIDIA_CorporationNVSMI_nvsmi_pid.txt
lea rcx, str.Error_writing_pidfile__s_n
call fcn.140006be0
lea rdx, str.C:Program_FilesNVIDIA_CorporationNVSMI_nvsmi_pid.txt
lea rcx, str.Daemon_failed_to_write_PID_to_file__s_n
call fcn.140006be0
mov ecx, 1
call fcn.140054fcc
int3