Function at 0x1400e8480
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 0x1400e8c3d
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 0x1400e84e4
cmp byte [rbx], 0
je 0x1400e84f3
add rsi, 4
jb 0x1400e8c3d
test rsi, rsi
jne 0x1400e8503
mov r14d, 1
xor esi, esi
jmp 0x1400e8549
xor eax, eax
cmp r13, 1
sete al
xor rax, 3
or rsi, rax
test rsi, rsi
js 0x1400e8c66
mov rcx, qword [0x1401e6138]
test rcx, rcx
jne 0x1400e8530
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x1400e8c57
mov rcx, rax
mov qword [0x1401e6138], rax
mov edx, 8
mov r8, rsi
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x1400e8c57
mov r14, rax
xor ecx, ecx
mov rax, r15
mov r8d, 0
sub rax, 0x1a
cmovb rax, rcx
jbe 0x1400e8866
xor edx, edx
xor r8d, r8d
nop word [rax + rax]
lea rcx, [r8 + 0x1a]
cmp rcx, r15
ja 0x1400e8bf3
mov rcx, rdx
add rcx, 0x20
jb 0x1400e8afc
cmp rcx, rsi
ja 0x1400e8c04
mov r9, qword [r12 + r8]
bswap r9
mov r10, r9
shr r10, 0x3a
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 1], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 2], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 3], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 4], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 5], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 6], r10b
shr r9d, 0x10
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rdx + 7], r9b
mov r9, qword [r12 + r8 + 6]
bswap r9
mov r10, r9
shr r10, 0x3a
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 8], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 9], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0xa], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0xb], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0xc], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0xd], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0xe], r10b
shr r9d, 0x10
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rdx + 0xf], r9b
mov r9, qword [r12 + r8 + 0xc]
bswap r9
mov r10, r9
shr r10, 0x3a
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x10], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x11], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x12], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x13], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x14], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x15], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x16], r10b
shr r9d, 0x10
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rdx + 0x17], r9b
mov r9, qword [r12 + r8 + 0x12]
bswap r9
mov r10, r9
shr r10, 0x3a
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x18], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x19], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x1a], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x1b], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x1c], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x1d], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rdx + 0x1e], r10b
shr r9d, 0x10
and r9d, 0x3f
movzx r9d, byte [rbx + r9 + 3]
mov byte [r14 + rdx + 0x1f], r9b
add r8, 0x18
add rdx, 0x20
cmp r8, rax
jbe 0x1400e8570
mov rdx, r15
sub rdx, r13
cmp r8, rdx
jae 0x1400e8a2a
mov r9, r8
nop dword [rax + rax]
add r9, 3
jb 0x1400e8b16
cmp r9, r15
ja 0x1400e8c15
mov rax, rcx
add rax, 4
jb 0x1400e8b30
cmp rax, rsi
ja 0x1400e8c29
movzx r10d, byte [r12 + r8]
mov r11d, r10d
shr r11d, 2
movzx r11d, byte [rbx + r11 + 3]
mov byte [r14 + rcx], r11b
movzx r11d, byte [r12 + r8 + 1]
shl r10b, 4
mov ebp, r11d
shr bpl, 4
or bpl, r10b
movzx r10d, bpl
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rcx + 1], r10b
movzx r8d, byte [r12 + r8 + 2]
shl r11b, 2
mov r10d, r8d
shr r10b, 6
or r10b, r11b
movzx r10d, r10b
and r10d, 0x3f
movzx r10d, byte [rbx + r10 + 3]
mov byte [r14 + rcx + 2], r10b
and r8d, 0x3f
movzx r8d, byte [rbx + r8 + 3]
mov byte [r14 + rcx + 3], r8b
add rcx, 4
mov r8, r9
cmp r9, rdx
jb 0x1400e8880
cmp r13, 1
je 0x1400e8a37
cmp r13, 2
jne 0x1400e89c2
cmp rax, rsi
jae 0x1400e8b5b
movzx r8d, byte [r12 + rdx]
mov ecx, r8d
shr ecx, 2
movzx ecx, byte [rbx + rcx + 3]
mov byte [r14 + rax], cl
inc rdx
je 0x1400e8b78
cmp rdx, r15
jae 0x1400e8ba3
lea rcx, [rax + 1]
cmp rcx, rsi
jae 0x1400e8bb7
movzx edx, byte [r12 + rdx]
mov ecx, edx
shr cl, 4
shl r8b, 4
or r8b, cl
movzx ecx, r8b
and ecx, 0x3f
movzx ecx, byte [rbx + rcx + 3]
mov byte [r14 + rax + 1], cl
lea rcx, [rax + 2]
cmp rcx, rsi
jae 0x1400e8bc8
and edx, 0xf
movzx ecx, byte [rbx + rdx*4 + 3]
mov byte [r14 + rax + 2], cl
add rax, 3
jb 0x1400e8bd9
cmp byte [rbx], 0
je 0x1400e8a7d
mov rcx, rsi
sub rcx, rax
jb 0x1400e8c6d
mov edx, eax
neg edx
and edx, 3
je 0x1400e8adb
cmp rsi, rax
je 0x1400e8b4a
mov byte [r14 + rax], 0x3d
cmp edx, 1
je 0x1400e8a7f
cmp rcx, 1
je 0x1400e8b4a
mov byte [r14 + rax + 1], 0x3d
cmp edx, 2
je 0x1400e8a7f
cmp rcx, 2
je 0x1400e8b4a
mov byte [r14 + rax + 2], 0x3d
add rax, rdx
jae 0x1400e8a84
jmp 0x1400e8ae2
mov rax, rcx
cmp r13, 1
jne 0x1400e8936
cmp rax, rsi
jae 0x1400e8b64
movzx edx, byte [r12 + rdx]
mov ecx, edx
shr ecx, 2
movzx ecx, byte [rbx + rcx + 3]
mov byte [r14 + rax], cl
lea rcx, [rax + 1]
cmp rcx, rsi
jae 0x1400e8b92
shl edx, 4
and edx, 0x30
movzx ecx, byte [rbx + rdx + 3]
mov byte [r14 + rax + 1], cl
add rax, 2
cmp byte [rbx], 0
jne 0x1400e89cb
xor edx, edx
add rax, rdx
jb 0x1400e8ae2
lea rcx, [rsp + 0x30]
mov rdx, r14
mov r8, rsi
call fcn.1400057a0
cmp qword [rsp + 0x30], 0
je 0x1400e8abf
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 0x1400e8c81
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 edx, edx
add rax, rdx
jae 0x1400e8a84
lea rcx, str.usize_overflow_when_calculating_b64_length
lea r8, str._Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_encode.rs
mov edx, 0x2a
call fcn.140008340
ud2
lea rcx, str.attempt_to_add_with_overflow_Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
lea r8, [0x140147a08]
mov edx, 0x1c
call fcn.140004ed0
ud2
lea rcx, str.attempt_to_add_with_overflow_Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
lea r8, [0x140147990]
mov edx, 0x1c
call fcn.140004ed0
ud2
lea rcx, str.attempt_to_add_with_overflow_Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
lea r8, [0x1401479c0]
mov edx, 0x1c
call fcn.140004ed0
ud2
lea r8, str._Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_encode.rs
mov rdx, rcx
call fcn.140004230
ud2
lea r8, [0x1401478d0]
jmp 0x1400e8b6b
lea r8, [0x140147960]
mov rcx, rax
mov rdx, rsi
call fcn.140004230
ud2
lea rcx, str.attempt_to_add_with_overflow_Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
lea r8, [0x1401478e8]
mov edx, 0x1c
call fcn.140004ed0
ud2
lea r8, [0x140147978]
mov rdx, rsi
call fcn.140004230
ud2
lea r8, [0x140147900]
mov rcx, rdx
mov rdx, r15
call fcn.140004230
ud2
lea r8, [0x140147918]
mov rdx, rsi
call fcn.140004230
ud2
lea r8, [0x140147930]
mov rdx, rsi
call fcn.140004230
ud2
lea rcx, str.attempt_to_add_with_overflow_Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_general_purpose_mod.rs
lea r8, [0x140147948]
mov edx, 0x1c
call fcn.140004ed0
ud2
lea r8, [0x1401479f0]
mov rdx, r15
call fcn.140004b30
ud2
lea r8, [0x140147a20]
mov rdx, rsi
call fcn.140004b30
ud2
lea r8, [0x1401479a8]
mov rcx, r9
mov rdx, r15
call fcn.140004b30
ud2
lea r8, [0x1401479d8]
mov rcx, rax
mov rdx, rsi
call fcn.140004b30
ud2
lea rcx, str.integer_overflow_when_calculating_buffer_size_Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_engine_mod.rs
lea r8, [0x1401a7520]
mov edx, 0x2d
call fcn.140008340
ud2
mov ecx, 1
mov rdx, rsi
call fcn.140002ac0
ud2
call fcn.140002a80
ud2
lea r8, str._Users_caojian_.cargo_registry_src_index.crates.io_6f17d22bba15001f_base64_0.21.7_src_encode.rs
mov rcx, rax
mov rdx, rsi
call fcn.1400041b0
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, [0x1401a7548]
mov qword [rsp + 0x20], rax
lea rcx, str.Invalid_UTF8
lea r9, [0x1401a7470]
lea r8, [rsp + 0x30]
mov edx, 0xc
call fcn.140006510
ud2