Function at 0x140013840
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
test rdx, rdx
je 0x140013b21
mov rax, rdx
shr rax, 0x3d
jne 0x140013b21
mov rdi, r9
mov r14, rcx
mov rax, rdx
shr rax, 0x20
mov rcx, rdx
shl rcx, 0x20
lea r9d, [r8 - 0x20]
test rax, rax
cmovne rcx, rdx
cmovne r9d, r8d
mov rax, rcx
shr rax, 0x30
mov rdx, rcx
shl rdx, 0x10
lea r8d, [r9 - 0x10]
test rax, rax
cmovne rdx, rcx
cmovne r8d, r9d
mov rax, rdx
shr rax, 0x38
mov rcx, rdx
shl rcx, 8
lea r9d, [r8 - 8]
test rax, rax
cmovne rcx, rdx
cmovne r9d, r8d
mov rax, rcx
shr rax, 0x3c
mov rdx, rcx
shl rdx, 4
lea r8d, [r9 - 4]
test rax, rax
cmovne rdx, rcx
cmovne r8d, r9d
mov rcx, rdx
shr rcx, 0x3e
lea rax, [rdx*4]
test rcx, rcx
cmovne rax, rdx
lea edx, [r8 - 2]
cmovne edx, r8d
xor ecx, ecx
test rax, rax
setns cl
sub edx, ecx
mov ecx, 0xffffffa0
sub ecx, edx
movsx ecx, cx
lea ecx, [rcx + rcx*4]
shl ecx, 4
add ecx, 0x153b0
movsxd rcx, ecx
imul r8, rcx, 0x7b4dc993
mov rcx, r8
shr rcx, 0x3f
sar r8, 0x2a
add r8d, ecx
cmp r8d, 0x51
jae 0x140013b21
test rax, rax
setns cl
shl rax, cl
mov esi, r8d
shl rsi, 4
lea rbx, [0x14019cc90]
mov r8, qword [rsi + rbx]
mov rcx, rax
shr rcx, 0x20
mov eax, eax
mov r9d, r8d
shr r8, 0x20
mov r10, r8
imul r10, rcx
imul r8, rax
imul rcx, r9
imul r9, rax
shr r9, 0x20
mov r11d, ecx
add r11, r9
mov eax, r8d
add rax, r11
sub rax, 0xffffffff80000000
shr rcx, 0x20
add rcx, r10
shr r8, 0x20
add r8, rcx
shr rax, 0x20
add dx, word [rsi + rbx + 8]
add rax, r8
mov ecx, 0xffffffc0
sub ecx, edx
movzx r9d, cx
mov r8d, r9d
and r8d, 0x3f
mov rdx, rax
mov ecx, r8d
shr rdx, cl
mov r10d, 1
shl r10, cl
lea r13, [r10 - 1]
mov r11, rax
and r11, r13
je 0x140013b83
movzx r15d, word [rsp + 0xa8]
movzx esi, word [rsi + rbx + 0xa]
cmp edx, 0x2710
jae 0x140013a0c
cmp edx, 0x64
jae 0x140013a2f
xor ecx, ecx
cmp edx, 0xa
setae cl
lea ebp, [rcx + rcx*8]
inc ebp
jmp 0x140013a86
cmp edx, 0xf4240
jae 0x140013a4a
cmp edx, 0x186a0
setb cl
mov ebx, 0x2710
mov ebp, 0x186a0
cmovb ebp, ebx
xor cl, 5
jmp 0x140013a86
cmp edx, 0x3e8
setb cl
mov ebx, 0x64
mov ebp, 0x3e8
cmovb ebp, ebx
xor cl, 3
jmp 0x140013a86
cmp edx, 0x5f5e100
jae 0x140013a6d
cmp edx, 0x989680
setb cl
mov ebx, 0xf4240
mov ebp, 0x989680
cmovb ebp, ebx
xor cl, 7
jmp 0x140013a86
cmp edx, 0x3b9aca00
setb cl
mov ebx, 0x5f5e100
mov ebp, 0x3b9aca00
cmovb ebp, ebx
xor cl, 9
movzx ecx, cl
mov ebx, ecx
sub ebx, esi
mov esi, ebx
inc esi
cmp si, r15w
jle 0x140013b23
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], r14
mov r12, qword [rsp + 0xa0]
movsx rax, si
mov dword [rsp + 0x24], esi
sub esi, r15d
movsx rbx, r15w
sub rax, rbx
cmp rax, r12
movsx rbx, si
cmovae rbx, r12
neg rcx
neg r12
mov esi, 1
mov r15d, 0xcccccccd
nop dword [rax + rax]
lea r14, [r12 + rsi]
mov eax, edx
xor edx, edx
div ebp
cmp r14, 1
je 0x140013b21
add al, 0x30
mov byte [rdi + rsi - 1], al
cmp rbx, rsi
je 0x140013b9b
lea rax, [rcx + rsi]
cmp rax, 1
je 0x140013c04
mov eax, ebp
imul rax, r15
shr rax, 0x23
inc rsi
cmp ebp, 0xa
mov ebp, eax
jae 0x140013ae0
ud2
movabs rcx, 0xcccccccccccccccd
mul rcx
mov eax, ebp
mov ecx, r8d
shl rax, cl
mov rcx, rax
sub rcx, r10
jbe 0x140013b83
cmp rcx, r10
jbe 0x140013b83
shr rdx, 3
mov rcx, rax
sub rcx, rdx
cmp rcx, rdx
jbe 0x140013b72
mov r9, rax
sub r9, rdx
sub r9, rdx
mov r11d, 2
mov ecx, r8d
shl r11, cl
cmp r9, r11
jae 0x140013cc2
sub rdx, r10
jbe 0x140013b83
sub rax, rdx
cmp rax, rdx
jbe 0x140013cd7
mov qword [r14], 0
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov eax, edx
mov ecx, r8d
shl rax, cl
mov edx, ebp
shl rdx, cl
mov rcx, rdx
sub rcx, r10
jbe 0x140013cb1
cmp rcx, r10
mov rsi, qword [rsp + 0x28]
jbe 0x140013bfb
add rax, r11
mov rcx, rdx
sub rcx, rax
cmp rcx, rax
jbe 0x140013bea
mov r9, rdx
sub r9, rax
sub r9, rax
mov r11d, 2
mov ecx, r8d
shl r11, cl
cmp r9, r11
jae 0x140013d4b
sub rax, r10
jbe 0x140013bfb
sub rdx, rax
cmp rdx, rax
jbe 0x140013cea
mov qword [rsi], 0
jmp 0x140013b8a
dec r9d
and r9d, 0x3f
mov edx, 1
mov r15, qword [rsp + 0x28]
mov r12, qword [rsp + 0xa0]
nop dword [rax]
mov rax, rdx
mov ecx, r9d
shr rdx, cl
test rdx, rdx
jne 0x140013ca5
cmp rsi, r12
jae 0x140013b21
add r11, r11
lea r14, [r11 + r11*4]
mov r11, r14
and r11, r13
lea rcx, [rax + rax]
lea rdx, [rcx + rcx*4]
mov ecx, r8d
shr r14, cl
add r14b, 0x30
mov byte [rdi + rsi], r14b
inc rsi
cmp rbx, rsi
jne 0x140013c20
mov rcx, r10
sub rcx, rdx
jbe 0x140013ca5
cmp rcx, rdx
jbe 0x140013ca5
mov rcx, r10
sub rcx, r11
cmp rcx, r11
jbe 0x140013c94
mov r8, r10
sub r8, r11
sub r8, r11
shl rax, 2
lea rax, [rax + rax*4]
cmp r8, rax
jae 0x140013d9b
sub r11, rdx
jbe 0x140013ca5
sub r10, r11
cmp r10, r11
jbe 0x140013d5f
mov qword [r15], 0
jmp 0x140013b8a
mov rax, qword [rsp + 0x28]
mov qword [rax], 0
jmp 0x140013b8a
mov qword [r14], rdi
mov qword [r14 + 8], 0
mov word [r14 + 0x10], si
jmp 0x140013b8a
lea eax, [rbx + 2]
cmp ax, r15w
jle 0x140013d03
mov byte [rdi], 0x31
mov ecx, 1
jmp 0x140013d05
mov rcx, rdi
mov rdx, rbx
call fcn.1400101c0
test al, 1
jne 0x140013d16
mov rax, qword [rsp + 0xa0]
jmp 0x140013d42
xor ecx, ecx
mov qword [r14], rdi
mov qword [r14 + 8], rcx
mov word [r14 + 0x10], ax
jmp 0x140013b8a
mov rax, qword [rsp + 0x30]
lea ecx, [rax + 2]
movzx eax, word [rsp + 0xa8]
mov dword [rsp + 0x24], ecx
cmp cx, ax
mov rax, qword [rsp + 0xa0]
jle 0x140013d42
cmp rbx, rax
jae 0x140013d42
mov byte [rdi + rbx], dl
inc rbx
cmp rbx, rax
ja 0x140013b21
mov qword [rsi], rdi
mov qword [rsi + 8], rbx
mov eax, dword [rsp + 0x24]
mov word [rsi + 0x10], ax
jmp 0x140013b8a
mov rcx, rdi
mov rdx, rbx
call fcn.1400101c0
test al, 1
je 0x140013d92
mov rax, qword [rsp + 0x30]
lea ecx, [rax + 2]
movzx eax, word [rsp + 0xa8]
mov dword [rsp + 0x24], ecx
cmp cx, ax
jle 0x140013d92
cmp rbx, r12
jae 0x140013d92
mov byte [rdi + rbx], dl
inc rbx
cmp rbx, r12
ja 0x140013b21
mov qword [r15], rdi
mov qword [r15 + 8], rbx
mov eax, dword [rsp + 0x24]
mov word [r15 + 0x10], ax
jmp 0x140013b8a