Function at 0x6ccb40
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
cmp qword [r8 + 0x118], 0xffffffffffffffff
mov rdi, qword [rsp + 0xe0]
mov rbp, rcx
mov rbx, rdx
mov rsi, r8
mov r12, r9
je 0x6cd050
mov rax, qword [rsp + 0xe8]
mov dword [rbx + 8], 3
mov qword [rbx + 0x80], rsi
mov qword [rbx + 0x78], 0
mov qword [rbx + 0x70], rax
mov dword [rbx + 0x88], 0
mov qword [rbx + 0xa0], 0
mov qword [rbx + 0xa8], 0xffffffffffffffff
mov qword [rbx + 0x40], 0
mov qword [rbx + 0x48], 0
mov qword [rbx + 0x50], 0
mov qword [rbx + 0x58], 0
mov dword [rbx + 0x90], 0
mov qword [rbx + 0x98], 0
test rdi, rdi
je 0x6ccc15
cmp rdi, 1
jne 0x6cce60
test byte [rsp + 0xf0], 1
jne 0x6cce60
mov r13, qword [r12]
mov edi, dword [r12]
mov r12, qword [r12 + 8]
jmp 0x6ccc1a
xor r12d, r12d
xor edi, edi
mov eax, dword [rsi + 0x58]
mov edx, eax
and edx, 0x1100000
cmp edx, 0x1100000
je 0x6ccfb4
test eax, 0x1000000
je 0x6cccf5
movabs rax, 0xffffffff00000000
mov qword [rbx + 0x98], r12
and rax, r13
mov qword [rbx + 0x68], 0
or rax, rdi
mov qword [rbx + 0x90], rax
mov rax, qword [rsi + 0x208]
test rax, rax
je 0x6cd080
mov rax, qword [rax + 0x68]
mov qword [rbx + 0x68], rax
mov rax, qword [rsi + 0x208]
mov qword [rax + 0x68], rbx
mov qword [rsi + 0x208], rbx
mov eax, dword [rsi + 0x100]
test eax, eax
je 0x6cd070
mov qword [rbx + 0x60], rdi
add qword [rsi + 0x60], rdi
mov eax, dword [rsi + 0x7c]
lea edx, [rax + 1]
mov dword [rsi + 0x7c], edx
test eax, eax
je 0x6ccd90
test edx, edx
jg 0x6cccd1
mov r8d, 0x5a8
lea rdx, str.src_win_pipe.c
lea rcx, [0x00af3071]
call qword [sym.imp.msvcrt.dll__assert]
add dword [rbp + 0x20], 1
add dword [rsi + 0x78], 1
add dword [rsi + 0x100], 1
xor esi, esi
mov eax, esi
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test eax, 0x100000
je 0x6ccdc0
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateEventA]
mov qword [rbx + 0x58], rax
test rax, rax
je 0x6cd16a
lea rax, [rbx + 0x40]
xor r9d, r9d
mov r8d, edi
mov rdx, r12
mov rcx, qword [rsi + 0x118]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x6cd0e0
mov qword [rbx + 0x60], 0
mov rcx, qword [rbx + 0x58]
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [rsi + 0x7c]
lea edx, [rax + 1]
mov dword [rsi + 0x7c], edx
test eax, eax
je 0x6ccd90
test edx, edx
jg 0x6cccd1
mov r8d, 0x583
lea rdx, str.src_win_pipe.c
lea rcx, [0x00af3071]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6cccd1
mov eax, dword [rsi + 0x58]
test al, 4
jne 0x6cccd1
mov edx, eax
or edx, 4
mov dword [rsi + 0x58], edx
test al, 8
je 0x6cccd1
mov rax, qword [rsi + 8]
add dword [rax + 8], 1
jmp 0x6cccd1
lea rax, [rbx + 0x40]
xor r9d, r9d
mov r8d, edi
mov rdx, r12
mov rcx, qword [rsi + 0x118]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x6cd0c0
mov qword [rbx + 0x60], 0
test byte [rsi + 0x5a], 8
je 0x6ccca2
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateEventA]
mov qword [rbx + 0xa0], rax
test rax, rax
je 0x6cd16a
mov rdx, qword [rbx + 0x58]
lea rcx, [rbx + 0xa8]
mov dword [rsp + 0x28], 4
mov r9, rbx
mov dword [rsp + 0x20], 0xffffffff
lea r8, [0x006cca10]
call qword [sym.imp.KERNEL32.DLL_RegisterWaitForSingleObject]
test eax, eax
jne 0x6ccca2
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
jmp 0x6ccce2
xor edx, edx
xor r15d, r15d
xor eax, eax
nop word [rax + rax]
shl rax, 4
mov eax, dword [r12 + rax]
add r15, rax
lea eax, [rdx + 1]
mov rdx, rax
cmp rdi, rax
ja 0x6cce70
mov eax, 0xffffffff
cmp r15, rax
ja 0x6cd124
lea rax, [r15 + 0xb8]
mov rcx, rax
mov qword [rsp + 0x40], rax
call fcn.006ba730
mov r14, rax
test rax, rax
je 0x6cd160
movdqu xmm0, xmmword [rbx]
lea rax, [rax + 0xb8]
xor r11d, r11d
mov r13d, 0xb8
movups xmmword [rax - 0xb8], xmm0
movdqu xmm1, xmmword [rbx + 0x10]
movups xmmword [rax - 0xa8], xmm1
movdqu xmm2, xmmword [rbx + 0x20]
movups xmmword [rax - 0x98], xmm2
movdqu xmm3, xmmword [rbx + 0x30]
movups xmmword [rax - 0x88], xmm3
movdqu xmm4, xmmword [rbx + 0x40]
movups xmmword [rax - 0x78], xmm4
movdqu xmm5, xmmword [rbx + 0x50]
movups xmmword [rax - 0x68], xmm5
movdqu xmm0, xmmword [rbx + 0x60]
movups xmmword [rax - 0x58], xmm0
movdqu xmm1, xmmword [rbx + 0x70]
movups xmmword [rax - 0x48], xmm1
movdqu xmm2, xmmword [rbx + 0x80]
movups xmmword [rax - 0x38], xmm2
movdqu xmm3, xmmword [rbx + 0x90]
movups xmmword [rax - 0x28], xmm3
movdqu xmm4, xmmword [rbx + 0xa0]
mov qword [rax - 8], rbx
xor ebx, ebx
movups xmmword [rax - 0x18], xmm4
mov dword [rax - 0x30], 1
mov qword [rsp + 0x48], rax
nop dword [rax]
shl rbx, 4
lea rcx, [r14 + r13]
mov dword [rsp + 0x3c], r11d
add rbx, r12
mov rdx, qword [rbx + 8]
mov r8d, dword [rbx]
call sub.msvcrt.dll_memcpy
mov r11d, dword [rsp + 0x3c]
mov eax, dword [rbx]
lea ebx, [r11 + 1]
add r13, rax
mov r11, rbx
cmp rdi, rbx
ja 0x6ccf50
cmp qword [rsp + 0x40], r13
jne 0x6cd130
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x50]
mov r8d, r15d
mov rbx, r14
call fcn.006ba840
mov r13, qword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
mov edi, r13d
jmp 0x6ccc1a
mov rcx, qword [rsi + 0x118]
lea r9, [rsp + 0x6c]
mov r8d, edi
mov rdx, r12
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x6cce4c
mov eax, dword [rsi + 0x7c]
mov qword [rbx + 0x60], 0
lea edx, [rax + 1]
mov dword [rsi + 0x7c], edx
test eax, eax
jne 0x6cd090
mov eax, dword [rsi + 0x58]
test al, 4
jne 0x6cd011
mov edx, eax
or edx, 4
mov dword [rsi + 0x58], edx
test al, 8
je 0x6cd011
mov rax, qword [rsi + 8]
add dword [rax + 8], 1
add dword [rbp + 0x20], 1
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0x38]
add dword [rsi + 0x78], 1
lea r9, [rbx + 0x40]
add dword [rsi + 0x100], 1
call qword [sym.imp.KERNEL32.DLL_PostQueuedCompletionStatus]
test eax, eax
jne 0x6ccce0
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [0x00af2f2d]
mov ecx, eax
call fcn.006bf130
nop
mov r8d, 0x527
lea rdx, str.src_win_pipe.c
lea rcx, str.handle__handle___INVALID_HANDLE_VALUE
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6ccb72
mov rcx, rsi
call fcn.006ccad0
jmp 0x6ccc9a
mov qword [rbx + 0x68], rbx
mov qword [rsi + 0x208], rbx
jmp 0x6ccc8c
test edx, edx
jg 0x6cd011
mov r8d, 0x551
lea rdx, str.src_win_pipe.c
lea rcx, [0x00af3071]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6cd011
mov r12, qword [sym.imp.KERNEL32.DLL_GetLastError]
call r12
cmp eax, 0x3e5
jne 0x6cd150
mov qword [rbx + 0x60], rdi
add qword [rsi + 0x60], rdi
jmp 0x6ccdef
mov r12, qword [sym.imp.KERNEL32.DLL_GetLastError]
call r12
cmp eax, 0x3e5
jne 0x6cd110
mov qword [rbx + 0x60], rdi
mov rcx, qword [rbx + 0x58]
mov edx, 0xffffffff
add qword [rsi + 0x60], rdi
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
je 0x6ccd4f
call r12
mov rcx, qword [rbx + 0x58]
mov esi, eax
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x6ccce2
mov esi, 0x2747
jmp 0x6ccce2
mov r8d, 0x513
lea rdx, str.src_win_pipe.c
lea rcx, str.heap_buffer_offset__heap_buffer_length
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6ccf8d
call r12
mov esi, eax
jmp 0x6ccce2
mov esi, 8
jmp 0x6ccce2
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [0x00af2fc7]
mov ecx, eax
call fcn.006bf130
nop
nop