Function at 0x1400593bc
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov qword [rax - 0x58], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov r12, rdx
mov r14, rcx
lea rsi, [rcx + 0x60]
mov qword [rsp + 0xa0], rsi
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
mov qword [rsp + 0xa8], rsi
xor ebx, ebx
cmp byte [r14 + 0x88], bl
je 0x14005941d
test rsi, rsi
je 0x140059413
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
mov eax, 0x80004004
jmp 0x1400596f4
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax + 8]
call qword [case.0x14005981a.0]
mov rcx, rbx
mov qword [rsp + 0x90], rbx
lea rax, [rsp + 0x90]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], r14
movups xmm0, xmmword [rsp + 0x38]
movdqu xmmword [rsp + 0x48], xmm0
mov byte [rsp + 0x58], 1
lea rdi, [r14 + 0xd0]
mov r15, qword [rdi]
test r15, r15
jne 0x14005954b
lea ecx, [r15 + 0x58]
call fcn.1400ca818
mov rdi, rax
test rax, rax
je 0x1400594a1
mov qword [rax + 8], rbx
lea rax, [0x1400d4bf8]
mov qword [rdi], rax
mov qword [rdi + 0x30], rbx
mov qword [rdi + 0x38], rbx
mov qword [rdi + 0x40], rbx
mov dword [rdi + 0x48], ebx
mov qword [rdi + 0x50], rbx
jmp 0x1400594a4
mov rdi, rbx
mov r8, qword [rsp + 0x90]
cmp rdi, r8
je 0x1400594c9
lea rcx, [rsp + 0x90]
call fcn.140059c0c
mov r8, rdi
mov qword [rsp + 0x90], rdi
xor edx, edx
lea ecx, [rdx + 1]
call fcn.14000cbbc
mov edi, eax
test eax, eax
jns 0x140059597
mov byte [rsp + 0x58], bl
lea rcx, [rsp + 0x48]
call fcn.140059710
nop
lea rcx, [rsp + 0x90]
call fcn.140059c0c
nop
test rsi, rsi
je 0x140059508
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
mov eax, edi
jmp 0x1400596f4
lea rax, [rsp + 0x90]
cmp rax, rdi
je 0x140059578
mov qword [rdi], rbx
test r15, r15
je 0x140059578
lea rcx, [rsp + 0x90]
call fcn.140059c0c
mov rcx, r15
mov qword [rsp + 0x90], rcx
lea rax, [rcx + 0x50]
cmp rdi, rax
je 0x14005959f
mov r15, qword [rax]
mov qword [rax], rbx
cmp r15, qword [rdi]
je 0x140059597
mov rcx, rdi
call fcn.140059c0c
mov qword [rdi], r15
mov rcx, qword [rsp + 0x90]
add rcx, 0x30
mov rdx, r12
call fcn.140035664
mov rcx, qword [rsp + 0x90]
add rcx, 0x10
xor edx, edx
lea r8d, [rdx + 0x20]
call sub.msvcrt.dll_memset
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax + 8]
mov qword [rax + 0x28], rcx
mov r15, qword [r14 + 0x90]
lock inc dword [r15 + 0x58]
mov rcx, qword [r15 + 0x30]
call qword [sym.imp.api_ms_win_core_threadpool_l1_2_0.dll_StartThreadpoolIo]
mov qword [rsp + 0x38], r15
mov byte [rsp + 0x40], 1
mov rax, qword [rsp + 0x90]
mov r8d, dword [rax + 0x48]
mov rdx, qword [rax + 0x40]
mov rcx, qword [r14 + 0x90]
add rax, 0x10
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov rcx, qword [rcx + 0x20]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
jne 0x140059649
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x3e5
je 0x140059649
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x14005964f
mov edi, 0x8000ffff
jmp 0x14005964f
mov edi, ebx
test ebx, ebx
jns 0x140059660
mov rcx, qword [r15 + 0x30]
call qword [sym.imp.api_ms_win_core_threadpool_l1_2_0.dll_CancelThreadpoolIo]
lock dec dword [r15 + 0x58]
jmp 0x140059673
mov rax, qword [r15]
mov rcx, r15
mov rax, qword [rax + 8]
call qword [case.0x14005981a.0]
nop
mov edi, ebx
test edi, edi
js 0x1400594dd
lea rdi, [r14 + 0xd8]
mov r14, qword [rsp + 0x90]
lea r15, [r14 + 0x50]
cmp r15, rdi
je 0x1400596b1
mov r12, qword [rdi]
mov qword [rdi], rbx
cmp r12, qword [r15]
je 0x1400596b1
mov rcx, r15
call fcn.140059c0c
mov qword [r15], r12
mov r14, qword [rsp + 0x90]
lea rax, [rsp + 0x90]
cmp rdi, rax
je 0x1400596d6
mov qword [rsp + 0x90], rbx
cmp r14, qword [rdi]
je 0x1400596d6
mov rcx, rdi
call fcn.140059c0c
mov qword [rdi], r14
lea rcx, [rsp + 0x90]
call fcn.140059c0c
nop
test rsi, rsi
je 0x1400596f2
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
xor eax, eax
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret