Function at 0x140178250
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov rsi, rcx
mov rax, qword [0x1402cf018]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rax, qword [rcx + 0x20]
cmp rax, 0x400
jb 0x1401782cd
add rax, 0xfffffffffffffc00
mov qword [rsi + 0x20], rax
mov rbx, qword [rsi + 8]
mov rbp, qword [rsi + 0x10]
mov r15, qword [rbx]
add rbx, 8
mov qword [rsi + 8], rbx
cmp rbp, qword [rsi + 0x18]
je 0x1401783ef
mov qword [rbp], r15
add qword [rsi + 0x10], 8
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140143020
nop
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsi + 0x10]
mov rbx, rax
sub rbx, qword [rsi + 8]
mov rdx, qword [rsi + 0x18]
mov rcx, rdx
sub rcx, qword [rsi]
cmp rbx, rcx
jb 0x1401784ec
lea rax, [rsi + 0x20]
mov rdx, rcx
sar rdx, 2
test rcx, rcx
mov edi, 1
cmovne rdi, rdx
mov qword [rsp + 0x48], rax
mov rax, rdi
shr rax, 0x3d
jne 0x140178634
lea rcx, [rdi*8]
call fcn.140142708
lea r14, [rsp + 0x28]
mov qword [r14], rax
add rbx, rax
mov qword [r14 + 0x10], rbx
mov qword [r14 + 8], rbx
lea rax, [rax + rdi*8]
mov qword [r14 + 0x18], rax
mov ecx, 0x1000
call fcn.140142708
lea rdx, [rsp + 0x20]
mov qword [rdx], rax
mov rcx, r14
call fcn.140028420
mov rdi, qword [rsi + 0x10]
cmp rdi, qword [rsi + 8]
je 0x14017844a
lea rbx, [rsp + 0x28]
add rdi, 0xfffffffffffffff8
mov rcx, rbx
mov rdx, rdi
call fcn.140028560
cmp rdi, qword [rsi + 8]
jne 0x140178369
mov rax, qword [rsi + 0x10]
mov rcx, qword [rsi]
mov rdx, qword [rsp + 0x28]
mov qword [rsi], rdx
mov qword [rsp + 0x28], rcx
mov rdx, qword [rsp + 0x30]
mov qword [rsi + 8], rdx
mov qword [rsp + 0x30], rdi
mov rdx, qword [rsp + 0x38]
mov qword [rsi + 0x10], rdx
mov qword [rsp + 0x38], rax
mov rdx, qword [rsi + 0x18]
mov rbp, qword [rsp + 0x40]
mov qword [rsi + 0x18], rbp
mov qword [rsp + 0x40], rdx
mov rdx, rax
sub rdx, rdi
je 0x1401783dc
add rdx, 0xfffffffffffffff8
shr rdx, 3
not rdx
lea rax, [rax + rdx*8]
mov qword [rsp + 0x38], rax
test rcx, rcx
je 0x1401782ae
call fcn.140142744
jmp 0x1401782ae
mov r14, qword [rsi]
mov rax, rbx
sub rax, r14
jbe 0x140178452
sar rax, 3
lea rcx, [rax + 1]
shr rcx, 0x3f
add rax, rcx
inc rax
sar rax, 1
mov r12, rax
neg r12
shl rax, 3
mov r14, rbx
sub r14, rax
sub rbp, rbx
je 0x140178436
mov rcx, r14
mov rdx, rbx
mov r8, rbp
call fcn.140145a10
mov rbx, qword [rsi + 8]
add rbp, r14
mov qword [rsi + 0x10], rbp
lea rax, [rbx + r12*8]
mov qword [rsi + 8], rax
jmp 0x1401782a5
mov rax, rdi
jmp 0x140178382
mov rax, rbp
sub rax, r14
mov rcx, rax
sar rcx, 2
test rax, rax
mov r13d, 1
cmovne r13, rcx
mov rax, r13
shr rax, 0x3d
jne 0x140178634
mov r12, r13
shr r12, 2
lea rcx, [r13*8]
call fcn.140142708
lea r9, [rax + r12*8]
lea r8, [rax + r13*8]
mov r10, r9
sub rbp, rbx
je 0x1401784c0
lea r10, [r9 + rbp]
sar rbp, 3
shl rbp, 3
lea rcx, [rax + r12*8]
xor edx, edx
mov rdi, qword [rbx + rdx]
mov qword [rcx + rdx], rdi
add rdx, 8
cmp rbp, rdx
jne 0x1401784af
mov qword [rsi], rax
mov qword [rsi + 8], r9
mov qword [rsi + 0x10], r10
mov qword [rsi + 0x18], r8
mov rbp, r10
test r14, r14
je 0x1401782a5
mov rcx, r14
call fcn.140142744
mov rbp, qword [rsi + 0x10]
jmp 0x1401782a5
mov ecx, 0x1000
cmp rdx, rax
jne 0x14017852c
call fcn.140142708
lea rdx, [rsp + 0x28]
mov qword [rdx], rax
mov rcx, rsi
call fcn.140176540
mov rbx, qword [rsi + 8]
mov rdi, qword [rsi + 0x10]
mov r15, qword [rbx]
add rbx, 8
mov qword [rsi + 8], rbx
cmp rdi, qword [rsi + 0x18]
je 0x140178546
mov qword [rdi], r15
jmp 0x1401782a9
call fcn.140142708
lea rdx, [rsp + 0x28]
mov qword [rdx], rax
mov rcx, rsi
call fcn.140176400
jmp 0x1401782ae
mov r14, qword [rsi]
mov rax, rbx
sub rax, r14
jbe 0x14017859e
sar rax, 3
lea rcx, [rax + 1]
shr rcx, 0x3f
add rax, rcx
inc rax
sar rax, 1
mov r12, rax
neg r12
shl rax, 3
mov r14, rbx
sub r14, rax
sub rdi, rbx
je 0x14017858d
mov rcx, r14
mov rdx, rbx
mov r8, rdi
call fcn.140145a10
mov rbx, qword [rsi + 8]
add rdi, r14
mov qword [rsi + 0x10], rdi
lea rax, [rbx + r12*8]
mov qword [rsi + 8], rax
jmp 0x140178524
mov rax, rdi
sub rax, r14
mov rcx, rax
sar rcx, 2
test rax, rax
mov r13d, 1
cmovne r13, rcx
mov rax, r13
shr rax, 0x3d
jne 0x140178634
mov r12, r13
shr r12, 2
lea rcx, [r13*8]
call fcn.140142708
lea r9, [rax + r12*8]
lea r8, [rax + r13*8]
mov r10, r9
sub rdi, rbx
je 0x140178608
lea r10, [r9 + rdi]
sar rdi, 3
shl rdi, 3
lea rcx, [rax + r12*8]
xor edx, edx
mov rbp, qword [rbx + rdx]
mov qword [rcx + rdx], rbp
add rdx, 8
cmp rdi, rdx
jne 0x1401785f7
mov qword [rsi], rax
mov qword [rsi + 8], r9
mov qword [rsi + 0x10], r10
mov qword [rsi + 0x18], r8
mov rdi, r10
test r14, r14
je 0x140178524
mov rcx, r14
call fcn.140142744
mov rdi, qword [rsi + 0x10]
jmp 0x140178524
call fcn.1401564d0
int3