Function at 0x140057180
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc8
mov r12, rdx
mov qword [rsp + 0x40], rcx
cmp rdx, 0x15
jae 0x1400571d1
cmp r12, 1
jbe 0x14005784d
mov r8d, 1
mov rcx, qword [rsp + 0x40]
mov rdx, r12
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp 0x140057e50
movabs rax, 0x7ffffffffffffff8
lea rdx, [r12*4]
and rdx, rax
movzx eax, byte [0x1402f31d1]
xor ecx, ecx
call fcn.14018e330
test rax, rax
je 0x14005795c
mov rdi, rax
movzx eax, byte [0x1402f31d1]
mov edx, 0x100
xor ecx, ecx
call fcn.14018e330
test rax, rax
mov qword [rsp + 0x38], rdi
je 0x140057968
mov r14, rax
mov rax, qword [rsp + 0x40]
lea rcx, [rax + 0xc]
mov qword [rsp + 0x70], rcx
add rax, 0xfffffffffffffff8
mov qword [rsp + 0x68], rax
mov eax, 0x10
mov qword [rsp + 0x60], rax
xor r13d, r13d
lea rax, [0x14026f138]
mov qword [rsp + 0x58], rax
xor ebp, ebp
mov qword [rsp + 0x78], r12
jmp 0x140057273
mov ebp, 1
mov r13, qword [rsp + 0x28]
cmp r13, r12
jae 0x140057818
mov rax, r12
sub rax, r13
mov rcx, qword [rsp + 0x40]
lea rcx, [rcx + r13*8]
cmp rax, 2
mov qword [rsp + 0x30], r14
jae 0x140057350
mov r8, rax
lea rax, [r8 + r13]
mov r14, rax
sub r14, r13
jb 0x1400578e4
cmp rax, r12
ja 0x1400578e4
jae 0x1400573c0
cmp r8, 0xa
jae 0x1400573c0
lea r14, [r13 + 0xa]
cmp r14, r12
cmovae r14, r12
cmp r13, 0xfffffffffffffff5
ja 0x140057903
cmp r8, 1
adc r8, 0
mov qword [rsp + 0x28], r14
sub r14, r13
mov rdx, r14
call 0x140057e50
cmp rbp, qword [rsp + 0x60]
jne 0x1400573d0
mov rdx, rbp
shl rdx, 5
movzx eax, byte [0x1402f31d1]
xor ecx, ecx
call fcn.14018e330
test rax, rax
je 0x140057914
mov rbx, rax
lea rax, [rbp*2]
mov qword [rsp + 0x60], rax
mov r8, rbp
shl r8, 4
mov rcx, rbx
mov rsi, qword [rsp + 0x30]
mov rdx, rsi
call sub.msvcrt.dll_memcpy
mov rcx, qword [0x1402f3170]
xor edx, edx
mov r8, rsi
call fcn.1401d7c44
jmp 0x1400573d5
movzx edx, byte [rcx + 8]
cmp dl, byte [rcx]
jae 0x1400576e0
mov r8d, 2
cmp rax, 2
je 0x140057388
nop dword [rax + rax]
mov r9d, edx
movzx edx, byte [rcx + r8*8]
cmp dl, r9b
jae 0x140057388
inc r8
cmp rax, r8
jne 0x140057370
mov r8, rax
mov rax, r8
add rax, r13
jb 0x140057940
cmp rax, r12
ja 0x140057927
cmp r8, 2
jae 0x14005770e
mov r8d, 1
jmp 0x140057298
mov qword [rsp + 0x28], rax
cmp rbp, qword [rsp + 0x60]
je 0x1400572f5
mov rbx, qword [rsp + 0x30]
mov rax, rbp
shl rax, 4
mov qword [rbx + rax], r14
mov qword [rbx + rax + 8], r13
inc rbp
cmp rbp, 2
mov r14, rbx
jb 0x140057265
mov qword [rsp + 0x30], r14
jmp 0x140057475
mov r12, r14
mov rdi, qword [rsp + 0x38]
mov rdx, rdi
nop word [rax + rax]
mov r14, qword [rsp + 0x30]
add rbp, r14
add rsi, r14
sub r8, rdx
mov rcx, r12
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x80]
add rax, rbx
mov qword [rsi], rax
mov rax, qword [rsp + 0x88]
mov qword [rsi + 8], rax
lea rdx, [rbp + 0x10]
mov rax, qword [rsp + 0x90]
not rax
add r13, rax
shl r13, 4
mov rcx, rbp
mov r8, r13
call sub.msvcrt.dll_memmove
mov rbp, qword [rsp + 0x50]
cmp rbp, 1
mov r12, qword [rsp + 0x78]
jbe 0x140057260
mov r13, rbp
lea r10, [rbp - 1]
mov rcx, r10
shl rcx, 4
mov rax, qword [r14 + rcx]
mov rcx, qword [r14 + rcx + 8]
add rcx, rax
cmp rcx, r12
je 0x1400574e0
mov rdx, r13
shl rdx, 4
mov r8, qword [rdx + r14 - 0x20]
cmp r8, rax
jbe 0x1400574e0
cmp r13, 2
je 0x14005773b
lea r11, [r13 - 3]
mov rcx, r11
shl rcx, 4
mov rcx, qword [r14 + rcx]
lea r9, [r8 + rax]
cmp rcx, r9
jbe 0x1400574f5
cmp r13, 3
jbe 0x140057806
add r8, rcx
cmp qword [rdx + r14 - 0x40], r8
jbe 0x1400574f5
jmp 0x140057810
cmp r13, 2
je 0x1400574fa
lea r11, [r13 - 3]
mov rcx, r11
shl rcx, 4
mov rcx, qword [r14 + rcx]
cmp rcx, rax
jb 0x1400574fe
lea r11, [r13 - 2]
cmp r13, r11
jbe 0x14005787a
lea rsi, [r11 + 1]
cmp r13, rsi
jbe 0x140057862
mov qword [rsp + 0x50], r10
mov rbp, r11
shl rbp, 4
mov rcx, qword [r14 + rbp + 8]
shl rsi, 4
mov rax, qword [r14 + rsi]
mov r15, qword [r14 + rsi + 8]
add r15, rax
mov rbx, r15
sub rbx, rcx
jb 0x1400578b9
cmp r15, r12
ja 0x1400578cd
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x90], r11
mov r13, qword [r14 + rbp]
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x88], rcx
lea r12, [rax + rcx*8]
lea r14, [r12 + r13*8]
mov rdi, rbx
sub rdi, r13
cmp rdi, r13
jae 0x140057630
lea r8, [rdi*8]
mov rbx, qword [rsp + 0x38]
mov rcx, rbx
mov rdx, r14
call sub.msvcrt.dll_memcpy
lea r8, [rbx + rdi*8]
test r13, r13
mov rbx, r13
jle 0x1400576b4
test rdi, rdi
mov r13, qword [rsp + 0x48]
jle 0x1400573fc
mov rax, qword [rsp + 0x68]
lea rax, [rax + r15*8]
mov rdi, qword [rsp + 0x38]
nop dword [rax + rax]
movzx ecx, byte [r8 - 8]
movzx edx, byte [r14 - 8]
cmp cl, dl
mov r9d, 0
sbb r9, r9
cmp cl, dl
mov r10d, 0
adc r10, 0xffffffffffffffff
cmp cl, dl
lea r14, [r14 + r9*8]
lea r8, [r8 + r10*8]
mov rcx, r8
cmovb rcx, r14
mov rcx, qword [rcx]
mov qword [rax], rcx
cmp r14, r12
jbe 0x140057616
add rax, 0xfffffffffffffff8
cmp r8, rdi
ja 0x1400575d0
mov r12, r14
mov rdx, rdi
jmp 0x140057410
lea r8, [r13*8]
mov rdi, qword [rsp + 0x38]
mov rcx, rdi
mov rdx, r12
call sub.msvcrt.dll_memcpy
lea r8, [rdi + r13*8]
test r13, r13
jle 0x1400576c1
cmp rbx, r13
mov rbx, r13
jle 0x1400576bc
mov rax, qword [rsp + 0x40]
lea rax, [rax + r15*8]
mov rdx, rdi
mov r13, qword [rsp + 0x48]
nop word [rax + rax]
movzx r9d, byte [r14]
xor r10d, r10d
xor ecx, ecx
cmp r9b, byte [rdx]
setae r10b
setb r9b
mov r11, rdx
cmovb r11, r14
mov r11, qword [r11]
mov qword [r12], r11
add r12, 8
lea rdx, [rdx + r10*8]
cmp rdx, r8
jae 0x140057410
mov cl, r9b
lea r14, [r14 + rcx*8]
cmp r14, rax
jb 0x140057670
jmp 0x140057410
mov r12, r14
mov rdi, qword [rsp + 0x38]
mov rdx, rdi
jmp 0x1400576c7
mov rdx, rdi
mov rbx, r13
mov r13, qword [rsp + 0x48]
jmp 0x140057410
mov r8d, 2
cmp rax, 2
je 0x140057294
mov r9d, edx
movzx edx, byte [rcx + r8*8]
cmp dl, r9b
jb 0x140057294
inc r8
cmp rax, r8
jne 0x1400576f0
jmp 0x140057291
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x50], rbp
mov rax, r8
shr rax, 1
lea rdx, [rcx + r8*8]
lea r9, [rax*8]
sub rdx, r9
cmp rax, 1
jne 0x140057745
xor r9d, r9d
jmp 0x1400577c8
mov ebp, 2
jmp 0x140057265
movabs r9, 0x7ffffffffffffff8
lea r10, [r9 + 6]
and r10, rax
mov r9, qword [rsp + 0x70]
lea r11, [r9 + r13*8]
mov r9, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x28]
lea rsi, [r9 + rsi*8]
xor r9d, r9d
movabs r15, 0x1ffffffffffffffe
nop word [rax + rax]
movzx ebx, byte [r11 + r9*8 - 0xc]
mov edi, dword [r11 + r9*8 - 8]
mov r14, qword [rsi]
mov qword [r11 + r9*8 - 0xc], r14
mov byte [rsi], bl
mov dword [rsi + 4], edi
mov rdi, r9
xor rdi, r15
add rdi, rax
movzx ebx, byte [r11 + r9*8 - 4]
mov ebp, dword [r11 + r9*8]
mov r14, qword [rdx + rdi*8]
mov qword [r11 + r9*8 - 4], r14
mov byte [rdx + rdi*8], bl
mov dword [rdx + rdi*8 + 4], ebp
add r9, 2
add rsi, 0xfffffffffffffff0
cmp r10, r9
jne 0x140057780
test r8b, 2
je 0x1400577f2
mov r10, r9
not r10
add rax, r10
movzx r10d, byte [rcx + r9*8]
mov r11d, dword [rcx + r9*8 + 4]
mov rsi, qword [rdx + rax*8]
mov qword [rcx + r9*8], rsi
mov byte [rdx + rax*8], r10b
mov dword [rdx + rax*8 + 4], r11d
mov rdi, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x50]
mov rax, qword [rsp + 0x28]
jmp 0x140057298
mov ebp, 3
jmp 0x140057265
mov rbp, r13
jmp 0x140057265
mov rcx, qword [0x1402f3170]
xor edx, edx
mov r8, r14
call fcn.1401d7c44
mov rcx, qword [0x1402f3170]
xor edx, edx
mov r8, rdi
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.1401d7c44
nop
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rax, str.Index_out_of_bounds
mov qword [rsp + 0x98], rax
lea rdx, [0x14026f168]
jmp 0x140057890
lea rax, str.Index_out_of_bounds
mov qword [rsp + 0x98], rax
lea rdx, [0x14026f150]
lea rcx, [rsp + 0x98]
mov qword [rcx + 8], 1
mov qword [rcx + 0x10], 8
xorps xmm0, xmm0
movups xmmword [rcx + 0x18], xmm0
call fcn.14002d580
jmp 0x140057974
lea r8, [0x14026f180]
mov rdx, r15
call fcn.1400324f0
jmp 0x140057974
lea r8, [0x14026f180]
mov rcx, r15
mov rdx, r12
call fcn.14002df50
jmp 0x140057974
lea rcx, str.assertion_failed:_end___start__end___len
lea r8, [0x14026f210]
mov edx, 0x2c
mov r14, qword [rsp + 0x30]
call fcn.14002e2c0
jmp 0x140057974
mov rdx, r14
lea rax, [0x14026f228]
mov qword [rsp + 0x58], rax
jmp 0x140057943
lea rcx, [0x14026f1c8]
mov r14, qword [rsp + 0x30]
call fcn.1400347a0
jmp 0x140057974
lea r8, [0x14026f138]
mov rcx, rax
mov rdx, r12
mov r14, qword [rsp + 0x30]
call fcn.14002df50
jmp 0x140057974
mov rdx, rax
mov rcx, r13
mov r8, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x38]
mov r14, qword [rsp + 0x30]
call fcn.1400324f0
jmp 0x140057974
lea rcx, [0x14026f198]
call fcn.1400347a0
lea rcx, [0x14026f1b0]
call fcn.1400347a0
ud2
push rsi
push rdi
push rbx
sub rsp, 0x20
lea rax, [r8 - 1]
cmp rax, rdx
jae 0x140057ee3
cmp r8, rdx
jae 0x140057edb
lea rax, [rcx - 0x10]
lea r9, [rcx + r8*8]
add r9, 0xfffffffffffffff8
jmp 0x140057e90
mov rsi, rcx
shl r11, 0x20
or r11, r10
mov qword [rsi], r11
inc r8
add r9, 8
cmp r8, rdx
je 0x140057edb
movzx r10d, byte [rcx + r8*8]
cmp r10b, byte [rcx + r8*8 - 8]
jae 0x140057e84
lea rsi, [rax + r8*8]
add rsi, 8
mov r11d, dword [rcx + r8*8 + 4]
mov rdi, qword [rsi]
mov qword [rcx + r8*8], rdi
cmp r8, 1
je 0x140057e7a
mov edi, 1
mov rsi, r9
nop
cmp r10b, byte [rsi - 8]
jae 0x140057e7a
mov rbx, qword [rsi - 8]
mov qword [rsi], rbx
add rsi, 0xfffffffffffffff8
inc rdi
cmp r8, rdi
jne 0x140057ec0
jmp 0x140057e77
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
lea rcx, str.assertion_failed:_offset___0__offset___len
lea r8, [0x14026f270]
mov edx, 0x2e
call fcn.14002e2c0
int3