Function at 0x1400be8a0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov r15d, r8d
mov rdi, rcx
mov ebp, edx
mov r12, r9
and r15d, 0x40
test edx, edx
jle 0x1400bea98
movsxd rdx, edx
movzx eax, byte [rcx + rdx - 1]
mov ecx, r8d
and ecx, 0x200
cmp al, 0xa
je 0x1400bea28
test ecx, ecx
je 0x1400bea70
cmp al, 0xd
jne 0x1400bea70
mov dword [rsp + 0x3c], 0
mov dword [rsp + 0x38], 1
lea r13d, [rbp - 1]
test r15d, r15d
jne 0x1400becc8
mov ebp, r13d
test r13d, r13d
je 0x1400bee92
nop dword [rax]
mov eax, r8d
mov r14d, r8d
xor r9d, r9d
mov dword [rsp + 0x34], r13d
shr al, 7
and r14d, 0x800
mov r13d, ebp
xor ebx, ebx
mov byte [rsp + 0x30], al
mov ebp, r9d
mov esi, r14d
mov dword [rsp + 0xa0], r8d
jmp 0x1400be9cd
test r12, r12
je 0x1400be9b3
sub edx, ebp
movsxd rcx, ebp
mov r9, r12
mov r8d, 1
movsxd rdx, edx
add rcx, rdi
mov qword [rsp + 0x28], r10
call sub.msvcrt.dll_fwrite
mov rcx, qword [rsp + 0xc0]
mov rdx, r12
call fcn.1401deb18
mov rcx, qword [rsp + 0x28]
mov edx, 1
mov r9, r12
mov r8d, 1
call sub.msvcrt.dll_fwrite
mov rcx, qword [rsp + 0xb8]
mov rdx, r12
call fcn.1401deb18
or r15d, 0x800
lea ebp, [r14 + 1]
mov edx, ebp
add rbx, 1
cmp edx, r13d
jge 0x1400beae8
movzx eax, byte [rdi + rbx]
mov r14d, ebx
mov edx, ebx
lea r10, [rdi + rbx]
cmp al, 0x20
je 0x1400bed10
cmp al, 9
jne 0x1400beae8
cmp ebp, ebx
jge 0x1400be9f9
cmp byte [rsp + 0x30], 0
jne 0x1400bed20
test esi, esi
jne 0x1400be958
test r12, r12
je 0x1400be9ba
sub edx, ebp
movsxd rcx, ebp
mov r9, r12
mov r8d, 1
add edx, 1
add rcx, rdi
movsxd rdx, edx
call sub.msvcrt.dll_fwrite
jmp 0x1400be9ba
lea r13d, [rbp - 1]
test ecx, ecx
je 0x1400becaf
test r13d, r13d
je 0x1400bee59
cmp byte [rdi + rdx - 2], 0xd
je 0x1400bee14
test r15d, r15d
je 0x1400bedfc
mov dword [rsp + 0x3c], 1
lea eax, [rbp - 2]
mov dword [rsp + 0x38], 0
jmp 0x1400bec4e
test r15d, r15d
jne 0x1400bec38
mov dword [rsp + 0x3c], 0
mov r13d, ebp
mov dword [rsp + 0x38], 0
jmp 0x1400be920
test r15d, r15d
je 0x1400bedc8
mov r15d, r8d
and r15d, 0x100
je 0x1400bec21
mov r15d, r8d
and r15d, 0x3f
je 0x1400bee24
test r9, r9
je 0x1400bee43
mov dword [rsp + 0x3c], 0
mov r13d, edx
xor r15d, r15d
mov dword [rsp + 0x38], 0
jmp 0x1400bebb6
mov r8d, dword [rsp + 0xa0]
mov r9d, ebp
mov esi, edx
mov ebp, r13d
mov r13d, dword [rsp + 0x34]
test r8d, 0x100
je 0x1400bed90
mov ebx, edx
sub ebx, r9d
mov eax, ebx
and r8d, 0x3f
cmp eax, r8d
jb 0x1400bed90
mov dword [rsp + 0x30], r9d
or r15d, 0x100
test r12, r12
je 0x1400bec21
mov rcx, qword [rsp + 0xc0]
mov rdx, r12
call fcn.1401deb18
movsxd rcx, dword [rsp + 0x30]
mov r9, r12
movsxd rdx, ebx
mov r8d, 1
add rcx, rdi
call sub.msvcrt.dll_fwrite
mov rcx, qword [rsp + 0xb8]
mov rdx, r12
call fcn.1401deb18
mov r9d, esi
mov ebx, ebp
sub ebx, r9d
test ebx, ebx
jle 0x1400bebb6
mov rcx, qword [rsp + 0xb0]
mov rdx, r12
mov dword [rsp + 0x30], r9d
call fcn.1401deb18
movsxd rcx, dword [rsp + 0x30]
movsxd rdx, ebx
mov r9, r12
mov r8d, 1
add rcx, rdi
call sub.msvcrt.dll_fwrite
mov rcx, qword [rsp + 0xb8]
mov rdx, r12
call fcn.1401deb18
cmp r13d, ebp
je 0x1400bebf7
mov rcx, qword [rsp + 0xc0]
mov rdx, r12
call fcn.1401deb18
mov edx, r13d
movsxd rcx, ebp
mov r9, r12
sub edx, ebp
add rcx, rdi
mov r8d, 1
movsxd rdx, edx
call sub.msvcrt.dll_fwrite
mov rcx, qword [rsp + 0xb8]
mov rdx, r12
call fcn.1401deb18
mov edx, dword [rsp + 0x38]
test edx, edx
je 0x1400bec0c
mov rdx, r12
mov ecx, 0xd
call sub.msvcrt.dll_fputc
mov eax, dword [rsp + 0x3c]
test eax, eax
je 0x1400bec21
mov rdx, r12
mov ecx, 0xa
call sub.msvcrt.dll_fputc
mov eax, r15d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x3c], 0
lea eax, [rbp - 1]
mov r13d, ebp
mov dword [rsp + 0x38], 0
mov r9, qword [str._________AA__A__________________]
cdqe
mov ebp, 0xffffffff
xor r15d, r15d
jmp 0x1400bec92
sub rax, 1
mov r15d, 0x40
test eax, eax
js 0x1400beda0
movzx edx, byte [rdi + rax]
mov ecx, ebp
mov ebp, eax
test byte [r9 + rdx], 1
jne 0x1400bec80
cmp ecx, 0xffffffff
cmove ecx, r13d
mov ebp, ecx
jmp 0x1400be920
mov dword [rsp + 0x3c], 1
mov dword [rsp + 0x38], 0
test r15d, r15d
je 0x1400be90d
lea eax, [r13 - 1]
test r13d, r13d
jne 0x1400bec4e
mov r15d, r8d
and r15d, 0x100
je 0x1400bef13
mov r15d, r8d
and r15d, 0x3f
je 0x1400bef02
test r12, r12
je 0x1400bee43
xor ebp, ebp
xor r13d, r13d
xor r15d, r15d
jmp 0x1400bebb6
lea edx, [rbx + 1]
jmp 0x1400be9c0
test r12, r12
je 0x1400bed7d
mov rcx, qword [rsp + 0xc0]
mov rdx, r12
mov qword [rsp + 0x28], r10
call fcn.1401deb18
mov edx, ebx
movsxd rcx, ebp
mov r9, r12
sub edx, ebp
mov r8d, 1
add rcx, rdi
movsxd rdx, edx
call sub.msvcrt.dll_fwrite
mov rcx, qword [rsp + 0xb8]
mov rdx, r12
call fcn.1401deb18
mov rcx, qword [rsp + 0x28]
mov r9, r12
mov r8d, 1
mov edx, 1
call sub.msvcrt.dll_fwrite
or r15b, 0x80
jmp 0x1400be9ba
test r12, r12
jne 0x1400beb6f
jmp 0x1400bec21
test ebp, ebp
jne 0x1400be920
test r8d, 0x100
jne 0x1400bee4b
test r12, r12
jne 0x1400bebbb
jmp 0x1400bec21
test r8d, 0x100
je 0x1400bec21
and r8d, 0x3f
je 0x1400bee24
test r9, r9
je 0x1400bec21
mov dword [rsp + 0x3c], 0
mov r13d, edx
mov dword [rsp + 0x38], 0
jmp 0x1400bebb6
mov dword [rsp + 0x3c], 1
mov ebp, r13d
mov dword [rsp + 0x38], 0
jmp 0x1400be920
mov dword [rsp + 0x3c], 1
mov ebp, r13d
jmp 0x1400be8f8
mov dword [rsp + 0x3c], 0
mov r13d, ebp
xor esi, esi
xor r9d, r9d
mov dword [rsp + 0x38], 0
xor ebx, ebx
jmp 0x1400beb1e
xor r15d, r15d
jmp 0x1400bec21
xor ebx, ebx
xor esi, esi
xor r9d, r9d
xor eax, eax
jmp 0x1400beb11
test r15d, r15d
je 0x1400beed5
mov r15d, r8d
and r15d, 0x100
je 0x1400beec7
mov r15d, r8d
and r15d, 0x3f
je 0x1400beea9
test r9, r9
je 0x1400bee43
xor r8d, r8d
mov dword [rsp + 0x3c], 1
xor ebp, ebp
xor r15d, r15d
mov dword [rsp + 0x38], r8d
jmp 0x1400bebb6
test r8d, 0x100
je 0x1400bef13
xor eax, eax
xor ebx, ebx
xor esi, esi
xor r9d, r9d
jmp 0x1400beb11
xor r10d, r10d
mov dword [rsp + 0x3c], 1
xor esi, esi
xor r9d, r9d
mov dword [rsp + 0x38], r10d
xor ebp, ebp
xor ebx, ebx
jmp 0x1400beb1e
test r12, r12
jne 0x1400bec14
jmp 0x1400bec21
test r8d, 0x100
je 0x1400beec7
and r8b, 0x3f
je 0x1400beea9
test r9, r9
je 0x1400bec21
xor ecx, ecx
mov dword [rsp + 0x3c], 1
xor ebp, ebp
mov dword [rsp + 0x38], ecx
jmp 0x1400bebb6
xor esi, esi
xor r9d, r9d
xor ebp, ebp
xor r13d, r13d
xor ebx, ebx
jmp 0x1400beb1e
test r12, r12
jne 0x1400bebf7
jmp 0x1400bec21