Function at 0x40784c
Capabilities:
Encode data using base64

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
test rcx, rcx
mov rsi, rcx
je 0x407ca5
mov rax, qword [rcx]
test rax, rax
je 0x407ca5
lea rax, [rax + rax*2]
mov ecx, 4
cqo
idiv rcx
lea rdx, [rax + 6]
xor ecx, ecx
call fcn.00406bc9
mov r10, qword [rsi]
movabs r8, 0x2000000100002400
mov r9, rax
lea rdx, [r10 - 1]
mov cl, byte [rsi + rdx + 0x10]
cmp cl, 0x3d
ja 0x4078ba
mov rax, r8
shr rax, cl
not rax
and al, 1
jne 0x4078bc
mov r10, rdx
jmp 0x40789b
mov al, 1
lea rbp, [r10 - 4]
xor r8d, r8d
xor ebx, ebx
movabs r12, 0x100002400
lea r11, [0x0040eb20]
cmp rbx, rbp
jle 0x407912
mov rax, rbx
mov ecx, 4
sub rax, r10
cqo
idiv rcx
mov rax, rdx
sar rax, 0x3f
xor rdx, rax
sub rdx, rax
cmp rdx, 2
jne 0x407ac9
jmp 0x407ad5
lea rdi, [rbx + 1]
test dl, dl
jne 0x40792c
mov rbx, rdi
movzx ecx, byte [rsi + rbx + 0x10]
mov edx, eax
cmp cl, 0x20
ja 0x407907
mov rdx, r12
shr rdx, cl
not rdx
and edx, 1
jmp 0x407907
mov cl, byte [r11 + rcx]
cmp cl, 0xff
je 0x407b59
movzx edx, byte [rsi + rdi + 0x10]
movzx edx, byte [r11 + rdx]
mov r13, rdx
inc r13b
jne 0x407a5a
lea rcx, [0x0055a300]
mov edx, 0x30
call fcn.00406265
mov rbx, rax
lea rax, [0x0055a340]
mov qword [rbx], rax
lea rax, str.ValueError
mov qword [rbx + 0x10], rax
movzx ecx, byte [rsi + rdi + 0x10]
call fcn.00406d77
mov rcx, rdi
mov r12, rax
call fcn.00406d77
xor edx, edx
test r12, r12
mov rbp, rax
je 0x40799b
mov rdx, qword [r12]
xor eax, eax
test rbp, rbp
je 0x4079a6
mov rax, qword [rbp]
lea rcx, [rdx + rax + 0x38]
call fcn.004062b7
lea rdx, [0x0040eae0]
mov rcx, rax
mov r9, rax
call fcn.00403e5c
mov dl, byte [rsi + rdi + 0x10]
mov rax, qword [r9]
mov rcx, r9
mov byte [r9 + rax + 0x10], dl
lea rdx, [0x0040eac0]
mov byte [r9 + rax + 0x11], 0
inc rax
mov qword [r9], rax
call fcn.00403e5c
mov rdx, r12
mov rcx, r9
call fcn.00403e82
lea rdx, [0x0040eaa0]
mov rcx, r9
call fcn.00403e5c
mov rdx, rbp
mov rcx, r9
call fcn.00403e82
lea rdx, [0x0040ea80]
mov rcx, r9
call fcn.00403e5c
lea rcx, [rbx + 0x18]
mov rdx, r9
call fcn.004056c6
lea rcx, [rbx + 8]
xor edx, edx
call fcn.004056c6
lea r9, str.base64.nim
mov rcx, rbx
mov qword [rsp + 0x20], 0xe9
lea r8, str.decode
lea rdx, str.ValueError
call fcn.004076b5
lea rdi, [rbx + 2]
movzx r13d, byte [rsi + rdi + 0x10]
movzx r13d, byte [r11 + r13]
mov r14, r13
inc r14b
je 0x40794f
lea rdi, [rbx + 3]
movzx r14d, byte [rsi + rdi + 0x10]
mov r14b, byte [r11 + r14]
cmp r14b, 0xff
je 0x40794f
mov rdi, rdx
shl ecx, 2
add rbx, 4
sar rdi, 4
shl rdx, 4
or ecx, edi
mov byte [r9 + r8 + 0x10], cl
mov rcx, r13
shl r13, 6
sar rcx, 2
or r14d, r13d
or edx, ecx
mov byte [r9 + r8 + 0x12], r14b
mov byte [r9 + r8 + 0x11], dl
add r8, 3
jmp 0x4078d6
cmp rdx, 3
jne 0x407c8c
jmp 0x407b11
movzx eax, byte [rsi + rbx + 0x10]
lea rdx, [0x0040eb20]
mov al, byte [rdx + rax]
cmp al, 0xff
je 0x407b59
inc rbx
movzx ecx, byte [rsi + rbx + 0x10]
movzx edx, byte [rdx + rcx]
mov rcx, rdx
inc cl
je 0x407b59
shl eax, 2
sar rdx, 4
or eax, edx
mov byte [r9 + r8 + 0x10], al
inc r8
jmp 0x407c8c
movzx eax, byte [rsi + rbx + 0x10]
lea rcx, [0x0040eb20]
mov dl, byte [rcx + rax]
cmp dl, 0xff
je 0x407b59
lea rdi, [rbx + 1]
movzx eax, byte [rsi + rdi + 0x10]
movzx eax, byte [rcx + rax]
mov r10, rax
inc r10b
je 0x40794f
add rbx, 2
movzx r10d, byte [rsi + rbx + 0x10]
movzx ecx, byte [rcx + r10]
mov r10, rcx
inc r10b
jne 0x407c64
lea rcx, [0x0055a300]
mov edx, 0x30
call fcn.00406265
mov rdi, rax
lea rax, [0x0055a340]
mov qword [rdi], rax
lea rax, str.ValueError
mov qword [rdi + 0x10], rax
movzx ecx, byte [rsi + rbx + 0x10]
call fcn.00406d77
mov rcx, rbx
mov r12, rax
call fcn.00406d77
xor edx, edx
test r12, r12
mov rbp, rax
je 0x407ba5
mov rdx, qword [r12]
xor eax, eax
test rbp, rbp
je 0x407bb0
mov rax, qword [rbp]
lea rcx, [rdx + rax + 0x38]
call fcn.004062b7
lea rdx, [0x0040eae0]
mov rcx, rax
mov r9, rax
call fcn.00403e5c
mov dl, byte [rsi + rbx + 0x10]
mov rax, qword [r9]
mov rcx, r9
mov byte [r9 + rax + 0x10], dl
lea rdx, [0x0040eac0]
mov byte [r9 + rax + 0x11], 0
inc rax
mov qword [r9], rax
call fcn.00403e5c
mov rdx, r12
mov rcx, r9
call fcn.00403e82
lea rdx, [0x0040eaa0]
mov rcx, r9
call fcn.00403e5c
mov rdx, rbp
mov rcx, r9
call fcn.00403e82
lea rdx, [0x0040ea80]
mov rcx, r9
call fcn.00403e5c
lea rcx, [rdi + 0x18]
mov rdx, r9
call fcn.004056c6
lea rcx, [rdi + 8]
xor edx, edx
call fcn.004056c6
lea r9, str.base64.nim
mov rcx, rdi
mov qword [rsp + 0x20], 0xe9
lea r8, str.decode
lea rdx, str.ValueError
jmp 0x407a55
mov r10, rax
shl edx, 2
sar r10, 4
shl rax, 4
or edx, r10d
mov byte [r9 + r8 + 0x10], dl
mov rdx, rcx
sar rdx, 2
or eax, edx
mov byte [r9 + r8 + 0x11], al
add r8, 2
mov rdx, r8
mov rcx, r9
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp fcn.00406bc9
xor eax, eax
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret