Function at 0x14001a320
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r13
push r15
sub rsp, 0x50
mov esi, r8d
mov r15, rdx
mov rbx, rcx
xor edi, edi
call fcn.140019a00
cmp byte [r15], dil
lea r13d, [rdi + 1]
je 0x14001a373
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov r8d, r13d
mov edx, 0x40000000
mov rcx, r15
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
jmp 0x14001a381
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbp, rax
cmp rbp, 0xffffffffffffffff
je 0x14001a5db
mov edx, 0x7f02
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadCursorA]
mov rcx, rax
call qword [sym.imp.USER32.dll_SetCursor]
cmp esi, 4
mov qword [0x14002f270], rax
je 0x14001a3b2
cmp esi, 5
jne 0x14001a3c4
mov rax, qword [rbx]
mov r8d, esi
mov rdx, rbp
mov rcx, rbx
call qword [rax + 0xa0]
cmp esi, 6
mov qword [rsp + 0x80], r12
jne 0x14001a3e2
mov rax, qword [rbx]
mov rdx, rbp
mov rcx, rbx
call qword [rax + 0x48]
jmp 0x14001a4f1
cmp esi, 8
jne 0x14001a413
lea r9, [rsp + 0x88]
lea r8d, [rsi - 5]
lea rdx, [0x1400280ac]
mov rcx, rbp
mov dword [rbx + 0x1f0], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x14001a4f1
cmp esi, 2
jne 0x14001a4d6
cmp dword [rbx + 0x24c], edi
je 0x14001a4f1
cmp dword [rbx + 0x40], edi
mov r12d, edi
jle 0x14001a4b4
mov qword [rsp + 0x90], r14
mov r14, rdi
nop
mov rax, qword [rbx + 0x48]
lea r9, [rsp + 0x88]
movsxd rcx, dword [rax + r14]
mov rax, qword [rbx + 0x240]
lea rdx, [rcx + rcx*2]
or rcx, 0xffffffffffffffff
mov rdx, qword [rax + rdx*8 + 0x10]
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
xor edi, edi
not rcx
mov qword [rsp + 0x20], rdi
lea r8, [rcx - 1]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r9, [rsp + 0x40]
lea rdx, reloc.WS2_32.dll_htons
mov r8d, r13d
mov rcx, rbp
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
add r12d, r13d
add r14, 4
cmp r12d, dword [rbx + 0x40]
jl 0x14001a440
mov r14, qword [rsp + 0x90]
lea r9, [rsp + 0x40]
lea rdx, [0x1400280d4]
mov r8d, 2
mov rcx, rbp
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x14001a4f1
cmp esi, 7
jne 0x14001a4f1
cmp dword [rbx + 0x24c], edi
je 0x14001a4f1
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call fcn.1400168e0
cmp dword [rbx + 0x50], 0
jle 0x14001a55c
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov rcx, qword [rax]
mov eax, dword [rbx + 8]
imul eax, edi
movsxd r12, eax
mov rax, qword [rbx]
add r12, rcx
mov rcx, rbx
mov rdx, r12
call qword [rax + 0x58]
test eax, eax
je 0x14001a537
mov rax, qword [rbx]
mov r9d, esi
mov r8, r12
mov rdx, rbp
mov rcx, rbx
call qword [rax + 0xf0]
test eax, eax
je 0x14001a541
add edi, r13d
cmp edi, dword [rbx + 0x50]
jl 0x14001a4f7
jmp 0x14001a55c
mov rax, qword [rbx]
mov rcx, rbx
xor r13d, r13d
call qword [rax + 0xe0]
xor edx, edx
xor ecx, ecx
mov r8d, eax
call fcn.140020350
cmp esi, 4
mov r12, qword [rsp + 0x80]
je 0x14001a56e
cmp esi, 5
jne 0x14001a580
mov rax, qword [rbx]
mov r8d, esi
mov rdx, rbp
mov rcx, rbx
call qword [rax + 0x98]
cmp esi, 6
jne 0x14001a593
mov rax, qword [rbx]
mov rdx, rbp
mov rcx, rbx
call qword [rax + 0x50]
jmp 0x14001a5ba
cmp esi, 8
jne 0x14001a5ba
lea r9, [rsp + 0x44]
lea r8d, [rsi - 3]
lea rdx, str._r_n__r_n
mov rcx, rbp
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp byte [r15], 0
je 0x14001a5c9
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14002f270]
call qword [sym.imp.USER32.dll_SetCursor]
mov eax, r13d
jmp 0x14001a5f5
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + 0xe0]
xor edx, edx
xor ecx, ecx
mov r8d, eax
call fcn.140020350
mov eax, edi
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r13
pop rdi
pop rsi
pop rbp
ret