Function at 0x14000a6c4
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 qword [rsp + 0x30], r9
mov r10, rdx
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x4c], r8d
mov eax, r8d
and eax, 0xffffff
cmp eax, 0x10000
lea rax, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__invalid_Base64_lengthinvalid_Base64_encodingInvalid_parameter_length
lea rsi, [0x140166df0]
cmovb rsi, rax
xor r14d, r14d
mov rax, rdx
mov r13d, 0
sub rax, 0x1a
cmovb rax, r14
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x50], rdx
jbe 0x14000ab3b
xor r14d, r14d
xor ebx, ebx
mov r13, rbx
mov rdi, r14
add rbx, 0x1a
lea rax, [0x1401669c8]
mov qword [rsp + 0x20], rax
mov rcx, r13
mov rdx, rbx
mov r8, qword [rsp + 0x38]
mov r9, r10
call fcn.14006f2e0
mov r15, rax
mov r12, rdx
add r14, 0x20
lea rax, [0x1401669e0]
mov qword [rsp + 0x20], rax
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0xc0]
mov r8, rdi
mov r9, r14
call fcn.14000a5d0
mov rbp, rax
mov rdi, rdx
mov rcx, r15
mov rdx, r12
xor r8d, r8d
lea r9, [0x1401669f8]
call fcn.14000a60b
mov rcx, rax
call fcn.14000a631
test rdi, rdi
je 0x14000ae00
mov rcx, rax
shr rcx, 0x3a
mov cl, byte [rsi + rcx]
mov byte [rbp], cl
cmp rdi, 1
je 0x14000ae10
mov rcx, rax
shr rcx, 0x34
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 1], cl
cmp rdi, 2
jbe 0x14000ae26
mov rcx, rax
shr rcx, 0x2e
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 2], cl
cmp rdi, 3
je 0x14000ae3c
mov rcx, rax
shr rcx, 0x28
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 3], cl
cmp rdi, 4
jbe 0x14000ae52
mov rcx, rax
shr rcx, 0x22
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 4], cl
cmp rdi, 5
je 0x14000ae68
mov rcx, rax
shr rcx, 0x1c
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 5], cl
cmp rdi, 6
jbe 0x14000ae7e
mov ecx, eax
shr ecx, 0x16
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 6], cl
cmp rdi, 7
je 0x14000ae94
shr eax, 0x10
and eax, 0x3f
mov al, byte [rsi + rax]
mov byte [rbp + 7], al
mov r8d, 6
mov rcx, r15
mov rdx, r12
lea r9, [0x140166ad0]
call fcn.14000a60b
mov rcx, rax
call fcn.14000a631
cmp rdi, 8
jbe 0x14000aeaa
mov rcx, rax
shr rcx, 0x3a
mov cl, byte [rsi + rcx]
mov byte [rbp + 8], cl
cmp rdi, 9
je 0x14000aec0
mov rcx, rax
shr rcx, 0x34
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 9], cl
cmp rdi, 0xa
jbe 0x14000aed6
mov rcx, rax
shr rcx, 0x2e
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0xa], cl
cmp rdi, 0xb
je 0x14000aeec
mov rcx, rax
shr rcx, 0x28
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0xb], cl
cmp rdi, 0xc
jbe 0x14000af02
mov rcx, rax
shr rcx, 0x22
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0xc], cl
cmp rdi, 0xd
je 0x14000af18
mov rcx, rax
shr rcx, 0x1c
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0xd], cl
cmp rdi, 0xe
jbe 0x14000af2e
mov ecx, eax
shr ecx, 0x16
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0xe], cl
cmp rdi, 0xf
je 0x14000af44
shr eax, 0x10
and eax, 0x3f
mov al, byte [rsi + rax]
mov byte [rbp + 0xf], al
mov r8d, 0xc
mov rcx, r15
mov rdx, r12
lea r9, [0x140166ba8]
call fcn.14000a60b
mov rcx, rax
call fcn.14000a631
cmp rdi, 0x10
jbe 0x14000af5a
mov rcx, rax
shr rcx, 0x3a
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x10], cl
cmp rdi, 0x11
je 0x14000af70
mov rcx, rax
shr rcx, 0x34
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x11], cl
cmp rdi, 0x12
jbe 0x14000af86
mov rcx, rax
shr rcx, 0x2e
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x12], cl
cmp rdi, 0x13
je 0x14000af9c
mov rcx, rax
shr rcx, 0x28
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x13], cl
cmp rdi, 0x14
jbe 0x14000afb2
mov rcx, rax
shr rcx, 0x22
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x14], cl
cmp rdi, 0x15
je 0x14000afc8
mov rcx, rax
shr rcx, 0x1c
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x15], cl
cmp rdi, 0x16
jbe 0x14000afde
mov ecx, eax
shr ecx, 0x16
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x16], cl
cmp rdi, 0x17
je 0x14000aff4
shr eax, 0x10
and eax, 0x3f
mov al, byte [rsi + rax]
mov byte [rbp + 0x17], al
mov r8d, 0x12
mov rcx, r15
mov rdx, r12
lea r9, [0x140166c80]
call fcn.14000a60b
mov rcx, rax
call fcn.14000a631
cmp rdi, 0x18
jbe 0x14000b00a
mov rcx, rax
shr rcx, 0x3a
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x18], cl
cmp rdi, 0x19
je 0x14000b020
mov rcx, rax
shr rcx, 0x34
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x19], cl
cmp rdi, 0x1a
jbe 0x14000b036
mov rcx, rax
shr rcx, 0x2e
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x1a], cl
cmp rdi, 0x1b
je 0x14000b04c
mov rcx, rax
shr rcx, 0x28
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x1b], cl
cmp rdi, 0x1c
jbe 0x14000b062
mov rcx, rax
shr rcx, 0x22
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x1c], cl
cmp rdi, 0x1d
je 0x14000b078
mov rcx, rax
shr rcx, 0x1c
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x1d], cl
cmp rdi, 0x1e
jbe 0x14000b08e
mov ecx, eax
shr ecx, 0x16
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rbp + 0x1e], cl
cmp rdi, 0x1f
je 0x14000b0a4
shr eax, 0x10
and eax, 0x3f
mov al, byte [rsi + rax]
mov byte [rbp + 0x1f], al
add rbx, 0xfffffffffffffffe
cmp rbx, qword [rsp + 0x40]
mov r10, qword [rsp + 0x50]
jbe 0x14000a72e
add r13, 0x18
mov ecx, 3
mov rax, r10
xor edx, edx
div rcx
mov rbx, r10
mov qword [rsp + 0x40], rdx
sub rbx, rdx
lea rdi, [0x140166908]
cmp r13, rbx
jae 0x14000ac58
lea r15, [r13 + 3]
lea rax, [0x1401668f0]
mov qword [rsp + 0x20], rax
mov rcx, r13
mov rdx, r15
mov r8, qword [rsp + 0x38]
mov r9, r10
call fcn.14006f2e0
mov r13, rax
mov rbp, rdx
lea r12, [r14 + 4]
mov qword [rsp + 0x20], rdi
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0xc0]
mov r8, r14
mov r9, r12
call fcn.14000a5d0
test rbp, rbp
je 0x14000ada2
test rdx, rdx
je 0x14000adab
movzx ecx, byte [r13]
shr ecx, 2
mov cl, byte [rsi + rcx]
mov byte [rax], cl
cmp rbp, 1
jbe 0x14000adb4
cmp rdx, 1
jbe 0x14000adbd
mov cl, byte [r13]
mov r8b, byte [r13 + 1]
shr r8b, 4
shl cl, 4
or cl, r8b
movzx ecx, cl
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rax + 1], cl
cmp rbp, 2
jbe 0x14000adce
cmp rdx, 2
jbe 0x14000add7
mov cl, byte [r13 + 1]
mov r8b, byte [r13 + 2]
shr r8b, 6
shl cl, 2
or cl, r8b
movzx ecx, cl
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rax + 2], cl
cmp rdx, 3
je 0x14000ade8
movzx ecx, byte [r13 + 2]
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov byte [rax + 3], cl
mov r14, r12
mov r13, r15
mov r10, qword [rsp + 0x50]
jmp 0x14000ab5a
mov r11, qword [rsp + 0x40]
cmp r11, 1
je 0x14000acf3
cmp r11, 2
mov r9, qword [rsp + 0xc0]
jne 0x14000ad47
cmp r14, r9
jae 0x14000b0ba
mov rax, qword [rsp + 0x38]
movzx edx, byte [rax + rbx]
mov eax, edx
shr eax, 2
mov al, byte [rsi + rax]
mov rcx, qword [rsp + 0x30]
mov byte [rcx + r14], al
inc rbx
cmp rbx, r10
jae 0x14000b0cf
lea rcx, [r14 + 1]
cmp rcx, r9
jae 0x14000b0ea
mov rax, qword [rsp + 0x38]
mov al, byte [rax + rbx]
mov ecx, eax
shr cl, 4
shl dl, 4
or dl, cl
movzx ecx, dl
and ecx, 0x3f
mov cl, byte [rsi + rcx]
mov rdx, qword [rsp + 0x30]
mov byte [rdx + r14 + 1], cl
lea rcx, [r14 + 2]
cmp rcx, r9
jae 0x14000b0f3
shl al, 2
and al, 0x3c
mov edx, 3
jmp 0x14000ad35
mov r9, qword [rsp + 0xc0]
cmp r14, r9
jae 0x14000b0c3
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax + rbx]
mov ecx, eax
shr ecx, 2
mov cl, byte [rsi + rcx]
mov rdx, qword [rsp + 0x30]
mov byte [rdx + r14], cl
lea rcx, [r14 + 1]
cmp rcx, r9
jae 0x14000b0e1
shl al, 4
and al, 0x30
mov edx, 2
movzx eax, al
mov al, byte [rsi + rax]
mov r8, qword [rsp + 0x30]
mov byte [r8 + rcx], al
add r14, rdx
test byte [rsp + 0x4c], 1
jne 0x14000ad6a
xor eax, eax
add r14, rax
jb 0x14000b102
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r9
sub rcx, r14
jb 0x14000b11a
add qword [rsp + 0x30], r14
mov rdx, r11
xor rdx, 3
xor eax, eax
mov r8, qword [rsp + 0x30]
test r11, r11
je 0x14000ad50
cmp rdx, rax
jbe 0x14000ad50
cmp rcx, rax
je 0x14000adf1
mov byte [r8 + rax], 0x3d
inc rax
jmp 0x14000ad89
lea r8, [0x140166920]
jmp 0x14000ae07
lea r8, [0x140166938]
jmp 0x14000ae07
lea r8, [0x140166950]
jmp 0x14000ae17
lea r8, [0x140166968]
mov ecx, 1
call fcn.1400478b0
lea r8, [0x140166980]
jmp 0x14000ae2d
lea r8, [0x140166998]
mov ecx, 2
call fcn.1400478b0
lea r8, [0x1401669b0]
jmp 0x14000ae43
lea r8, [0x140166d98]
mov rdx, rcx
call fcn.1400478b0
lea r8, [0x140166a10]
xor ecx, ecx
xor edx, edx
call fcn.1400478b0
lea r8, [0x140166a28]
mov ecx, 1
mov edx, 1
call fcn.1400478b0
lea r8, [0x140166a40]
mov ecx, 2
mov edx, 2
call fcn.1400478b0
lea r8, [0x140166a58]
mov ecx, 3
mov edx, 3
call fcn.1400478b0
lea r8, [0x140166a70]
mov ecx, 4
mov edx, 4
call fcn.1400478b0
lea r8, [0x140166a88]
mov ecx, 5
mov edx, 5
call fcn.1400478b0
lea r8, [0x140166aa0]
mov ecx, 6
mov edx, 6
call fcn.1400478b0
lea r8, [0x140166ab8]
mov ecx, 7
mov edx, 7
call fcn.1400478b0
lea r8, [0x140166ae8]
mov ecx, 8
mov edx, 8
call fcn.1400478b0
lea r8, [0x140166b00]
mov ecx, 9
mov edx, 9
call fcn.1400478b0
lea r8, [0x140166b18]
mov ecx, 0xa
mov edx, 0xa
call fcn.1400478b0
lea r8, [0x140166b30]
mov ecx, 0xb
mov edx, 0xb
call fcn.1400478b0
lea r8, [0x140166b48]
mov ecx, 0xc
mov edx, 0xc
call fcn.1400478b0
lea r8, [0x140166b60]
mov ecx, 0xd
mov edx, 0xd
call fcn.1400478b0
lea r8, [0x140166b78]
mov ecx, 0xe
mov edx, 0xe
call fcn.1400478b0
lea r8, [0x140166b90]
mov ecx, 0xf
mov edx, 0xf
call fcn.1400478b0
lea r8, [0x140166bc0]
mov ecx, 0x10
mov edx, 0x10
call fcn.1400478b0
lea r8, [0x140166bd8]
mov ecx, 0x11
mov edx, 0x11
call fcn.1400478b0
lea r8, [0x140166bf0]
mov ecx, 0x12
mov edx, 0x12
call fcn.1400478b0
lea r8, [0x140166c08]
mov ecx, 0x13
mov edx, 0x13
call fcn.1400478b0
lea r8, [0x140166c20]
mov ecx, 0x14
mov edx, 0x14
call fcn.1400478b0
lea r8, [0x140166c38]
mov ecx, 0x15
mov edx, 0x15
call fcn.1400478b0
lea r8, [0x140166c50]
mov ecx, 0x16
mov edx, 0x16
call fcn.1400478b0
lea r8, [0x140166c68]
mov ecx, 0x17
mov edx, 0x17
call fcn.1400478b0
lea r8, [0x140166c98]
mov ecx, 0x18
mov edx, 0x18
call fcn.1400478b0
lea r8, [0x140166cb0]
mov ecx, 0x19
mov edx, 0x19
call fcn.1400478b0
lea r8, [0x140166cc8]
mov ecx, 0x1a
mov edx, 0x1a
call fcn.1400478b0
lea r8, [0x140166ce0]
mov ecx, 0x1b
mov edx, 0x1b
call fcn.1400478b0
lea r8, [0x140166cf8]
mov ecx, 0x1c
mov edx, 0x1c
call fcn.1400478b0
lea r8, [0x140166d10]
mov ecx, 0x1d
mov edx, 0x1d
call fcn.1400478b0
lea r8, [0x140166d28]
mov ecx, 0x1e
mov edx, 0x1e
call fcn.1400478b0
lea r8, [0x140166d40]
mov ecx, 0x1f
mov edx, 0x1f
call fcn.1400478b0
lea r8, [0x140166860]
jmp 0x14000b0ca
lea r8, [0x1401668c0]
mov rcx, r14
jmp 0x14000b0fa
lea r8, [0x140166878]
mov rcx, rbx
mov rdx, r10
call fcn.1400478b0
lea r8, [0x1401668d8]
jmp 0x14000b0fa
lea r8, [0x140166890]
jmp 0x14000b0fa
lea r8, [0x1401668a8]
mov rdx, r9
call fcn.1400478b0
lea rcx, str.usize_overflow_when_calculating_b64_length
lea r8, [0x140166818]
mov edx, 0x2a
call fcn.14004c070
lea r8, [0x140166800]
mov rcx, r14
mov rdx, r9
call fcn.140047830
int3