Function at 0x140040b50
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov r14d, dword [rcx + 0xc]
mov rdi, rcx
mov ecx, dword [rcx + 8]
movabs rax, 0x5555555555555555
mov r12, qword [r9]
mov r13, rdx
mov r15d, r8d
mov dword [rsp + 0x58], ecx
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x50], rax
cmp ecx, 1
je 0x140040d5b
lea ebp, [r14 + r14*2]
xor ebx, ebx
shl ebp, 5
test r8d, r8d
je 0x140040bcc
mov r9d, r14d
mov ecx, ebp
add rcx, rdx
imul r9d, r15d
lea eax, [r15 - 1]
mov rsi, qword [rcx + rax*8]
add r9, rdx
jmp 0x140040bd2
mov rsi, rbx
mov r9, rbx
cmp r15, qword [rdx]
jae 0x140040bf1
lea ecx, [r15 + 1]
mov ebx, ecx
mov edx, ecx
imul ebx, r14d
mov ecx, ebp
add rbx, r13
add rcx, r13
mov r10, qword [rcx + rdx*8]
jmp 0x140040bf4
mov r10, rbx
movabs r8, 0x3333333333333333
movabs r11, 0xf0f0f0f0f0f0f0f
test rsi, rsi
je 0x140040c57
mov rcx, qword [rsi]
movabs rdx, 0x5555555555555555
mov rax, rcx
shr rax, 1
and rax, rdx
sub rcx, rax
mov rax, rcx
and rcx, r8
shr rax, 2
and rax, r8
add rax, rcx
mov rdx, rax
shr rdx, 4
add rdx, rax
movabs rax, 0x101010101010101
and rdx, r11
imul rdx, rax
shr rdx, 0x38
jmp 0x140040c5c
mov edx, 0x40
test r10, r10
je 0x140040ca3
mov rcx, qword [r10]
mov rax, rcx
shr rax, 1
and rax, qword [rsp + 0x50]
sub rcx, rax
mov rax, rcx
and rcx, r8
shr rax, 2
and rax, r8
add rax, rcx
mov r8, rax
shr r8, 4
add r8, rax
movabs rax, 0x101010101010101
and r8, r11
imul r8, rax
shr r8, 0x38
jmp 0x140040ca9
mov r8d, 0x40
mov eax, r8d
or eax, edx
test eax, 0xffffffbf
je 0x140040d44
cmp edx, r8d
jae 0x140040cfa
cmp edx, 0x3d
jae 0x140040d37
mov r11, qword [rsp + 0xe8]
mov r8d, edx
mov rax, qword [rsp + 0xd8]
mov rdx, rsi
mov rcx, qword [rsp + 0xe0]
mov qword [rsp + 0x30], r11
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, rdi
call fcn.140046e60
jmp 0x140040d3c
cmp r8d, 0x3d
jae 0x140040d37
mov r11, qword [rsp + 0xe8]
mov r9, rbx
mov rax, qword [rsp + 0xd8]
mov rdx, r10
mov rcx, qword [rsp + 0xe0]
mov qword [rsp + 0x30], r11
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, rdi
call fcn.140047150
jmp 0x140040d3c
mov eax, 0xffffffff
test eax, eax
jns 0x14004119d
mov ebx, r14d
mov dword [rsp + 0x40], 0x3f5
shl ebx, 5
lea r8d, [r14 + 8]
add rbx, r12
jmp 0x140040dc2
mov rcx, qword [rsp + 0xe0]
lea r8, [rsp + 0x40]
mov rdx, r12
call qword [rdi + 0x28]
test eax, eax
je 0x140040d92
mov edx, dword [rsp + 0x40]
mov eax, 1
mov r11, qword [rsp + 0xe8]
imul edx, r14d
add rdx, r12
mov qword [r11], rdx
jmp 0x14004119d
mov ecx, dword [rsp + 0x40]
mov eax, ecx
xor eax, 0x1f
je 0x140040db6
cmp ecx, 0x1f
jae 0x140040dab
imul ebx, r14d, 0x1f
add rbx, r12
jmp 0x140040db8
mov ebx, r14d
shl ebx, 5
add rbx, r12
jmp 0x140040db8
xor ebx, ebx
lea ebp, [r14 + r14*2]
mov r8d, r14d
shl ebp, 5
mov rcx, qword [rdi + 0x48]
lea rdx, [rsp + 0x48]
shl r8d, 6
call qword [rdi + 0x38]
test eax, eax
je 0x140040de0
mov eax, 0xfffffffc
jmp 0x14004119d
mov rsi, qword [rdi + 0x20]
mov edi, dword [r13]
inc edi
mov eax, edi
sub edi, r15d
mov qword [rsp + 0x50], rax
dec edi
mov qword [r13], rax
mov r8d, edi
lea eax, [r15 + 1]
mov r15, r14
imul eax, r14d
add rax, r13
mov rdx, rax
mov qword [rsp + 0x60], rax
lea rcx, [r14 + rax]
call rsi
mov dword [rsp + 0x44], eax
test eax, eax
je 0x140040e2b
mov eax, 0xfffffffa
jmp 0x14004119d
mov rax, qword [rsp + 0x50]
mov ecx, ebp
add rcx, r13
lea rdx, [rcx + rax*8]
test edi, edi
je 0x140040e50
nop dword [rax]
mov rax, qword [rdx - 8]
mov qword [rdx], rax
add rdx, 0xfffffffffffffff8
add edi, 0xffffffff
jne 0x140040e40
mov rax, qword [rsp + 0x48]
mov qword [rdx], rax
test rbx, rbx
je 0x140040e77
mov rcx, qword [rsp + 0x60]
mov r8d, 1
mov rdx, rbx
call rsi
mov r13, qword [rsp + 0xe8]
jmp 0x140040e88
mov r13, qword [rsp + 0xe8]
mov rax, qword [rsp + 0x60]
mov qword [r13], rax
mov rax, qword [rsp + 0x48]
mov ebp, 0x1f
imul ebx, r14d, 0x3f
imul edx, r14d, 0x3e
add rbx, r12
cmp dword [rsp + 0x58], 1
mov qword [rsp + 0x50], rdx
je 0x140040fd4
movabs rcx, 0x5555555555555555
mov qword [rax], rcx
mov qword [r12], rcx
mov ecx, r14d
mov rax, qword [rsp + 0x48]
add r12, 0x1f8
shl ecx, 6
add rdx, rax
add r12, rcx
mov qword [rsp + 0x70], r12
mov rdi, r12
lea r13, [rax + 0x1f8]
mov r12, rdx
add r13, rcx
add r14d, r14d
mov qword [rsp + 0x78], r14
nop dword [rax]
nop word [rax + rax]
mov r8d, 1
mov rdx, rbx
mov rcx, r12
call rsi
mov rax, qword [rdi]
sub rdi, 8
mov qword [r13], rax
lea r13, [r13 - 0x10]
sub r12, r14
sub rbx, r15
sub rbp, 1
jne 0x140040f00
mov rax, qword [rdi]
mov ebp, 0x1e
mov r14, qword [rsp + 0x50]
sub rdi, 8
add r14, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
mov qword [r13], rax
mov r13, qword [rsp + 0x78]
nop dword [rax]
sub rbx, r15
mov r8d, 1
mov rdx, rbx
mov rcx, r14
call rsi
mov rax, qword [rdi]
lea rdi, [rdi - 8]
mov qword [r12], rax
lea r12, [r12 - 0x10]
dec ebp
sub r14, r13
mov eax, ebp
not eax
test eax, eax
jne 0x140040f50
mov rax, qword [rdi]
mov rbx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xe0]
mov rdx, rbx
mov qword [r12], rax
mov rax, qword [rsp + 0xc0]
call qword [rax + 0x10]
test eax, eax
js 0x140041199
je 0x140040fbf
mov rcx, qword [rsp + 0xd8]
mov rax, qword [rsp + 0x48]
mov qword [rcx], rax
jmp 0x140041199
mov r11, qword [rsp + 0xe8]
mov eax, 1
mov qword [r11], rbx
jmp 0x14004119d
movabs rcx, 0x5555555555555557
mov qword [rax], rcx
movabs rax, 0x5555555555555555
mov qword [r12], rax
mov rdi, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x40]
add rdi, rdx
cmp ecx, 0x1f
jae 0x14004109f
add r14d, r14d
nop word [rax + rax]
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call rsi
sub rbx, r15
sub rdi, r14
add ebp, 0xffffffff
jne 0x140041010
lea rcx, [r15 + rdi]
mov rdx, rbx
lea r8d, [rbp + 1]
call rsi
mov rdi, qword [rsp + 0x50]
sub rbx, r14
add rdi, r12
mov ebp, 0x1e
mov r12d, dword [rsp + 0x40]
sub ebp, r12d
je 0x14004106e
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call rsi
sub rbx, r15
sub rdi, r14
add ebp, 0xffffffff
jne 0x140041050
mov r12d, dword [rsp + 0x40]
mov qword [r13], rdi
sub rdi, r14
test r12d, r12d
je 0x140041199
nop
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call rsi
sub rbx, r15
sub rdi, r14
add r12d, 0xffffffff
jne 0x140041080
jmp 0x140041199
mov eax, ecx
xor eax, ebp
je 0x140041137
mov r12d, 0x3f
sub r12d, ecx
je 0x1400410de
lea r13d, [r14 + r14]
nop dword [rax + rax]
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call rsi
sub rbx, r15
sub rdi, r13
add r12d, 0xffffffff
jne 0x1400410c0
mov ecx, dword [rsp + 0x40]
mov r11, qword [rsp + 0xe8]
mov eax, ecx
xor eax, 0x20
je 0x14004112e
lea r12d, [r14 + r14]
mov qword [r11], rdi
sub rdi, r12
lea r15d, [rcx - 0x21]
test r15d, r15d
je 0x14004111a
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call rsi
sub rbx, r14
sub rdi, r12
add r15d, 0xffffffff
jne 0x140041100
lea rcx, [rdi + r14]
mov r8d, 1
mov rdx, rbx
call rsi
sub rbx, r14
jmp 0x140041167
lea rax, [rdi + r14]
mov qword [r11], rax
jmp 0x140041167
mov r15d, ebp
lea r13d, [r14 + r14]
nop
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call rsi
sub rbx, r14
sub rdi, r13
add r15d, 0xffffffff
jne 0x140041140
lea rcx, [rdi + r14]
mov rdx, rbx
lea r8d, [r15 + 1]
call rsi
imul edi, r14d, 0x3e
sub rbx, r14
mov r15, r14
add rdi, qword [rsp + 0x68]
add r14d, r14d
nop dword [rax]
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call rsi
sub rbx, r15
sub rdi, r14
add ebp, 0xffffffff
jne 0x140041180
mov eax, dword [rsp + 0x44]
mov rbx, qword [rsp + 0xc8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret