Function at 0x140013110
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
pushf
jmp 0x14001311c
pushf
or r10, r10
popf
popf
push r13
push r14
push r15
lea rbp, [rax - 0x57]
add rsp, 0xffffffffffffff30
mov qword [rbp - 9], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rax, qword [0x1400392a8]
xor rax, rsp
pushf
mov rcx, rcx
popf
mov qword [rbp + 0x17], rax
pushf
shr r8, 0
popf
mov rsi, r8
mov qword [rbp - 0x41], r8
movsxd r14, edx
mov rbx, rcx
pushf
xor rbx, 0
popf
mov rax, qword [rbp + 0x7f]
mov qword [rbp - 0x59], rax
mov rax, r14
mov r13, r14
sar r13, 6
mov qword [rbp - 0x39], r13
lea rcx, [0x140000000]
pushf
rcl rax, 0
popf
and eax, 0x3f
lea r15, [rax + rax*8]
mov rax, qword [rcx + r13*8 + 0x3a820]
mov rax, qword [rax + r15*8 + 0x28]
mov qword [rbp - 0x19], rax
mov r12d, r9d
add r12, r8
mov qword [rbp - 0x61], r12
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [rbp - 0x49], eax
pushf
shl rdx, 0
popf
mov edi, 0
mov r10, qword [rbp - 0x59]
cmp byte [r10 + 0x28], dil
jne 0x1400131e7
mov rcx, r10
call fcn.140008d3f
mov r10, qword [rbp - 0x59]
mov rcx, qword [r10 + 0x18]
mov ecx, dword [rcx + 0xc]
mov dword [rbp - 0x45], ecx
mov eax, 0
mov qword [rbx], rax
mov dword [rbx + 8], eax
cmp qword [rbp - 0x41], r12
jae 0x1400136bf
mov r9, r14
pushf
shl rbp, 0
popf
sar r9, 6
pushf
shl r9, 0
popf
mov qword [rbp - 0x11], r9
mov edx, edi
pushf
and rax, rax
popf
mov al, byte [rsi]
mov byte [rbp - 0x71], al
pushf
shl r13, 0
popf
mov dword [rbp - 0x6d], edi
mov r12d, 1
lea r11, [0x140000000]
cmp ecx, 0xfde9
jne 0x14001343a
mov edx, edi
pushf
or r9, r9
popf
mov r14, rdi
lea rcx, [r15*8 + 0x3e]
pushf
or r11, r11
popf
add rcx, qword [r11 + r9*8 + 0x3a820]
cmp byte [rcx], dil
je 0x140013294
add edx, 1
add r14, 1
add rcx, 1
cmp r14, 5
pushf
shr r11, 0
popf
jl 0x140013276
test r14, r14
jle 0x1400133c7
mov rax, qword [r11 + r13*8 + 0x3a820]
movzx ecx, byte [rax + r15*8 + 0x3e]
movsx r12d, byte [rcx + r11 + 0x21bb0]
add r12d, 1
mov eax, r12d
sub eax, edx
mov dword [rbp - 0x51], eax
mov rdx, qword [rbp - 0x61]
sub rdx, rsi
movsxd r8, eax
cmp r8, rdx
jg 0x140013618
mov rcx, rdi
lea rdx, [r15*8 + 0x3e]
add rdx, qword [r11 + r9*8 + 0x3a820]
mov al, byte [rdx]
mov byte [rbp + rcx - 1], al
add rcx, 1
add rdx, 1
cmp rcx, r14
jl 0x1400132e6
test r8, r8
jle 0x140013318
lea rcx, [rbp - 1]
add rcx, r14
mov rdx, rsi
call fcn.1400024ab
mov r10, qword [rbp - 0x59]
lea r11, [0x140000000]
mov rdx, rdi
pushf
lea rsp, [rsp]
pushf
add r11, 0
popf
popf
mov rcx, qword [r11 + r13*8 + 0x3a820]
add rcx, rdx
pushf
shr r12, 0
popf
mov byte [rcx + r15*8 + 0x3e], dil
add rdx, 1
cmp rdx, r14
jl 0x14001332b
pushf
sar rcx, 0
pushf
and rdx, rdx
pushf
rcl rbp, 0
popf
popf
popf
mov qword [rbp - 0x31], rdi
lea rax, [rbp - 1]
mov qword [rbp - 0x29], rax
mov eax, edi
cmp r12d, 4
pushf
xor r10, 0
popf
sete al
add eax, 1
mov r12d, eax
mov r8d, eax
mov qword [rsp + 0x20], r10
lea r9, [rbp - 0x31]
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x6d]
call fcn.14001638b
pushf
or r14, r14
popf
cmp rax, 0xffffffffffffffff
je 0x1400136bf
mov eax, dword [rbp - 0x51]
sub eax, 1
movsxd rcx, eax
add rsi, rcx
jmp 0x1400134f0
movzx eax, byte [rsi]
movsx r13, byte [rax + r11 + 0x21bb0]
lea ecx, [r13 + 1]
mov r8, qword [rbp - 0x61]
sub r8, rsi
movsxd rax, ecx
cmp rax, r8
jg 0x14001364f
mov qword [rbp - 0x51], rdi
mov qword [rbp - 0x21], rsi
mov eax, edi
cmp ecx, 4
sete al
add eax, 1
pushf
add r8, 0
popf
mov r14d, eax
mov r8d, eax
mov qword [rsp + 0x20], r10
lea r9, [rbp - 0x51]
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x6d]
call fcn.14001638b
cmp rax, 0xffffffffffffffff
je 0x1400136bf
add rsi, r13
mov r12d, r14d
mov r13, qword [rbp - 0x39]
jmp 0x1400134f0
mov r8, qword [r11 + r13*8 + 0x3a820]
pushf
or r13, r13
pushf
dec rax
inc rax
popf
popf
mov cl, byte [r8 + r15*8 + 0x3d]
test cl, 4
je 0x14001348b
mov al, byte [r8 + r15*8 + 0x3e]
mov byte [rbp + 7], al
pushf
lea rsi, [rsi]
popf
mov al, byte [rsi]
mov byte [rbp + 8], al
and cl, 0xfb
mov byte [r8 + r15*8 + 0x3d], cl
mov r8d, 2
lea rdx, [rbp + 7]
pushf
push rcx
pop rcx
popf
jmp 0x1400134d4
movzx r9d, byte [rsi]
mov rax, qword [r10 + 0x18]
mov rcx, qword [rax]
cmp word [rcx + r9*2], di
jge 0x1400134ce
lea r14, [rsi + 1]
cmp r14, qword [rbp - 0x61]
jae 0x14001368a
mov r9, r10
mov r8d, 2
mov rdx, rsi
lea rcx, [rbp - 0x6d]
call fcn.14000dfcc
cmp eax, 0xffffffff
je 0x1400136bf
mov rsi, r14
jmp 0x1400134f0
mov r8, r12
mov rdx, rsi
mov r9, r10
lea rcx, [rbp - 0x6d]
call fcn.14000dfcc
cmp eax, 0xffffffff
pushf
or rax, rax
popf
je 0x1400136bf
add rsi, 1
pushf
lea r14, [r14]
popf
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 5
pushf
rcr rdi, 0
popf
lea rax, [rbp + 0xf]
mov qword [rsp + 0x20], rax
mov r9d, r12d
lea r8, [rbp - 0x6d]
mov edx, 0
mov ecx, dword [rbp - 0x49]
call fcn.140010d85
mov r14d, eax
test eax, eax
je 0x1400136bf
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x69]
mov r8d, eax
lea rdx, [rbp + 0xf]
mov r12, qword [rbp - 0x19]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400136b7
mov edx, esi
pushf
xor r8, 0
popf
sub edx, dword [rbp - 0x41]
pushf
rcr r12, 0
pushf
xor rbx, 0
popf
popf
add edx, dword [rbx + 8]
mov dword [rbx + 4], edx
pushf
add rbp, 0
popf
cmp dword [rbp - 0x69], r14d
jb 0x1400136bf
cmp byte [rbp - 0x71], 0xa
pushf
shl rsi, 0
popf
jne 0x1400135fe
mov eax, 0xd
mov word [rbp - 0x71], ax
mov qword [rsp + 0x20], rdi
pushf
nop
popf
lea r9, [rbp - 0x69]
lea r8d, [rax - 0xc]
lea rdx, [rbp - 0x71]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
pushf
or r11, r11
pushf
or r9, r9
popf
popf
je 0x1400136b7
cmp dword [rbp - 0x69], 1
jb 0x1400136bf
inc dword [rbx + 8]
inc dword [rbx + 4]
pushf
xor rdi, 0
popf
mov edx, dword [rbx + 4]
cmp rsi, qword [rbp - 0x61]
jae 0x1400136bf
mov r10, qword [rbp - 0x59]
mov r9, qword [rbp - 0x11]
mov ecx, dword [rbp - 0x45]
jmp 0x14001322a
test rdx, rdx
jle 0x14001364a
sub rsi, r14
mov rcx, qword [r11 + r13*8 + 0x3a820]
add rcx, r14
pushf
or r14, r14
popf
mov al, byte [rsi + r14]
mov byte [rcx + r15*8 + 0x3e], al
add edi, 1
add r14, 1
movsxd rax, edi
cmp rax, rdx
jl 0x140013620
add dword [rbx + 4], edx
jmp 0x1400136bf
test r8, r8
jle 0x140013684
mov rdx, rdi
mov r9, qword [rbp - 0x39]
mov rcx, qword [r11 + r9*8 + 0x3a820]
add rcx, rdx
mov al, byte [rdx + rsi]
mov byte [rcx + r15*8 + 0x3e], al
add edi, 1
add rdx, 1
pushf
and rbp, rbp
popf
movsxd rax, edi
cmp rax, r8
jl 0x14001365b
add dword [rbx + 4], r8d
jmp 0x1400136bf
mov byte [r8 + r15*8 + 0x3e], r9b
pushf
sar rsi, 0
popf
mov rax, qword [r11 + r13*8 + 0x3a820]
pushf
dec rdx
inc rdx
popf
or byte [rax + r15*8 + 0x3d], 4
lea eax, [rdx + 1]
mov dword [rbx + 4], eax
jmp 0x1400136bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx], eax
mov rax, rbx
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140001426
mov rbx, qword [rsp + 0x110]
sub rsp, 0xffffffffffffff30
pop r15
pop r14
pop r13
pop r12
pushf
nop
popf
pop rdi
pop rsi
pop rbp
ret