Function at 0x140041d60
Capabilities:
Encode data using base64

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov r14, rcx
cmp rdx, 1
je 0x140041ee0
mov rdi, rdx
lea rax, [rdx - 1]
test rdx, rax
je 0x140041d8d
mov rcx, rdi
call fcn.1400421a0
mov rdi, rax
mov rbx, qword [r14 + 8]
cmp rdi, rbx
jbe 0x140041ef3
mov rax, rdi
shr rax, 0x3d
jne 0x140041f07
lea rsi, [r14 + 8]
lea rcx, [rdi*8]
call fcn.14006094c
mov rcx, qword [r14]
mov qword [r14], rax
test rcx, rcx
je 0x140041dc8
call fcn.140060988
mov qword [rsi], rdi
xor eax, eax
nop dword [rax]
mov rcx, qword [r14]
mov qword [rcx + rax*8], 0
inc rax
cmp rdi, rax
jne 0x140041dd0
mov rsi, qword [r14 + 0x10]
test rsi, rsi
je 0x140041ef8
lea r9, [r14 + 0x10]
mov rcx, qword [rsi + 8]
mov rax, rdi
shr rax, 1
movabs rdx, 0x5555555555555555
and rdx, rax
mov rax, rdi
sub rax, rdx
movabs rdx, 0x3333333333333333
mov rbx, rax
and rbx, rdx
shr rax, 2
and rax, rdx
add rax, rbx
mov rdx, rax
shr rdx, 4
add rdx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rdx
movabs r8, 0x101010101010101
imul r8, rax
shr r8, 0x38
cmp r8, 1
jbe 0x140041f0c
cmp rcx, rdi
jb 0x140041e6e
mov rax, rcx
xor edx, edx
div rdi
mov rcx, rdx
mov rax, qword [r14]
mov qword [rax + rcx*8], r9
mov rbx, qword [rsi]
test rbx, rbx
je 0x140041ef8
lea r9, [rdi - 1]
mov rax, qword [rbx + 8]
cmp r8d, 1
jbe 0x140041f02
cmp rax, rdi
jb 0x140041e98
xor edx, edx
div rdi
mov rax, rdx
cmp rax, rcx
je 0x140041edb
mov rdx, qword [r14]
cmp qword [rdx + rax*8], 0
jne 0x140041ebb
mov qword [rdx + rax*8], rsi
mov rsi, rbx
mov rbx, qword [rbx]
mov rcx, rax
test rbx, rbx
jne 0x140041e81
jmp 0x140041ef8
mov rdx, qword [rbx]
mov qword [rsi], rdx
mov rdx, qword [r14]
mov rdx, qword [rdx + rax*8]
mov rdx, qword [rdx]
mov qword [rbx], rdx
mov rdx, qword [r14]
mov rax, qword [rdx + rax*8]
mov qword [rax], rbx
mov rbx, rsi
mov rax, rcx
jmp 0x140041eab
mov rbx, qword [r14 + 8]
mov edi, 2
cmp rbx, 2
jb 0x140041da7
cmp rdi, rbx
jb 0x140041f18
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
and rax, r9
jmp 0x140041e98
call fcn.14008f100
lea rax, [rdi - 1]
and rcx, rax
jmp 0x140041e6e
mov rax, qword [r14 + 0x18]
test rax, rax
js 0x140041f28
cvtsi2ss xmm0, rax
jmp 0x140041f3d
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
divss xmm0, dword [r14 + 0x20]
call fcn.14008dba0
cvttss2si rcx, xmm0
mov rdx, rcx
subss xmm0, dword [0x1400cfd7c]
cvttss2si rax, xmm0
sar rdx, 0x3f
and rax, rdx
or rax, rcx
cmp rbx, 3
jb 0x140041fea
mov rcx, rbx
shr rcx, 1
movabs rdx, 0x5555555555555555
and rdx, rcx
mov rsi, rbx
sub rsi, rdx
movabs rdx, 0x3333333333333333
mov rcx, rsi
shr rcx, 2
and rsi, rdx
and rcx, rdx
add rcx, rsi
mov rdx, rcx
shr rdx, 4
add rdx, rcx
movabs rcx, 0xf0f0f0f0f0f0f0f
and rcx, rdx
movabs rdx, 0x101010101010101
imul rdx, rcx
shr rdx, 0x38
cmp edx, 1
ja 0x140041fea
cmp rax, 2
jb 0x140041ff2
dec rax
bsr rcx, rax
xor ecx, 0x3f
neg cl
mov eax, 1
shl rax, cl
jmp 0x140041ff2
mov rcx, rax
call fcn.1400421a0
cmp rdi, rax
cmova rax, rdi
cmp rax, rbx
jae 0x140041ef8
mov rcx, r14
mov rdx, rax
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
jmp 0x14008fa20
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov r14, rcx
test rdx, rdx
je 0x14008fb81
mov rdi, rdx
mov rax, rdx
shr rax, 0x3d
jne 0x14008fba7
lea rcx, [rdi*8]
call fcn.14006094c
mov rcx, qword [r14]
mov qword [r14], rax
test rcx, rcx
je 0x14008fa62
call fcn.140060988
mov qword [r14 + 8], rdi
xor eax, eax
mov rcx, qword [r14]
mov qword [rcx + rax*8], 0
inc rax
cmp rdi, rax
jne 0x14008fa68
mov rbx, qword [r14 + 0x10]
test rbx, rbx
je 0x14008fb9d
lea r9, [r14 + 0x10]
mov rcx, qword [rbx + 8]
mov rax, rdi
shr rax, 1
movabs rdx, 0x5555555555555555
and rdx, rax
mov rax, rdi
sub rax, rdx
movabs rdx, 0x3333333333333333
mov rsi, rax
and rsi, rdx
shr rax, 2
and rax, rdx
add rax, rsi
mov rdx, rax
shr rdx, 4
add rdx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rdx
movabs r8, 0x101010101010101
imul r8, rax
shr r8, 0x38
cmp r8, 1
jbe 0x14008fbac
cmp rcx, rdi
jb 0x14008fb06
mov rax, rcx
xor edx, edx
div rdi
mov rcx, rdx
mov rax, qword [r14]
mov qword [rax + rcx*8], r9
mov rsi, qword [rbx]
test rsi, rsi
je 0x14008fb9d
lea r9, [rdi - 1]
mov rax, qword [rsi + 8]
cmp r8d, 1
jbe 0x14008fb7c
cmp rax, rdi
jb 0x14008fb34
xor edx, edx
div rdi
mov rax, rdx
cmp rax, rcx
je 0x14008fb77
mov rdx, qword [r14]
cmp qword [rdx + rax*8], 0
jne 0x14008fb57
mov qword [rdx + rax*8], rbx
mov rbx, rsi
mov rsi, qword [rsi]
mov rcx, rax
test rsi, rsi
jne 0x14008fb1d
jmp 0x14008fb9d
mov rdx, qword [rsi]
mov qword [rbx], rdx
mov rdx, qword [r14]
mov rdx, qword [rdx + rax*8]
mov rdx, qword [rdx]
mov qword [rsi], rdx
mov rdx, qword [r14]
mov rax, qword [rdx + rax*8]
mov qword [rax], rsi
mov rsi, rbx
mov rax, rcx
jmp 0x14008fb47
and rax, r9
jmp 0x14008fb34
mov rcx, qword [r14]
mov qword [r14], 0
test rcx, rcx
je 0x14008fb95
call fcn.140060988
mov qword [r14 + 8], 0
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
call fcn.14008f100
lea rax, [rdi - 1]
and rcx, rax
jmp 0x14008fb06