Function at 0x140031a20
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov r14, rdx
movabs rdx, 0xaaaaaaaaaaaaaaab
mov rax, r9
mul rdx
mov rax, r9
shr rax, 0x3e
cmp eax, 2
ja 0x1400320d9
mov r15, r9
mov r12, r8
mov rdi, rdx
shr rdi, 1
lea rax, [rdi + rdi*2]
mov rbp, r9
sub rbp, rax
shl rdi, 2
test rbp, rbp
je 0x140031a98
cmp byte [r14], 0
je 0x140031a88
cmp rdi, 0xfffffffffffffffc
je 0x1400320d9
add rdi, 4
jmp 0x140031a98
xor eax, eax
cmp rbp, 1
sete al
xor rax, 3
or rdi, rax
test rdi, rdi
js 0x1400320f1
mov qword [rsp + 0x60], rcx
je 0x140031ac8
mov ecx, 8
mov rdx, rdi
call fcn.14008b3c0
test rax, rax
je 0x1400320fb
mov rsi, rax
mov qword [rsp + 0x30], rdi
jmp 0x140031ad6
mov esi, 1
mov qword [rsp + 0x30], 0
xor eax, eax
mov r9, r15
mov ecx, 0
sub r9, 0x1a
cmovb r9, rax
jbe 0x140031deb
mov eax, 0x20
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
xor ecx, ecx
nop dword [rax]
lea rdx, [rcx + 0x1a]
cmp rdx, r15
ja 0x140032088
test rax, rax
je 0x140032091
cmp rax, rdi
ja 0x140032080
mov rdx, qword [r12 + rcx]
bswap rdx
mov r10, rdx
shr r10, 0x3a
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x20], r10b
mov r10, rdx
shr r10, 0x34
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x1f], r10b
mov r10, rdx
shr r10, 0x2e
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x1e], r10b
mov r10, rdx
shr r10, 0x28
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x1d], r10b
mov r10, rdx
shr r10, 0x22
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x1c], r10b
mov r10, rdx
shr r10, 0x1c
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x1b], r10b
mov r10d, edx
shr r10d, 0x16
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x1a], r10b
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [r14 + rdx + 3]
mov byte [rsi + rax - 0x19], dl
mov rdx, qword [r12 + rcx + 6]
bswap rdx
mov r10, rdx
shr r10, 0x3a
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x18], r10b
mov r10, rdx
shr r10, 0x34
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x17], r10b
mov r10, rdx
shr r10, 0x2e
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x16], r10b
mov r10, rdx
shr r10, 0x28
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x15], r10b
mov r10, rdx
shr r10, 0x22
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x14], r10b
mov r10, rdx
shr r10, 0x1c
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x13], r10b
mov r10d, edx
shr r10d, 0x16
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x12], r10b
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [r14 + rdx + 3]
mov byte [rsi + rax - 0x11], dl
mov rdx, qword [r12 + rcx + 0xc]
bswap rdx
mov r10, rdx
shr r10, 0x3a
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0x10], r10b
mov r10, rdx
shr r10, 0x34
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0xf], r10b
mov r10, rdx
shr r10, 0x2e
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0xe], r10b
mov r10, rdx
shr r10, 0x28
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0xd], r10b
mov r10, rdx
shr r10, 0x22
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0xc], r10b
mov r10, rdx
shr r10, 0x1c
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0xb], r10b
mov r10d, edx
shr r10d, 0x16
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 0xa], r10b
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [r14 + rdx + 3]
mov byte [rsi + rax - 9], dl
mov rdx, qword [r12 + rcx + 0x12]
bswap rdx
mov r10, rdx
shr r10, 0x3a
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 8], r10b
mov r10, rdx
shr r10, 0x34
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 7], r10b
mov r10, rdx
shr r10, 0x2e
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 6], r10b
mov r10, rdx
shr r10, 0x28
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 5], r10b
mov r10, rdx
shr r10, 0x22
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 4], r10b
mov r10, rdx
shr r10, 0x1c
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 3], r10b
mov r10d, edx
shr r10d, 0x16
and r10d, 0x3f
movzx r10d, byte [r14 + r10 + 3]
mov byte [rsi + rax - 2], r10b
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [r14 + rdx + 3]
mov byte [rsi + rax - 1], dl
add rcx, 0x18
add rax, 0x20
cmp rcx, r9
jbe 0x140031b00
add rax, 0xffffffffffffffe0
mov r9, r15
sub r9, rbp
cmp rcx, r9
jae 0x140031f42
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
nop word cs:[rax + rax]
cmp rcx, 0xfffffffffffffffc
ja 0x1400320a6
lea r10, [rcx + 3]
cmp r10, r15
ja 0x1400320bb
lea rdx, [rax + 4]
cmp rax, 0xfffffffffffffffb
ja 0x14003209c
cmp rdx, rdi
ja 0x1400320a1
movzx r11d, byte [r12 + rcx]
mov r13d, r11d
shr r13d, 2
movzx r13d, byte [r14 + r13 + 3]
mov byte [rsi + rax], r13b
movzx ebx, byte [r12 + rcx + 1]
shl r11b, 4
mov r13d, ebx
shr r13b, 4
or r13b, r11b
movzx r11d, r13b
and r11d, 0x3f
movzx r11d, byte [r14 + r11 + 3]
mov byte [rsi + rax + 1], r11b
movzx ecx, byte [r12 + rcx + 2]
shl bl, 2
mov r11d, ecx
shr r11b, 6
or r11b, bl
movzx r11d, r11b
and r11d, 0x3f
movzx r11d, byte [r14 + r11 + 3]
mov byte [rsi + rax + 2], r11b
and ecx, 0x3f
movzx ecx, byte [r14 + rcx + 3]
mov byte [rsi + rax + 3], cl
mov rcx, r10
mov rax, rdx
cmp r10, r9
jb 0x140031e10
cmp rbp, 1
je 0x140031f4f
cmp rbp, 2
jne 0x140031f92
cmp rdx, rdi
jae 0x140032165
movzx ecx, byte [r12 + r9]
mov eax, ecx
shr eax, 2
movzx eax, byte [r14 + rax + 3]
mov byte [rsi + rdx], al
inc r9
cmp r9, r15
jae 0x14003217d
lea rax, [rdx + 1]
cmp rax, rdi
jae 0x140032192
movzx eax, byte [r12 + r9]
mov r8d, eax
shr r8b, 4
shl cl, 4
or cl, r8b
movzx ecx, cl
and ecx, 0x3f
movzx ecx, byte [r14 + rcx + 3]
mov byte [rsi + rdx + 1], cl
lea rcx, [rdx + 2]
cmp rcx, rdi
jae 0x1400321a1
shl al, 2
and al, 0x3c
mov r8d, 3
jmp 0x140031f83
mov rdx, rax
cmp rbp, 1
jne 0x140031ec7
cmp rdx, rdi
jae 0x140032171
movzx eax, byte [r12 + r9]
mov ecx, eax
shr ecx, 2
movzx ecx, byte [r14 + rcx + 3]
mov byte [rsi + rdx], cl
lea rcx, [rdx + 1]
cmp rcx, rdi
jae 0x140032189
shl al, 4
and al, 0x30
mov r8d, 2
movzx eax, al
movzx eax, byte [r14 + rax + 3]
mov byte [rsi + rcx], al
add rdx, r8
mov rcx, rdx
cmp byte [r14], 1
jne 0x140031ffa
mov rdx, rdi
sub rdx, rcx
jb 0x140032108
mov eax, ecx
neg eax
and eax, 3
je 0x14003205c
lea r8, [0x1400aea90]
cmp rdi, rcx
je 0x140032160
mov byte [rsi + rcx], 0x3d
cmp eax, 1
je 0x140031ffc
cmp rdx, 1
je 0x140032160
mov byte [rsi + rcx + 1], 0x3d
cmp eax, 2
je 0x140031ffc
mov r15, rdx
cmp rdx, 2
je 0x1400321ae
mov byte [rsi + rcx + 2], 0x3d
add rcx, rax
jae 0x140032001
jmp 0x140032063
xor eax, eax
add rcx, rax
jb 0x140032063
lea rcx, [rsp + 0x38]
mov rdx, rsi
mov r8, rdi
call fcn.140011620
test byte [rsp + 0x38], 1
je 0x140032036
mov rcx, qword [rsp + 0x30]
mov rax, rcx
neg rax
jno 0x14003211c
mov rax, rsi
mov rsi, rdi
mov rdi, qword [rsp + 0x40]
jmp 0x14003203b
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x60]
mov qword [rcx], rax
mov qword [rcx + 8], rsi
mov qword [rcx + 0x10], rdi
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor eax, eax
add rcx, rax
jae 0x140032001
lea rcx, str.usize_overflow_when_calculating_b64_length_home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_encode.rs
lea r8, [0x1400b4e48]
mov edx, 0x2a
call fcn.140012970
jmp 0x1400321b9
mov rdx, rax
mov r15, rdi
jmp 0x1400320c9
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
jmp 0x1400320c9
mov rcx, 0xffffffffffffffe0
xor edx, edx
jmp 0x1400320b1
mov rcx, rax
jmp 0x1400320b1
mov r15, rdi
jmp 0x1400320c9
lea rdx, [rcx + 3]
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
call fcn.140012350
jmp 0x1400321b9
add rcx, 3
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
mov rdx, rcx
mov rcx, rdx
mov rdx, r15
call fcn.140010560
jmp 0x1400321b9
lea rcx, [0x1400b4bb2]
lea r8, [0x1400b4c40]
mov edx, 0x2d
call fcn.140012970
xor ecx, ecx
mov rdx, rdi
call fcn.14000bb40
mov ecx, 1
mov rdx, rdi
call fcn.14000bb40
lea r8, [0x1400b4e60]
mov rdx, rdi
call fcn.14000fb10
jmp 0x1400321b9
movups xmm0, xmmword [rsp + 0x40]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rdi
movups xmmword [rsp + 0x50], xmm0
lea rax, [0x1400b4c68]
mov qword [rsp + 0x20], rax
lea rcx, str.Invalid_UTF8
lea r9, [0x1400b4ae8]
lea r8, [rsp + 0x38]
mov edx, 0xc
call fcn.140011d20
jmp 0x1400321b9
mov r15, rdx
jmp 0x1400321ae
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
mov r15, rdi
jmp 0x1400321ae
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
mov r15, rdi
jmp 0x1400321ae
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
mov rdx, r9
jmp 0x1400321ae
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
jmp 0x1400321a8
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
mov rdx, rax
mov r15, rdi
jmp 0x1400321ae
lea r8, str._home_medusa_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
mov rdx, rcx
mov r15, rdi
mov rcx, rdx
mov rdx, r15
call fcn.14000fb80
ud2