Function at 0x140021dd0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
sub rsp, 0x98
test byte [0x140160460], 1
jne 0x140022033
mov rcx, qword [0x140160468]
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbp
mov qword [rax - 0x18], r14
test rcx, rcx
je 0x140021e16
mov rcx, qword [rcx + 8]
xor edx, edx
call sym.ProcessHacker.exe_PhGetFullPath
mov rbx, rax
mov qword [0x14015aea8], rax
jmp 0x140021e1d
mov rbx, qword [0x14015aea8]
xor r14d, r14d
or ebp, 0xffffffff
test rbx, rbx
jne 0x140021f1a
mov rbx, qword [0x14015f258]
mov qword [rsp + 0x90], rsi
mov rcx, rbx
mov rsi, qword [0x1401604c8]
mov qword [rsp + 0x88], rdi
mov rdi, qword [0x140153d08]
add rdi, qword [rsi]
lea rdx, [rdi + 0x12]
call fcn.1400ae4a0
lock inc dword [rbx + 4]
mov dword [rax + 8], 1
movzx ecx, byte [rbx + 2]
lea rbx, [rax + 0x10]
mov word [rax], cx
lea rax, [rbx + 0x10]
mov qword [rbx + 8], rax
mov qword [rbx], rdi
mov word [rax + rdi], r14w
mov r8, qword [rsi]
mov rdx, qword [rsi + 8]
mov rcx, qword [rbx + 8]
call fcn.1400e31d0
mov rcx, qword [rbx + 8]
add rcx, qword [rsi]
mov r8, qword [0x140153d08]
mov rdx, qword [str..settings.xml]
call fcn.1400e31d0
mov rcx, qword [rbx + 8]
call qword [sym.imp.ntdll.dll_RtlDoesFileExists_U]
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x90]
test al, al
je 0x140021ed7
mov qword [0x14015aea8], rbx
jmp 0x140021ef3
lea rcx, [rbx - 0x10]
mov eax, ebp
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140021eec
call fcn.1400ae580
mov rbx, qword [0x14015aea8]
test rbx, rbx
jne 0x140021f1a
lea rdx, str.Process_Hacker_2_settings.xml
lea ecx, [rbx + 0x1a]
call sym.ProcessHacker.exe_PhGetKnownLocation
mov qword [0x14015aea8], rax
mov rbx, rax
test rax, rax
je 0x14002201b
mov rcx, qword [rbx + 8]
call fcn.140089cc0
cmp eax, 0xc0000102
jne 0x14002201b
lea r8, str.Process_Hackers_settings_file_is_corrupt._Do_you_want_to_reset_it__nIf_you_select_No__the_settings_system_will_not_function_properly.
mov edx, 0x34
xor ecx, ecx
call sym.ProcessHacker.exe_PhShowMessage
cmp eax, 6
jne 0x140021ffa
mov eax, dword [0x14012a270]
lea rcx, [rsp + 0xa8]
movups xmm0, xmmword [str._settings___settings_]
mov dword [rsp + 0x70], eax
xor r9d, r9d
movzx eax, word [0x14012a274]
mov r8d, 0x120116
mov qword [rsp + 0x38], r14
mov word [rsp + 0x74], ax
mov rax, qword [0x14015aea8]
mov dword [rsp + 0x30], 0x60
mov dword [rsp + 0x28], 4
movups xmmword [rsp + 0x60], xmm0
mov rdx, qword [rax + 8]
mov dword [rsp + 0x20], 5
call sym.ProcessHacker.exe_PhCreateFileWin32Ex
test eax, eax
js 0x14002201b
mov rcx, qword [rsp + 0xa8]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x40], r14
xor r9d, r9d
mov qword [rsp + 0x38], r14
xor r8d, r8d
mov dword [rsp + 0x30], 0x15
xor edx, edx
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtWriteFile]
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x14002201b
mov rcx, qword [0x14015aea8]
add rcx, 0xfffffffffffffff0
lock xadd dword [rcx + 8], ebp
cmp ebp, 1
jne 0x140022014
call fcn.1400ae580
mov qword [0x14015aea8], r14
mov rbp, qword [rsp + 0xb8]
mov rbx, qword [rsp + 0xb0]
mov r14, qword [rsp + 0x80]
lea rcx, str.MaxSizeUnit
call sym.ProcessHacker.exe_PhGetIntegerSetting
lea rcx, str.SampleCountAutomatic
mov dword [0x140159800], eax
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x14002207f
mov ecx, 0x4e
call qword [sym.imp.USER32.dll_GetSystemMetrics]
inc eax
mov ecx, 0x800
cdq
sub eax, edx
sar eax, 1
cmp eax, ecx
cmova eax, ecx
lea rcx, str.SampleCount
mov edx, eax
call sym.ProcessHacker.exe_PhSetIntegerSetting
add rsp, 0x98
ret