Function at 0x5c7c20
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 rbx, rdx
mov rdi, rcx
movabs rcx, 0xaaaaaaaaaaaaaaab
mov rax, r9
mul rcx
mov rax, r9
shr rax, 0x3e
cmp eax, 2
ja 0x5c836b
mov r15, r9
mov r12, r8
mov rsi, rdx
shr rsi, 1
lea rax, [rsi + rsi*2]
mov r13, r9
sub r13, rax
shl rsi, 2
test r13, r13
je 0x5c7c84
cmp byte [rbx], 0
je 0x5c7c93
add rsi, 4
jb 0x5c836b
test rsi, rsi
jne 0x5c7ca3
mov r14d, 1
xor esi, esi
jmp 0x5c7ce9
xor eax, eax
cmp r13, 1
sete al
xor rax, 3
or rsi, rax
test rsi, rsi
js 0x5c8394
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x5c7cd0
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x5c8385
mov rcx, rax
mov qword [0x009bf100], rax
mov edx, 8
mov r8, rsi
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x5c8385
mov r14, rax
xor ecx, ecx
mov r8, r15
mov eax, 0
sub r8, 0x1a
cmovb r8, rcx
jbe 0x5c7ffb
mov ecx, 0x20
xor eax, eax
nop dword [rax + rax]
lea rdx, [rax + 0x1a]
cmp rdx, r15
ja 0x5c82e5
test rcx, rcx
je 0x5c82f9
cmp rcx, rsi
ja 0x5c8310
mov rdx, qword [r12 + rax]
bswap rdx
mov r9, rdx
shr r9, 0x3a
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x20], r9b
mov r9, rdx
shr r9, 0x34
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x1f], r9b
mov r9, rdx
shr r9, 0x2e
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x1e], r9b
mov r9, rdx
shr r9, 0x28
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x1d], r9b
mov r9, rdx
shr r9, 0x22
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x1c], r9b
mov r9, rdx
shr r9, 0x1c
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x1b], r9b
mov r9d, edx
shr r9d, 0x16
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x1a], r9b
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [rbx + rdx + 3]
mov byte [r14 + rcx - 0x19], dl
mov rdx, qword [r12 + rax + 6]
bswap rdx
mov r9, rdx
shr r9, 0x3a
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x18], r9b
mov r9, rdx
shr r9, 0x34
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x17], r9b
mov r9, rdx
shr r9, 0x2e
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x16], r9b
mov r9, rdx
shr r9, 0x28
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x15], r9b
mov r9, rdx
shr r9, 0x22
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x14], r9b
mov r9, rdx
shr r9, 0x1c
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x13], r9b
mov r9d, edx
shr r9d, 0x16
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x12], r9b
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [rbx + rdx + 3]
mov byte [r14 + rcx - 0x11], dl
mov rdx, qword [r12 + rax + 0xc]
bswap rdx
mov r9, rdx
shr r9, 0x3a
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0x10], r9b
mov r9, rdx
shr r9, 0x34
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0xf], r9b
mov r9, rdx
shr r9, 0x2e
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0xe], r9b
mov r9, rdx
shr r9, 0x28
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0xd], r9b
mov r9, rdx
shr r9, 0x22
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0xc], r9b
mov r9, rdx
shr r9, 0x1c
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0xb], r9b
mov r9d, edx
shr r9d, 0x16
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 0xa], r9b
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [rbx + rdx + 3]
mov byte [r14 + rcx - 9], dl
mov rdx, qword [r12 + rax + 0x12]
bswap rdx
mov r9, rdx
shr r9, 0x3a
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 8], r9b
mov r9, rdx
shr r9, 0x34
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 7], r9b
mov r9, rdx
shr r9, 0x2e
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 6], r9b
mov r9, rdx
shr r9, 0x28
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 5], r9b
mov r9, rdx
shr r9, 0x22
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 4], r9b
mov r9, rdx
shr r9, 0x1c
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 3], r9b
mov r9d, edx
shr r9d, 0x16
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rcx - 2], r9b
shr edx, 0x10
and edx, 0x3f
movzx edx, byte [rbx + rdx + 3]
mov byte [r14 + rcx - 1], dl
add rax, 0x18
add rcx, 0x20
cmp rax, r8
jbe 0x5c7d10
add rcx, 0xffffffffffffffe0
mov r10, r15
sub r10, r13
cmp rax, r10
jae 0x5c8144
nop word [rax + rax]
lea r9, [rax + 3]
cmp rax, 0xfffffffffffffffc
ja 0x5c8321
cmp r9, r15
ja 0x5c8335
lea rdx, [rcx + 4]
cmp rcx, 0xfffffffffffffffb
ja 0x5c8349
cmp rdx, rsi
ja 0x5c8357
movzx r8d, byte [r12 + rax]
mov r11d, r8d
shr r11d, 2
movzx r11d, byte [rbx + r11 + 3]
mov byte [r14 + rcx], r11b
movzx r11d, byte [r12 + rax + 1]
shl r8b, 4
mov ebp, r11d
shr bpl, 4
or bpl, r8b
movzx r8d, bpl
and r8d, 0x3f
movzx r8d, byte [rbx + r8 + 3]
mov byte [r14 + rcx + 1], r8b
movzx eax, byte [r12 + rax + 2]
shl r11b, 2
mov r8d, eax
shr r8b, 6
or r8b, r11b
movzx r8d, r8b
and r8d, 0x3f
movzx r8d, byte [rbx + r8 + 3]
mov byte [r14 + rcx + 2], r8b
and eax, 0x3f
movzx eax, byte [rbx + rax + 3]
mov byte [r14 + rcx + 3], al
mov rax, r9
mov rcx, rdx
cmp r9, r10
jb 0x5c8010
cmp r13, 1
je 0x5c8151
cmp r13, 2
jne 0x5c8194
cmp rdx, rsi
jae 0x5c8281
movzx r8d, byte [r12 + r10]
mov eax, r8d
shr eax, 2
movzx eax, byte [rbx + rax + 3]
mov byte [r14 + rdx], al
inc r10
cmp r10, r15
jae 0x5c829e
lea rcx, [rdx + 1]
cmp rcx, rsi
jae 0x5c82c3
movzx eax, byte [r12 + r10]
mov ecx, eax
shr cl, 4
shl r8b, 4
or r8b, cl
movzx ecx, r8b
and ecx, 0x3f
movzx ecx, byte [rbx + rcx + 3]
mov byte [r14 + rdx + 1], cl
lea rcx, [rdx + 2]
cmp rcx, rsi
jae 0x5c82d4
shl al, 2
and al, 0x3c
mov r8d, 3
jmp 0x5c8185
mov rdx, rcx
cmp r13, 1
jne 0x5c80c8
cmp rdx, rsi
jae 0x5c828a
movzx eax, byte [r12 + r10]
mov ecx, eax
shr ecx, 2
movzx ecx, byte [rbx + rcx + 3]
mov byte [r14 + rdx], cl
lea rcx, [rdx + 1]
cmp rcx, rsi
jae 0x5c82b2
shl al, 4
and al, 0x30
mov r8d, 2
movzx eax, al
movzx eax, byte [rbx + rax + 3]
mov byte [r14 + rcx], al
add rdx, r8
cmp byte [rbx], 0
je 0x5c81f1
mov rcx, rsi
sub rcx, rdx
jb 0x5c839b
mov eax, edx
neg eax
and eax, 3
je 0x5c824f
cmp rsi, rdx
je 0x5c8270
mov byte [r14 + rdx], 0x3d
cmp eax, 1
je 0x5c81f3
cmp rcx, 1
je 0x5c8270
mov byte [r14 + rdx + 1], 0x3d
cmp eax, 2
je 0x5c81f3
cmp rcx, 2
je 0x5c8270
mov byte [r14 + rdx + 2], 0x3d
add rdx, rax
jae 0x5c81f8
jmp 0x5c8256
xor eax, eax
add rdx, rax
jb 0x5c8256
lea rcx, [rsp + 0x30]
mov rdx, r14
mov r8, rsi
call fcn.00450790
cmp qword [rsp + 0x30], 0
je 0x5c8233
mov rax, qword [rsp + 0x38]
movzx ecx, byte [rsp + 0x40]
mov edx, dword [rsp + 0x41]
mov dword [rsp + 0x28], edx
mov edx, dword [rsp + 0x44]
mov dword [rsp + 0x2b], edx
cmp cl, 2
jne 0x5c83af
mov qword [rdi], r14
mov qword [rdi + 8], rsi
mov qword [rdi + 0x10], rsi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor eax, eax
add rdx, rax
jae 0x5c81f8
lea rcx, str.usize_overflow_when_calculating_b64_length
lea r8, [0x0094bd68]
mov edx, 0x2a
call fcn.004537f0
ud2
lea r8, [0x0087a458]
mov rdx, rcx
call fcn.0044f190
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
jmp 0x5c8291
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rcx, rdx
mov rdx, rsi
call fcn.0044f190
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rcx, r10
mov rdx, r15
call fcn.0044f190
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rdx, rsi
call fcn.0044f190
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rdx, rsi
call fcn.0044f190
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rdx, rsi
call fcn.0044f190
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rcx, rdx
mov rdx, r15
call fcn.0044fa90
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rcx, 0xffffffffffffffe0
xor edx, edx
call fcn.004504c0
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rdx, rsi
call fcn.0044fa90
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rcx, rax
mov rdx, r9
call fcn.004504c0
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rcx, r9
mov rdx, r15
call fcn.0044fa90
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
call fcn.004504c0
ud2
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.5_src_engine_general_purpose_mod.rs
mov rcx, rdx
mov rdx, rsi
call fcn.0044fa90
ud2
lea rcx, [0x00938a44]
lea r8, [0x00938ad0]
mov edx, 0x2d
call fcn.004537f0
ud2
mov ecx, 1
mov rdx, rsi
call fcn.0044dfd0
ud2
call fcn.0044df90
ud2
lea r8, [0x0094bd20]
mov rcx, rdx
mov rdx, rsi
call fcn.0044f110
ud2
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x50], cl
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x2b]
mov dword [rsp + 0x51], eax
mov dword [rsp + 0x54], ecx
lea rax, [0x00938af8]
mov qword [rsp + 0x20], rax
lea rcx, str.Invalid_UTF8
lea r9, [0x00938238]
lea r8, [rsp + 0x30]
mov edx, 0xc
call fcn.00451990
ud2