Function at 0x140039c90
Capabilities:
Check mutex on windows
Delete file
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov rax, qword [rsp + 0x90]
movzx eax, word [rax + 0x38]
test eax, eax
jle 0x140039f38
mov rax, qword [rsp + 0x90]
add rax, 0x88
mov rcx, rax
call fcn.140030f30
test eax, eax
jne 0x140039f38
mov rax, qword [rsp + 0x90]
movzx eax, byte [rax + 0x3a]
test eax, eax
jne 0x140039f38
mov rax, qword [rsp + 0x90]
mov byte [rax + 0x3a], 1
lea rdx, str._TMP_
lea rcx, [rsp + 0x68]
call fcn.140030130
nop
mov rax, qword [rsp + 0x90]
add rax, 0x20
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400305f0
mov qword [rsp + 0x50], 0xffffffffffffffff
mov qword [rsp + 0x58], 0
lea rcx, [rsp + 0x68]
call fcn.140030730
mov r8, rax
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rsp + 0x58], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xb7
jne 0x140039d77
mov edx, 0x7d0
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword [rsp + 0x90]
add rax, 0x88
mov rcx, rax
call fcn.140030730
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x140039e11
mov dword [rsp + 0x44], 0
mov rax, qword [rsp + 0x90]
add rax, 0x38
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, 2
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x50], 0xffffffffffffffff
mov rax, qword [rsp + 0x90]
movzx eax, word [rax + 0x38]
dec ax
mov rcx, qword [rsp + 0x90]
mov word [rcx + 0x38], ax
mov rax, qword [rsp + 0x90]
movzx eax, word [rax + 0x38]
test eax, eax
jne 0x140039e60
mov rax, qword [rsp + 0x90]
add rax, 0x88
mov rcx, rax
call fcn.140030730
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x140039efa
mov rax, qword [rsp + 0x90]
add rax, 0x88
mov rcx, rax
call fcn.140030730
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x140039efa
mov dword [rsp + 0x48], 0
mov rax, qword [rsp + 0x90]
add rax, 0x38
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, 2
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x50], 0xffffffffffffffff
jmp 0x140039efc
cmp qword [rsp + 0x58], 0
je 0x140039f1a
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x140039f2e
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x68]
call fcn.140030070
mov rax, qword [rsp + 0x90]
cmp qword [rax + 0xa0], 0
je 0x140039f87
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax + 0xa0]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax + 0xa0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x90]
mov qword [rax + 0xa0], 0
mov rax, qword [rsp + 0x90]
movzx eax, word [rax + 0x38]
add rsp, 0x88
ret