Function at 0x1400bd0a0
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 rdi, rdx
mov r13, qword [rdx + 0x10]
movabs rdx, 0xaaaaaaaaaaaaaaab
mov rax, r13
mul rdx
mov rax, rdx
mov r14, rcx
shr rax, 1
lea rcx, [rax + rax*2]
mov edx, 4
mul rdx
mov r15, rax
seto al
mov r12, r13
sub r12, rcx
je 0x1400bd126
add r15, 4
setb cl
or al, cl
jne 0x1400bd12a
test r15, r15
je 0x1400bd144
call sub.KERNEL32.dll_GetProcessHeap
mov rcx, rax
mov edx, 8
mov r8, r15
call sub.KERNEL32.dll_HeapAlloc
mov rbp, rax
test rax, rax
jne 0x1400bd149
mov edx, 1
mov rcx, r15
call fcn.1400182a0
ud2
test al, al
je 0x1400bd0f5
lea rcx, [0x140266f24]
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov edx, 0x2d
call fcn.14009c3c0
ud2
mov ebp, 1
mov r10, qword [rdi]
xor ecx, ecx
mov r8, r13
sub r8, 0x1a
cmovb r8, rcx
mov edx, 0
cmp r13, 0x1b
jb 0x1400bd3ee
mov eax, 0x20
xor ecx, ecx
lea rdi, [0x140222445]
nop word cs:[rax + rax]
mov rdx, rax
lea rax, [rcx + 0x1a]
cmp rax, r13
ja 0x1400bd651
test rdx, rdx
je 0x1400bd65d
cmp rdx, r15
ja 0x1400bd674
mov rsi, qword [r10 + rcx]
bswap rsi
mov rax, rsi
shr rax, 0x3a
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x20], al
mov rax, rsi
shr rax, 0x34
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x1f], al
mov rax, rsi
shr rax, 0x2e
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x1e], al
mov rax, rsi
shr rax, 0x28
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x1d], al
mov rax, rsi
shr rax, 0x22
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x1c], al
mov rax, rsi
shr rax, 0x1c
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x1b], al
mov eax, esi
shr eax, 0x16
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x1a], al
shr esi, 0x10
and esi, 0x3f
movzx eax, byte [rsi + rdi]
mov byte [rbp + rdx - 0x19], al
mov rsi, qword [r10 + rcx + 6]
bswap rsi
mov rax, rsi
shr rax, 0x3a
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x18], al
mov rax, rsi
shr rax, 0x34
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x17], al
mov rax, rsi
shr rax, 0x2e
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x16], al
mov rax, rsi
shr rax, 0x28
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x15], al
mov rax, rsi
shr rax, 0x22
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x14], al
mov rax, rsi
shr rax, 0x1c
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x13], al
mov eax, esi
shr eax, 0x16
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x12], al
shr esi, 0x10
and esi, 0x3f
movzx eax, byte [rsi + rdi]
mov byte [rbp + rdx - 0x11], al
mov rsi, qword [r10 + rcx + 0xc]
bswap rsi
mov rax, rsi
shr rax, 0x3a
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0x10], al
mov rax, rsi
shr rax, 0x34
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0xf], al
mov rax, rsi
shr rax, 0x2e
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0xe], al
mov rax, rsi
shr rax, 0x28
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0xd], al
mov rax, rsi
shr rax, 0x22
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0xc], al
mov rax, rsi
shr rax, 0x1c
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0xb], al
mov eax, esi
shr eax, 0x16
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 0xa], al
shr esi, 0x10
and esi, 0x3f
movzx eax, byte [rsi + rdi]
mov byte [rbp + rdx - 9], al
mov rsi, qword [r10 + rcx + 0x12]
bswap rsi
mov rax, rsi
shr rax, 0x3a
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 8], al
mov rax, rsi
shr rax, 0x34
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 7], al
mov rax, rsi
shr rax, 0x2e
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 6], al
mov rax, rsi
shr rax, 0x28
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 5], al
mov rax, rsi
shr rax, 0x22
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 4], al
mov rax, rsi
shr rax, 0x1c
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 3], al
mov eax, esi
shr eax, 0x16
and eax, 0x3f
movzx eax, byte [rax + rdi]
mov byte [rbp + rdx - 2], al
shr esi, 0x10
and esi, 0x3f
movzx eax, byte [rsi + rdi]
mov byte [rbp + rdx - 1], al
add rcx, 0x18
lea rax, [rdx + 0x20]
cmp rcx, r8
jbe 0x1400bd180
mov r9, r13
sub r9, r12
cmp rcx, r9
jae 0x1400bd544
lea r8, [0x140222445]
nop word cs:[rax + rax]
nop
cmp rcx, 0xfffffffffffffffc
ja 0x1400bd67d
lea rsi, [rcx + 3]
cmp rsi, r13
ja 0x1400bd68f
cmp rdx, 0xfffffffffffffffc
je 0x1400bd6a4
lea r11, [rdx + 4]
cmp r11, r15
ja 0x1400bd6bd
movzx eax, byte [r10 + rcx]
mov rdi, rax
shr rdi, 2
movzx ebx, byte [rdi + r8]
mov byte [rbp + rdx], bl
shl eax, 4
and eax, 0x30
movzx edi, byte [r10 + rcx + 1]
mov rbx, rdi
shr rbx, 4
or rbx, rax
movzx eax, byte [r8 + rbx]
mov byte [rbp + rdx + 1], al
and edi, 0xf
movzx eax, byte [r10 + rcx + 2]
mov rcx, rax
shr rcx, 6
lea rcx, [rcx + rdi*4]
movzx ecx, byte [r8 + rcx]
mov byte [rbp + rdx + 2], cl
and eax, 0x3f
movzx eax, byte [rax + r8]
mov byte [rbp + rdx + 3], al
mov rdx, r11
mov rcx, rsi
cmp rsi, r9
jb 0x1400bd410
cmp r12, 1
je 0x1400bd551
cmp r12, 2
jne 0x1400bd59f
cmp r9, r13
jae 0x1400bd732
cmp r11, r15
jae 0x1400bd73b
movzx edi, byte [r10 + r9]
mov rax, rdi
shr rax, 2
lea rdx, [0x140222445]
mov al, byte [rax + rdx]
mov byte [rbp + r11], al
add r9, 1
cmp r9, r13
jae 0x1400bd744
mov rcx, r11
or rcx, 1
cmp rcx, r15
jae 0x1400bd74d
shl edi, 4
and edi, 0x30
movzx esi, byte [r10 + r9]
mov rax, rsi
shr rax, 4
or rax, rdi
mov al, byte [rdx + rax]
mov byte [rbp + rcx], al
mov rcx, r11
or rcx, 2
cmp rcx, r15
jae 0x1400bd756
and esi, 0xf
mov al, byte [rdx + rsi*4]
mov byte [rbp + rcx], al
or r11, 3
jmp 0x1400bd59f
mov r11, rdx
cmp r12, 1
jne 0x1400bd4b4
cmp r9, r13
jae 0x1400bd75f
cmp r11, r15
jae 0x1400bd773
movzx edx, byte [r10 + r9]
mov rax, rdx
shr rax, 2
lea rdi, [0x140222445]
mov al, byte [rax + rdi]
mov byte [rbp + r11], al
mov rcx, r11
or rcx, 1
cmp rcx, r15
jae 0x1400bd77f
shl edx, 4
and edx, 0x30
mov al, byte [rdx + rdi]
mov byte [rbp + rcx], al
or r11, 2
mov rcx, r15
sub rcx, r11
jb 0x1400bd6d5
xor r12, 3
mov eax, r12d
mov edx, 0xaaaaaaab
imul rdx, rax
shr rdx, 0x21
lea eax, [rdx + rdx*2]
sub r12d, eax
je 0x1400bd61e
lea rdx, [r11 + rbp]
xor edi, edi
nop dword [rax]
cmp rcx, rdi
je 0x1400bd640
mov byte [rdx + rdi], 0x3d
add rdi, 1
cmp r12, rdi
jne 0x1400bd5d0
add r11, r12
jb 0x1400bd626
lea rcx, [rsp + 0x28]
mov rdx, rbp
mov r8, r15
call fcn.140023550
cmp dword [rsp + 0x28], 1
je 0x1400bd6e9
mov qword [r14], rbp
mov qword [r14 + 8], r15
mov qword [r14 + 0x10], r15
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor r12d, r12d
add r11, r12
jae 0x1400bd5e7
lea rcx, str.usize_overflow_when_calculating_b64_length
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov edx, 0x2a
call fcn.140022520
ud2
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rdx, rcx
call fcn.14001fa20
ud2
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rcx, rax
jmp 0x1400bd69a
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rcx, 0xffffffffffffffe0
xor edx, edx
call fcn.140021960
ud2
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
jmp 0x1400bd6c8
lea rdx, [rcx + 3]
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
call fcn.140021960
ud2
add rcx, 3
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rdx, r13
call fcn.1400201a0
ud2
add rdx, 4
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rcx, 0xfffffffffffffffc
call fcn.140021960
ud2
add rdx, 4
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rcx, rdx
mov rdx, r15
call fcn.1400201a0
ud2
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rcx, r11
mov rdx, r15
call fcn.1400214d0
ud2
movups xmm0, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x38], r15
movups xmmword [rsp + 0x40], xmm0
lea rax, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov qword [rsp + 0x20], rax
lea rcx, str.Invalid_UTF8
lea r9, [0x140266f80]
lea r8, [rsp + 0x28]
mov edx, recv
call fcn.140022590
ud2
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
jmp 0x1400bd766
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
jmp 0x1400bd77a
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
jmp 0x1400bd766
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
jmp 0x1400bd786
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
jmp 0x1400bd786
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rcx, r9
mov rdx, r13
call fcn.14001fa20
ud2
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rcx, r11
jmp 0x1400bd786
lea r8, str.C:Usersdarkarp.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.0_srcencode.rsinteger_overflow_when_calculating_buffer_size
mov rdx, r15
call fcn.14001fa20
ud2