Function at 0x140002444
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rsi, rcx
call fcn.1400025a8
mov r12d, 1
mov ecx, r12d
call fcn.140012890
mov r8d, dword [rsi + 0xc]
xor r15d, r15d
mov rbx, qword [rsi + 0x18]
test eax, eax
jne 0x140020782
add r8d, r8d
lea r9, [rsp + 0x78]
mov rdx, rbx
mov ecx, r12d
call fcn.140012a2c
test eax, eax
je 0x1400208bf
mov ecx, dword [rsi + 0xc]
mov eax, dword [rsp + 0x78]
add rcx, rcx
cmp rax, rcx
jne 0x1400208bf
mov ecx, r12d
call fcn.140012890
mov ecx, r12d
test eax, eax
jne 0x14002086d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
cmp byte [0x140056aa4], r15b
mov rbx, rax
jne 0x140020899
mov ecx, dword [0x14003f8a8]
lea rbp, [0x140047ba0]
mov qword [rsp + 0x38], r15
lea r8, [0x1400328e8]
mov qword [rsp + 0x30], r15
or r9d, 0xffffffff
mov dword [rsp + 0x28], 0x2000
xor edx, edx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], r15
mov edi, eax
mov rdx, rbp
sub edi, r12d
mov rcx, rbx
mov r8d, edi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x14000254b
mov ecx, dword [rsp + 0x78]
mov edx, 4
cmp ecx, edi
cmove ecx, edx
mov dword [rsp + 0x78], ecx
mov rdx, qword [rsi + 0x18]
mov rcx, rsi
call fcn.1400025c8
add eax, r12d
mov rcx, rsi
add dword [rsi + 8], eax
call fcn.1400025a8
mov eax, dword [rsi + 0x28]
cmp dword [rsi + 8], eax
ja 0x140002599
mov rax, qword [rsi + 0x18]
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov word [rax], r15w
xor eax, eax
mov dword [rsi + 0xc], r15d
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov dword [rsi + 8], r15d
jmp 0x14000256d
lea rbp, [rbx + r8*2]
cmp rbx, rbp
jae 0x1400024b7
mov r13d, 0x2022
mov rdi, rbx
cmp rbx, rbp
jae 0x1400024b7
cmp word [rdi], r13w
je 0x1400207b0
add rdi, 2
cmp rdi, rbp
jb 0x1400207a1
cmp rdi, rbx
je 0x140020802
mov r14, rdi
mov ecx, r12d
sub r14, rbx
sar r14, 1
call qword [sym.imp.msvcrt.dll__get_osfhandle]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], r15
mov rcx, rax
mov r8d, r14d
mov rdx, rbx
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_WriteConsoleW]
test eax, eax
je 0x1400208bf
cmp dword [rsp + 0x78], r14d
jne 0x1400208bf
mov rbx, rdi
jmp 0x140020802
cmp word [rdi], r13w
jne 0x140020807
add rdi, 2
cmp rdi, rbp
jb 0x1400207f8
cmp rdi, rbx
je 0x14002085f
mov rcx, qword [rsi]
test rcx, rcx
je 0x14002081f
mov edx, 2
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_SetConsoleMode]
mov r14, rdi
mov ecx, r12d
sub r14, rbx
sar r14, 1
call qword [sym.imp.msvcrt.dll__get_osfhandle]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], r15
mov rcx, rax
mov r8d, r14d
mov rdx, rbx
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_WriteConsoleW]
mov ebx, eax
call fcn.14000f980
test ebx, ebx
je 0x1400208bf
cmp dword [rsp + 0x78], r14d
jne 0x1400208bf
mov rbx, rdi
cmp rbx, rbp
jb 0x140020795
jmp 0x1400024b7
call qword [sym.imp.msvcrt.dll__get_osfhandle]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], r15
mov rcx, rax
lea rdx, [0x1400328e8]
mov r8d, 2
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_WriteConsoleW]
nop
jmp 0x14000254b
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], r15
mov r8d, 4
lea rdx, [0x1400328e8]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
nop
jmp 0x14000254b
mov ecx, r12d
call fcn.14000f7c8
test eax, eax
je 0x1400208d2
mov ecx, 0x1d
jmp 0x1400208e1
mov ecx, r12d
call fcn.14002cdc8
test eax, eax
jne 0x1400208e8
lea ecx, [rax + 0x70]
xor edx, edx
call fcn.140015118
call fcn.14002c48c
int3