Function at 0x1400125d0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x14003d2e0]
xor rax, rsp
mov qword [rbp - 8], rax
movsxd rsi, edx
mov rbx, rcx
mov rdx, rsi
mov r12d, r9d
lea rcx, [0x14003e150]
and edx, 0x3f
shl rdx, 6
mov rax, rsi
sar rax, 6
mov r13, r8
add r12, r8
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rbp - 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetConsoleCP]
xor ecx, ecx
mov dword [rbp - 0x24], eax
mov dword [rbx], ecx
mov rdi, r13
mov r15d, eax
xor eax, eax
mov qword [rbx + 4], rax
cmp r13, r12
jae 0x14001280b
lea r14, [r13 + 1]
mov r8b, byte [rdi]
lea r9, [0x14003e150]
mov word [rbp - 0x30], cx
mov rax, rsi
sar rax, 6
mov rcx, rsi
and ecx, 0x3f
mov byte [rbp - 0x2c], r8b
shl rcx, 6
mov rdx, qword [r9 + rax*8]
test byte [rdx + rcx + 0x3d], 4
je 0x1400126ae
mov al, byte [rdx + rcx + 0x3e]
mov rcx, rsi
mov byte [rbp - 0x18], al
lea rdx, [rbp - 0x18]
and ecx, 0x3f
mov byte [rbp - 0x17], r8b
mov rax, rsi
shl rcx, 6
sar rax, 6
mov r8d, 2
mov rax, qword [r9 + rax*8]
and byte [rax + rcx + 0x3d], 0xfb
jmp 0x1400126f1
call fcn.14001ccf4
movzx ecx, byte [rdi]
xor edx, edx
cmp word [rax + rcx*2], dx
jge 0x1400126e8
cmp r14, r12
jae 0x1400127ca
lea r8d, [rdx + 2]
mov rdx, rdi
lea rcx, [rbp - 0x30]
call fcn.140018ecc
cmp eax, 0xffffffff
je 0x14001280b
inc rdi
inc r14
jmp 0x140012703
mov r8d, 1
mov rdx, rdi
lea rcx, [rbp - 0x30]
call fcn.140018ecc
cmp eax, 0xffffffff
je 0x14001280b
xor eax, eax
lea r8, [rbp - 0x30]
mov qword [rsp + 0x38], rax
mov r9d, 1
mov qword [rsp + 0x30], rax
xor edx, edx
lea rax, [rbp - 0x10]
mov dword [rsp + 0x28], 5
mov ecx, r15d
mov qword [rsp + 0x20], rax
inc rdi
inc r14
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r15d, eax
xor eax, eax
test r15d, r15d
je 0x14001280b
mov rcx, qword [rbp - 0x20]
lea r9, [rbp - 0x28]
mov r8d, r15d
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor ecx, ecx
test eax, eax
je 0x140012803
mov eax, dword [rbx + 8]
sub eax, r13d
add eax, edi
mov dword [rbx + 4], eax
cmp dword [rbp - 0x28], r15d
jb 0x14001280b
cmp byte [rbp - 0x2c], 0xa
jne 0x1400127bc
lea eax, [rcx + 0xd]
mov qword [rsp + 0x20], rcx
lea r8d, [rcx + 1]
mov word [rbp - 0x2c], ax
mov rcx, qword [rbp - 0x20]
lea r9, [rbp - 0x28]
lea rdx, [rbp - 0x2c]
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor ecx, ecx
test eax, eax
je 0x140012803
cmp dword [rbp - 0x28], 1
jb 0x14001280b
inc dword [rbx + 8]
inc dword [rbx + 4]
cmp rdi, r12
jae 0x14001280b
mov r15d, dword [rbp - 0x24]
jmp 0x14001264f
mov al, byte [rdi]
lea r9, [0x14003e150]
mov r8, rsi
and esi, 0x3f
sar r8, 6
mov edx, esi
shl rdx, 6
shl rsi, 6
mov rcx, qword [r9 + r8*8]
mov byte [rdx + rcx + 0x3e], al
mov rax, qword [r9 + r8*8]
mov cl, byte [rdx + rax + 0x3d]
or cl, 4
mov byte [rax + rsi + 0x3d], cl
inc dword [rbx + 4]
jmp 0x14001280b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx], eax
mov rax, rbx
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140017f30
mov rbx, qword [rsp + 0xb0]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret