Function at 0x140057d80
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 + 0x68]
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 + 0x90], bl
je 0x140057de1
test rsi, rsi
je 0x140057dd7
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
mov eax, 0x80004004
jmp 0x1400580b9
mov rax, qword [r14]
mov rcx, r14
mov rax, qword [rax + 8]
call qword [case.0x1400581da.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 + 0xd8]
cmp qword [rdi], rbx
jne 0x140057f0d
mov ecx, 0x58
call fcn.1400cb4b8
mov rdi, rax
test rax, rax
je 0x140057e63
mov qword [rax + 8], rbx
lea rax, [0x1400d7440]
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 0x140057e66
mov rdi, rbx
mov r8, qword [rsp + 0x90]
cmp rdi, r8
je 0x140057e8b
lea rcx, [rsp + 0x90]
call fcn.1400585d0
mov r8, rdi
mov qword [rsp + 0x90], rdi
xor edx, edx
lea ecx, [rdx + 1]
call fcn.14000bf20
mov edi, eax
test eax, eax
jns 0x140057f5c
mov byte [rsp + 0x58], bl
lea rcx, [rsp + 0x48]
call fcn.1400580d0
nop
lea rcx, [rsp + 0x90]
call fcn.1400585d0
nop
test rsi, rsi
je 0x140057eca
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
mov eax, edi
jmp 0x1400580b9
lea rax, [rsp + 0x90]
cmp rax, rdi
je 0x140057f3d
mov r15, qword [rdi]
mov qword [rdi], rbx
test r15, r15
je 0x140057f3d
lea rcx, [rsp + 0x90]
call fcn.1400585d0
mov rcx, r15
mov qword [rsp + 0x90], rcx
lea rax, [rcx + 0x50]
cmp rdi, rax
je 0x140057f64
mov r15, qword [rax]
mov qword [rax], rbx
cmp r15, qword [rdi]
je 0x140057f5c
mov rcx, rdi
call fcn.1400585d0
mov qword [rdi], r15
mov rcx, qword [rsp + 0x90]
add rcx, 0x30
mov rdx, r12
call fcn.14003515c
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 + 0x98]
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 + 0x98]
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 0x14005800e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x3e5
je 0x14005800e
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x140058014
mov edi, 0x8000ffff
jmp 0x140058014
mov edi, ebx
test ebx, ebx
jns 0x140058025
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 0x140058038
mov rax, qword [r15]
mov rcx, r15
mov rax, qword [rax + 8]
call qword [case.0x1400581da.0]
nop
mov edi, ebx
test edi, edi
js 0x140057e9f
lea rdi, [r14 + 0xe0]
mov r14, qword [rsp + 0x90]
lea r15, [r14 + 0x50]
cmp r15, rdi
je 0x140058076
mov r12, qword [rdi]
mov qword [rdi], rbx
cmp r12, qword [r15]
je 0x140058076
mov rcx, r15
call fcn.1400585d0
mov qword [r15], r12
mov r14, qword [rsp + 0x90]
lea rax, [rsp + 0x90]
cmp rdi, rax
je 0x14005809b
mov qword [rsp + 0x90], rbx
cmp r14, qword [rdi]
je 0x14005809b
mov rcx, rdi
call fcn.1400585d0
mov qword [rdi], r14
lea rcx, [rsp + 0x90]
call fcn.1400585d0
nop
test rsi, rsi
je 0x1400580b7
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