Function at 0x1401d77a0
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov ebp, r8d
mov r14, rdx
mov r15, qword [rdx + 0x10]
movabs rdx, 0xaaaaaaaaaaaaaaab
mov rax, r15
mul rdx
mov rdi, rdx
shr rdi, 1
lea rax, [rdi + rdi*2]
shl rdi, 2
mov r13, r15
sub r13, rax
mov qword [rsp + 0x80], rcx
je 0x1401d7820
test bpl, 1
jne 0x1401d7831
mov eax, 2
cmp r13, 1
je 0x1401d780b
cmp r13, 2
jne 0x1401d7fcd
mov eax, 3
mov rdx, r15
shr rdx, 0x3e
cmp edx, 3
jae 0x1401d7f0a
or rdi, rax
jmp 0x1401d7850
mov rax, r15
shr rax, 0x3e
cmp eax, 3
jb 0x1401d784b
jmp 0x1401d7f0a
mov rax, r15
shr rax, 0x3e
cmp eax, 3
jae 0x1401d7f0a
add rdi, 4
jb 0x1401d7f0a
test rdi, rdi
je 0x1401d7898
test rdi, rdi
js 0x1401d7f5c
mov rcx, qword [0x14036c198]
test rcx, rcx
jne 0x1401d787d
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1401d7f2a
mov rcx, rax
mov qword [0x14036c198], rax
mov edx, 8
mov r8, rdi
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x1401d7f2a
mov rbx, rax
jmp 0x1401d789f
mov ebx, 1
xor edi, edi
mov r9, qword [r14]
mov eax, ebp
and eax, 0xffffff
cmp eax, 0x10000
lea rcx, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
lea rax, [0x140290bf8]
cmovb rax, rcx
xor r10d, r10d
mov r11, r15
mov ecx, 0
sub r11, 0x1a
cmovb r11, r10
mov qword [rsp + 0x38], r14
jbe 0x1401d7b7f
mov r10d, 0x20
lea r8, [0x140290d40]
xor ecx, ecx
nop dword [rax]
lea rdx, [rcx + 0x1a]
cmp rdx, r15
ja 0x1401d7e89
test r10, r10
je 0x1401d7e97
cmp r10, rdi
ja 0x1401d7ea7
mov rdx, qword [r9 + rcx]
bswap rdx
mov rsi, rdx
shr rsi, 0x3a
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x20], sil
mov rsi, rdx
shr rsi, 0x34
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x1f], sil
mov rsi, rdx
shr rsi, 0x2e
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x1e], sil
mov rsi, rdx
shr rsi, 0x28
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x1d], sil
mov rsi, rdx
shr rsi, 0x22
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x1c], sil
mov rsi, rdx
shr rsi, 0x1c
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x1b], sil
mov esi, edx
shr esi, 0x16
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x1a], sil
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [rax + rdx]
mov byte [rbx + r10 - 0x19], dl
mov rdx, qword [r9 + rcx + 6]
bswap rdx
mov rsi, rdx
shr rsi, 0x3a
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x18], sil
mov rsi, rdx
shr rsi, 0x34
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x17], sil
mov rsi, rdx
shr rsi, 0x2e
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x16], sil
mov rsi, rdx
shr rsi, 0x28
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x15], sil
mov rsi, rdx
shr rsi, 0x22
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x14], sil
mov rsi, rdx
shr rsi, 0x1c
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x13], sil
mov esi, edx
shr esi, 0x16
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x12], sil
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [rax + rdx]
mov byte [rbx + r10 - 0x11], dl
mov rdx, qword [r9 + rcx + 0xc]
bswap rdx
mov rsi, rdx
shr rsi, 0x3a
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0x10], sil
mov rsi, rdx
shr rsi, 0x34
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0xf], sil
mov rsi, rdx
shr rsi, 0x2e
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0xe], sil
mov rsi, rdx
shr rsi, 0x28
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0xd], sil
mov rsi, rdx
shr rsi, 0x22
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0xc], sil
mov rsi, rdx
shr rsi, 0x1c
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0xb], sil
mov esi, edx
shr esi, 0x16
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 0xa], sil
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [rax + rdx]
mov byte [rbx + r10 - 9], dl
mov rdx, qword [r9 + rcx + 0x12]
bswap rdx
mov rsi, rdx
shr rsi, 0x3a
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 8], sil
mov rsi, rdx
shr rsi, 0x34
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 7], sil
mov rsi, rdx
shr rsi, 0x2e
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 6], sil
mov rsi, rdx
shr rsi, 0x28
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 5], sil
mov rsi, rdx
shr rsi, 0x22
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 4], sil
mov rsi, rdx
shr rsi, 0x1c
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 3], sil
mov esi, edx
shr esi, 0x16
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 - 2], sil
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [rax + rdx]
mov byte [rbx + r10 - 1], dl
add rcx, 0x18
add r10, 0x20
cmp rcx, r11
jbe 0x1401d78f0
add r10, 0xffffffffffffffe0
mov r8d, ebp
mov r11, r15
mov r12, r13
sub r11, r13
cmp rcx, r11
jae 0x1401d7c47
lea rdx, [0x140290d10]
mov qword [rsp + 0x30], rdx
cmp rcx, 0xfffffffffffffffc
ja 0x1401d7eb4
lea r13, [rcx + 3]
cmp r13, r15
ja 0x1401d7ec6
lea rdx, [r10 + 4]
cmp r10, 0xfffffffffffffffb
ja 0x1401d7ef3
cmp rdx, rdi
ja 0x1401d7eaf
movzx esi, byte [r9 + rcx]
mov r14d, esi
shr r14d, 2
movzx r14d, byte [rax + r14]
mov byte [rbx + r10], r14b
movzx ebp, byte [r9 + rcx + 1]
shl sil, 4
mov r14d, ebp
shr r14b, 4
or r14b, sil
movzx esi, r14b
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 + 1], sil
movzx ecx, byte [r9 + rcx + 2]
shl bpl, 2
mov esi, ecx
shr sil, 6
or sil, bpl
movzx esi, sil
and esi, 0x3f
movzx esi, byte [rax + rsi]
mov byte [rbx + r10 + 2], sil
and ecx, 0x3f
movzx ecx, byte [rax + rcx]
mov byte [rbx + r10 + 3], cl
mov rcx, r13
mov r10, rdx
cmp r13, r11
jb 0x1401d7ba0
jmp 0x1401d7c4a
mov rdx, r10
mov r10, r12
cmp r12, 1
je 0x1401d7cdd
cmp r10, 2
mov rsi, qword [rsp + 0x38]
mov r12d, r8d
jne 0x1401d7d2a
cmp rdx, rdi
jae 0x1401d7e30
movzx r8d, byte [r9 + r11]
mov ecx, r8d
shr ecx, 2
movzx ecx, byte [rax + rcx]
mov byte [rbx + rdx], cl
inc r11
cmp r11, r15
jae 0x1401d7e48
lea rcx, [rdx + 1]
cmp rcx, rdi
jae 0x1401d7e5d
movzx ecx, byte [r9 + r11]
mov r9d, ecx
shr r9b, 4
shl r8b, 4
or r8b, r9b
movzx r8d, r8b
and r8d, 0x3f
movzx r8d, byte [rax + r8]
mov byte [rbx + rdx + 1], r8b
lea r9, [rdx + 2]
cmp r9, rdi
jae 0x1401d7e6c
shl cl, 2
and cl, 0x3c
mov r8d, 3
jmp 0x1401d7d1c
cmp rdx, rdi
mov rsi, qword [rsp + 0x38]
jae 0x1401d7e3c
mov r12d, r8d
movzx ecx, byte [r9 + r11]
mov r8d, ecx
shr r8d, 2
movzx r8d, byte [rax + r8]
mov byte [rbx + rdx], r8b
lea r9, [rdx + 1]
cmp r9, rdi
jae 0x1401d7e54
shl cl, 4
and cl, 0x30
mov r8d, 2
movzx ecx, cl
movzx eax, byte [rax + rcx]
mov byte [rbx + r9], al
add rdx, r8
mov rcx, rdx
test r12b, 1
jne 0x1401d7d37
xor eax, eax
jmp 0x1401d7d94
mov rdx, rdi
sub rdx, rcx
jb 0x1401d7fbc
xor eax, eax
test r10, r10
je 0x1401d7d94
xor r10, 3
je 0x1401d7d94
lea r8, [0x140290d98]
cmp rdi, rcx
je 0x1401d7e2b
mov byte [rbx + rcx], 0x3d
cmp r10, 1
je 0x1401d7d91
cmp rdx, 1
je 0x1401d7e2b
mov byte [rbx + rcx + 1], 0x3d
cmp r10, 2
je 0x1401d7d91
mov r15, rdx
cmp rdx, 2
je 0x1401d7e79
mov byte [rbx + rcx + 2], 0x3d
mov rax, r10
add rcx, rax
jb 0x1401d7f3f
lea rcx, [rsp + 0x40]
mov rdx, rbx
mov r8, rdi
call fcn.140041630
cmp qword [rsp + 0x40], 0
je 0x1401d7dd8
mov rax, qword [rsp + 0x48]
movzx ecx, byte [rsp + 0x50]
mov edx, dword [rsp + 0x51]
mov dword [rsp + 0x70], edx
mov edx, dword [rsp + 0x54]
mov dword [rsp + 0x73], edx
cmp cl, 2
jne 0x1401d7f69
mov rax, qword [rsp + 0x80]
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdi
cmp qword [rsi + 8], 0
je 0x1401d7e16
mov r8, qword [rsi]
mov rcx, qword [0x14036c198]
xor edx, edx
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14027f164
nop
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r15, rdx
jmp 0x1401d7e79
lea r8, [0x140290c68]
mov r15, rdi
jmp 0x1401d7e79
lea r8, [0x140290cc8]
mov r15, rdi
jmp 0x1401d7e79
lea r8, [0x140290c80]
mov rdx, r11
jmp 0x1401d7e79
lea r8, [0x140290ce0]
jmp 0x1401d7e73
lea r8, [0x140290c98]
mov rdx, rcx
mov r15, rdi
jmp 0x1401d7e79
lea r8, [0x140290cb0]
mov rdx, r9
mov r15, rdi
mov rcx, rdx
mov rdx, r15
call fcn.14003d940
jmp 0x1401d802a
lea rax, [0x140290d28]
mov qword [rsp + 0x30], rax
jmp 0x1401d7ed9
mov qword [rsp + 0x30], r8
mov rcx, 0xffffffffffffffe0
xor edx, edx
jmp 0x1401d7ef6
mov qword [rsp + 0x30], r8
mov rdx, r10
mov r15, rdi
jmp 0x1401d7ed9
lea rdx, [rcx + 3]
lea rax, [0x140290cf8]
mov qword [rsp + 0x30], rax
jmp 0x1401d7ef6
add rcx, 3
lea rax, [0x140290cf8]
mov qword [rsp + 0x30], rax
mov rdx, rcx
mov rcx, rdx
mov rdx, r15
mov r8, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
call fcn.14003e430
jmp 0x1401d802a
mov rcx, r10
mov r8, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
call fcn.140041300
jmp 0x1401d802a
mov rsi, r14
lea rcx, str.integer_overflow_when_calculating_buffer_size_Users_ma__kiri_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.13.1_src_encode.rs
lea r8, [0x1402fca78]
mov edx, 0x2d
call fcn.1401e3cc0
jmp 0x1401d802a
mov rsi, r14
mov ecx, 1
mov rdx, rdi
call fcn.140004360
jmp 0x1401d802a
lea rcx, str.usize_overflow_when_calculating_b64_length
lea r8, [0x140290c50]
mov edx, 0x2a
call fcn.140044220
jmp 0x1401d802a
mov rsi, r14
call fcn.140004320
jmp 0x1401d802a
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rax
mov byte [rsp + 0x60], cl
mov eax, dword [rsp + 0x70]
mov ecx, dword [rsp + 0x73]
mov dword [rsp + 0x61], eax
mov dword [rsp + 0x64], ecx
lea rax, [0x1402fcaa0]
mov qword [rsp + 0x20], rax
lea rcx, str.Invalid_UTF8
lea r9, [0x1402fc950]
lea r8, [rsp + 0x40]
mov edx, 0xc
call fcn.1400427e0
jmp 0x1401d802a
lea r8, [0x140290c38]
mov rdx, rdi
call fcn.14003d8c0
jmp 0x1401d802a
mov rsi, r14
lea rax, str.X_r__
mov qword [rsp + 0x70], rax
lea rax, [0x14025a2b0]
mov qword [rsp + 0x78], rax
lea rax, str.internal_error:_entered_unreachable_code:
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 1
mov qword [rsp + 0x60], 0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 1
lea rdx, [0x140290d80]
lea rcx, [rsp + 0x40]
call fcn.14003d630
ud2