Function at 0x140176840
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rsi, rcx
mov rax, qword [0x140324948]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rax, qword [rcx + 0x20]
cmp rax, 0x100
jb 0x140176906
add rax, 0xffffffffffffff00
mov qword [rsi + 0x20], rax
mov rbx, qword [rsi + 8]
mov rdi, qword [rsi + 0x10]
mov r15, qword [rbx]
add rbx, 8
mov qword [rsi + 8], rbx
mov rax, qword [rsi + 0x18]
cmp rdi, rax
jne 0x140176b6d
mov r14, qword [rsi]
mov rcx, rbx
sub rcx, r14
jbe 0x140176a20
sar rcx, 3
lea rax, [rcx + 1]
shr rax, 0x3f
add rax, rcx
add rax, 1
sar rax, 1
mov r12, rax
neg r12
shl rax, 3
mov r14, rbx
sub r14, rax
sub rdi, rbx
mov r13, rdi
sar r13, 3
test rdi, rdi
je 0x1401768f1
mov rcx, r14
mov rdx, rbx
mov r8, rdi
call fcn.140193590
mov rbx, qword [rsi + 8]
lea rdi, [r14 + r13*8]
mov qword [rsi + 0x10], rdi
lea rax, [rbx + r12*8]
mov qword [rsi + 8], rax
jmp 0x140176b6d
mov rax, qword [rsi + 0x10]
mov rdi, qword [rsi + 0x18]
mov rbx, rax
sub rbx, qword [rsi + 8]
sar rbx, 3
mov rcx, rdi
sub rcx, qword [rsi]
mov rdx, rcx
sar rdx, 3
cmp rbx, rdx
jae 0x1401769c0
mov ecx, 0x1000
cmp rdi, rax
jne 0x140176a06
call fcn.140190820
lea rdx, [rsp + 0x30]
mov qword [rdx], rax
mov rcx, rsi
call fcn.14010fde0
mov rbx, qword [rsi + 8]
mov rdi, qword [rsi + 0x10]
mov r15, qword [rbx]
add rbx, 8
mov qword [rsi + 8], rbx
mov rax, qword [rsi + 0x18]
cmp rdi, rax
jne 0x140176b6d
mov r14, qword [rsi]
mov rcx, rbx
sub rcx, r14
ja 0x1401768aa
sub rax, r14
mov rcx, rax
sar rcx, 2
test rax, rax
mov r12d, 1
cmovne r12, rcx
test r12, r12
je 0x140176b93
mov rax, r12
shr rax, 0x3d
jne 0x140176bc1
lea rcx, [r12*8]
call fcn.140190820
jmp 0x140176b95
mov rax, rcx
sar rax, 2
test rcx, rcx
mov edi, 1
cmovne rdi, rax
lea rax, [rsi + 0x20]
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], rax
test rdi, rdi
je 0x140176a5f
mov rax, rdi
shr rax, 0x3d
jne 0x140176bc1
lea rcx, [rdi*8]
call fcn.140190820
jmp 0x140176a61
call fcn.140190820
lea rdx, [rsp + 0x30]
mov qword [rdx], rax
mov rcx, rsi
call fcn.1401035e0
jmp 0x140176b75
sub rax, r14
mov rcx, rax
sar rcx, 2
test rax, rax
mov r12d, 1
cmovne r12, rcx
test r12, r12
je 0x140176b19
mov rax, r12
shr rax, 0x3d
jne 0x140176bc1
lea rcx, [r12*8]
call fcn.140190820
jmp 0x140176b1b
xor eax, eax
lea r14, [rsp + 0x30]
mov qword [r14], rax
lea rcx, [rax + rbx*8]
mov qword [r14 + 0x10], rcx
mov qword [r14 + 8], rcx
lea rax, [rax + rdi*8]
mov qword [r14 + 0x18], rax
mov ecx, 0x1000
call fcn.140190820
lea rdx, [rsp + 0x28]
mov qword [rdx], rax
mov rcx, r14
call fcn.1401035e0
mov rax, qword [rsi + 8]
mov rdi, qword [rsi + 0x10]
cmp rdi, rax
je 0x140176ac5
lea rbx, [rsp + 0x30]
add rdi, 0xfffffffffffffff8
mov rcx, rbx
mov rdx, rdi
call fcn.14010fde0
mov rax, qword [rsi + 8]
cmp rdi, rax
jne 0x140176aa9
mov rdi, qword [rsi + 0x10]
mov rcx, qword [rsi]
movaps xmm0, xmmword [rsp + 0x30]
mov qword [rsp + 0x30], rcx
movups xmmword [rsi], xmm0
mov qword [rsp + 0x38], rax
movaps xmm0, xmmword [rsp + 0x40]
mov qword [rsp + 0x40], rdi
mov rdx, qword [rsi + 0x18]
movups xmmword [rsi + 0x10], xmm0
mov qword [rsp + 0x48], rdx
cmp rax, rdi
je 0x140176b0d
lea rdx, [rdi - 8]
sub rdx, rax
shr rdx, 3
not rdx
lea rax, [rdi + rdx*8]
mov qword [rsp + 0x40], rax
test rcx, rcx
je 0x140176b75
call fcn.140190860
jmp 0x140176b75
xor eax, eax
lea r8, [rax + r12*8]
shr r12, 2
lea r9, [rax + r12*8]
mov rdx, r9
cmp rbx, rdi
je 0x140176b48
mov rdx, r9
mov rcx, qword [rbx]
mov qword [rdx], rcx
add rdx, 8
add rbx, 8
cmp rdi, rbx
jne 0x140176b32
mov r14, qword [rsi]
mov qword [rsi], rax
mov qword [rsi + 8], r9
mov qword [rsi + 0x10], rdx
mov qword [rsi + 0x18], r8
test r14, r14
je 0x140176b6a
mov rcx, r14
call fcn.140190860
mov rdi, qword [rsi + 0x10]
jmp 0x140176b6d
mov rdi, rdx
mov qword [rdi], r15
add qword [rsi + 0x10], 8
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140190ca0
nop
add rsp, 0x60
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor eax, eax
lea r8, [rax + r12*8]
shr r12, 2
lea r9, [rax + r12*8]
mov rdx, r9
cmp rbx, rdi
je 0x140176b48
mov rdx, r9
mov rcx, qword [rbx]
mov qword [rdx], rcx
add rdx, 8
add rbx, 8
cmp rdi, rbx
jne 0x140176bac
jmp 0x140176b45
call fcn.1401a6a70
ud2