Function at 0x140010550
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 r12, r8
mov r14, rdx
movabs rdx, 0xaaaaaaaaaaaaaaab
mov rax, r8
mul rdx
mov rax, rdx
mov rsi, rcx
shr rax, 1
lea rcx, [rax + rax*2]
mov edx, 4
mul rdx
mov r15, rax
seto al
mov rdx, r8
sub rdx, rcx
je 0x1400105f8
add r15, 4
setb cl
or al, cl
jne 0x1400105fc
test r15, r15
mov qword [rsp + 0x60], rdx
je 0x140010603
js 0x140010ca1
mov rcx, qword [0x14031a128]
test rcx, rcx
jne 0x1400105d4
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x1400105e9
mov rcx, rax
mov qword [0x14031a128], rax
mov edx, 8
mov r8, r15
call sub.kernel32.dll_HeapAlloc
mov r13, rax
test rax, rax
jne 0x140010609
mov edx, 1
mov rcx, r15
call fcn.1400270c0
ud2
test al, al
je 0x1400105a4
call fcn.140001820
ud2
mov r13d, 1
mov qword [rsp + 0x58], rsi
xor r9d, r9d
mov r10, r12
mov esi, 0
sub r10, 0x1a
cmovb r10, r9
jbe 0x1400108e2
lea rdi, [r13 + 0x1f]
xor eax, eax
lea rcx, str.attempt_to_add_with_overflowC:UsersUser.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.1_srcencode.rs
lea r8, [0x140223588]
lea r11, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
xor r9d, r9d
nop word cs:[rax + rax]
lea rsi, [r9 + 0x1a]
cmp rsi, r12
ja 0x140010c60
mov rsi, rax
add rsi, 0x20
jb 0x140010bb6
cmp rsi, r15
ja 0x140010c69
mov rbx, qword [r14 + r9]
bswap rbx
mov rbp, rbx
shr rbp, 0x3a
movzx edx, byte [rbp + r11]
mov byte [rdi + rax - 0x1f], dl
mov rdx, rbx
shr rdx, 0x34
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x1e], dl
mov rdx, rbx
shr rdx, 0x2e
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x1d], dl
mov rdx, rbx
shr rdx, 0x28
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x1c], dl
mov rdx, rbx
shr rdx, 0x22
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x1b], dl
mov rdx, rbx
shr rdx, 0x1c
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x1a], dl
mov edx, ebx
shr edx, 0x16
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x19], dl
shr ebx, 0x10
and ebx, 0x3f
movzx edx, byte [rbx + r11]
mov byte [rdi + rax - 0x18], dl
mov rbp, qword [r14 + r9 + 6]
bswap rbp
mov rdx, rbp
shr rdx, 0x3a
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x17], dl
mov rdx, rbp
shr rdx, 0x34
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x16], dl
mov rdx, rbp
shr rdx, 0x2e
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x15], dl
mov rdx, rbp
shr rdx, 0x28
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x14], dl
mov rdx, rbp
shr rdx, 0x22
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x13], dl
mov rdx, rbp
shr rdx, 0x1c
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x12], dl
mov edx, ebp
shr edx, 0x16
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0x11], dl
shr ebp, 0x10
and ebp, 0x3f
movzx edx, byte [rbp + r11]
mov byte [rdi + rax - 0x10], dl
mov rbp, qword [r14 + r9 + 0xc]
bswap rbp
mov rdx, rbp
shr rdx, 0x3a
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0xf], dl
mov rdx, rbp
shr rdx, 0x34
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0xe], dl
mov rdx, rbp
shr rdx, 0x2e
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0xd], dl
mov rdx, rbp
shr rdx, 0x28
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0xc], dl
mov rdx, rbp
shr rdx, 0x22
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0xb], dl
mov rdx, rbp
shr rdx, 0x1c
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 0xa], dl
mov edx, ebp
shr edx, 0x16
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 9], dl
shr ebp, 0x10
and ebp, 0x3f
movzx edx, byte [rbp + r11]
mov byte [rdi + rax - 8], dl
mov rbp, qword [r14 + r9 + 0x12]
bswap rbp
mov rdx, rbp
shr rdx, 0x3a
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 7], dl
mov rdx, rbp
shr rdx, 0x34
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 6], dl
mov rdx, rbp
shr rdx, 0x2e
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 5], dl
mov rdx, rbp
shr rdx, 0x28
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 4], dl
mov rdx, rbp
shr rdx, 0x22
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 3], dl
mov rdx, rbp
shr rdx, 0x1c
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 2], dl
mov edx, ebp
shr edx, 0x16
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [rdi + rax - 1], dl
shr ebp, 0x10
and ebp, 0x3f
movzx edx, byte [rbp + r11]
mov byte [rdi + rax], dl
add r9, 0x18
add rax, 0x20
cmp r9, r10
jbe 0x140010650
mov rdi, r12
mov rcx, qword [rsp + 0x60]
sub rdi, rcx
jb 0x140010be5
cmp r9, rdi
jae 0x140010a60
lea r8, [0x1402235d0]
lea r11, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov rbp, r9
nop dword [rax]
mov edx, 0x1c
add rbp, 3
jb 0x140010bc4
cmp rbp, r12
ja 0x140010c6e
mov rax, rsi
add rax, 4
jb 0x140010bcd
cmp rax, r15
ja 0x140010c73
movzx edx, byte [r14 + r9]
mov rbx, rdx
shr rbx, 2
movzx ebx, byte [rbx + r11]
mov byte [r13 + rsi], bl
movzx r10d, byte [r14 + r9 + 1]
shl dl, 4
mov ebx, r10d
shr bl, 4
or bl, dl
movzx edx, bl
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [r13 + rsi + 1], dl
movzx edx, byte [r14 + r9 + 2]
shl r10b, 2
mov ebx, edx
shr bl, 6
or bl, r10b
movzx ebx, bl
and ebx, 0x3f
movzx ebx, byte [rbx + r11]
mov byte [r13 + rsi + 2], bl
and edx, 0x3f
movzx edx, byte [rdx + r11]
mov byte [r13 + rsi + 3], dl
add rsi, 4
mov r9, rbp
cmp rbp, rdi
jb 0x140010910
mov rsi, rcx
cmp rcx, 1
je 0x140010a70
cmp rsi, 2
jne 0x140010abf
cmp rdi, r12
jae 0x140010bfa
cmp rax, r15
jae 0x140010c0c
movzx ebx, byte [r14 + rdi]
mov rdx, rbx
shr rdx, 2
lea rcx, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
movzx edx, byte [rdx + rcx]
mov byte [r13 + rax], dl
inc rdi
cmp rdi, r12
jae 0x140010c24
lea rbp, [rax + 1]
cmp rbp, r15
jae 0x140010c3f
movzx ebp, byte [r14 + rdi]
mov edx, ebp
shr dl, 4
shl bl, 4
or bl, dl
movzx edx, bl
and edx, 0x3f
movzx edx, byte [rdx + rcx]
mov byte [r13 + rax + 1], dl
lea rdi, [rax + 2]
cmp rdi, r15
jae 0x140010c51
and ebp, 0xf
movzx ecx, byte [rcx + rbp*4]
mov byte [r13 + rax + 2], cl
add rax, 3
jae 0x140010abf
lea r8, [0x1402236d8]
mov edx, 0x1c
jmp 0x140010bd4
mov rax, rsi
mov rsi, rcx
cmp rcx, 1
jne 0x1400109c1
cmp rdi, r12
jae 0x140010c03
cmp rax, r15
jae 0x140010c15
movzx ecx, byte [r14 + rdi]
mov rbp, rcx
shr rbp, 2
lea rdx, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
movzx ebx, byte [rbp + rdx]
mov byte [r13 + rax], bl
lea rdi, [rax + 1]
cmp rdi, r15
jae 0x140010c30
shl ecx, 4
and ecx, 0x30
movzx ecx, byte [rcx + rdx]
mov byte [r13 + rax + 1], cl
add rax, 2
mov rdi, r15
sub rdi, rax
jb 0x140010c8d
xor sil, 3
movzx edx, sil
imul ecx, edx, 0xab
shr ecx, 9
lea ecx, [rcx + rcx*2]
sub dl, cl
je 0x140010b7f
lea rcx, [rax + r13]
movzx edx, dl
xor ebx, ebx
lea r8, [0x1402236f0]
nop word [rax + rax]
cmp rbx, rdi
je 0x140010ba3
mov byte [rcx + rbx], 0x3d
mov rbp, rbx
inc rbp
mov ebx, 1
cmp rbp, rdx
jb 0x140010b00
add rax, rbp
jb 0x140010b86
lea rcx, [rsp + 0x30]
mov rdx, r13
mov r8, r15
call fcn.14002d760
cmp qword [rsp + 0x30], 0
mov rbp, qword [rsp + 0x58]
je 0x140010b62
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 0x140010ca8
mov qword [rbp], r13
mov qword [rbp + 8], r15
mov qword [rbp + 0x10], r15
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor ebp, ebp
add rax, rbp
jae 0x140010b22
lea rcx, str.usize_overflow_when_calculating_b64_length
lea r8, [0x140223540]
mov edx, 0x2a
call fcn.14002d970
jmp 0x140010cf9
mov r12, rdi
mov rcx, rdi
mov rdx, r12
call fcn.14002ba50
jmp 0x140010cf9
mov edx, 0x1c
lea r8, [0x140223570]
jmp 0x140010bdb
lea r8, [0x1402235b8]
jmp 0x140010bd4
lea r8, [0x1402235e8]
lea rcx, str.attempt_to_add_with_overflowC:UsersUser.cargo_registry_srcgithub.com_1ecc6299db9ec823_base64_0.13.1_srcencode.rs
call fcn.14002cb80
jmp 0x140010cf9
lea r8, [0x1402235a0]
mov edx, 0x21
lea rcx, [0x140223480]
jmp 0x140010bdb
lea r8, [0x140223660]
jmp 0x140010ba6
lea r8, [0x140223618]
jmp 0x140010ba6
lea r8, [0x140223678]
jmp 0x140010c1c
lea r8, [0x140223630]
mov rdi, rax
mov r12, r15
jmp 0x140010ba6
lea r8, [0x140223690]
jmp 0x140010ba6
lea r8, [0x140223648]
mov r12, r15
jmp 0x140010ba6
lea r8, [0x1402236a8]
mov rdi, rbp
mov r12, r15
jmp 0x140010ba6
lea r8, [0x1402236c0]
mov r12, r15
jmp 0x140010ba6
lea r8, [0x140223558]
jmp 0x140010c80
mov r12, r15
jmp 0x140010c80
mov rsi, rbp
jmp 0x140010c80
mov rsi, rax
mov r12, r15
lea r8, [0x140223600]
mov rcx, rsi
mov rdx, r12
call fcn.14002c6f0
jmp 0x140010cf9
lea r8, [0x140223528]
mov rcx, rax
mov rdx, r15
call fcn.14002c660
jmp 0x140010cf9
call fcn.140027070
ud2
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x40], r15
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, [0x140221290]
mov qword [rsp + 0x20], rax
lea rcx, str.Invalid_UTF8
lea r9, fcn.140004f50
lea r8, [rsp + 0x30]
mov edx, 0xc
call fcn.14002dda0
ud2