Function at 0x140018425
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x618
mov r13, qword [rdx]
test r13, r13
je 0x140018b7a
mov rdi, r8
mov r8, qword [rdx + 8]
test r8, r8
je 0x140018b7a
mov rax, qword [rdx + 0x10]
test rax, rax
je 0x140018b7a
mov r9, r13
add r9, rax
jb 0x140018b7a
mov qword [rsp + 0x68], rcx
mov rsi, r13
sub rsi, r8
jb 0x140018b7a
mov qword [rsp + 0x98], r8
mov qword [rsp + 0xa0], rax
mov rax, r9
shr rax, 0x3d
jne 0x140018b7a
mov qword [rsp + 0x90], rdx
movzx eax, word [rdx + 0x18]
mov word [rsp + 0x66], ax
movzx r15d, ax
movsx rax, r15w
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0x88], r9
mov rcx, r9
mov edx, r15d
call fcn.1400181d7
mov rbx, rax
mov r12d, edx
mov rcx, rsi
mov edx, r15d
mov r8d, r12d
call fcn.140017a8d
mov qword [rsp + 0x58], rax
mov r14d, edx
mov qword [rsp + 0xb0], r13
mov rcx, r13
mov qword [rsp + 0x70], r15
mov edx, r15d
mov r8d, r12d
call fcn.140017a8d
mov r15, rax
mov ebp, edx
mov edx, 0xffffffa0
sub edx, r12d
lea r13, [rsp + 0x378]
mov rcx, r13
call fcn.140018190
movzx eax, word [r13]
mov word [rsp + 0x56], ax
mov rsi, qword [r13 + 8]
movzx r13d, word [r13 + 0x10]
mov rcx, rbx
mov edx, r12d
mov r8, rsi
mov r9d, r13d
call fcn.140018275
mov r12, rax
mov ebx, edx
mov rcx, qword [rsp + 0x58]
mov edx, r14d
mov r8, rsi
mov r9d, r13d
call fcn.140018275
mov qword [rsp + 0x58], rax
mov rcx, r15
mov edx, ebp
mov r8, rsi
mov r9d, r13d
call fcn.140018275
mov qword [rsp + 0x78], rax
lea rax, [r12 + 1]
neg ebx
and ebx, 0x3f
mov rsi, rax
mov ecx, ebx
shr rsi, cl
mov edx, 1
shl rdx, cl
mov r15d, 1
mov qword [rsp + 0xa8], rdx
lea r14, [rdx - 1]
mov rbp, r14
mov qword [rsp + 0x80], rax
and rbp, rax
mov ecx, esi
call fcn.1400182c8
mov r8d, edx
movzx r11d, al
mov r9d, r11d
sub r9w, word [rsp + 0x56]
inc r9d
sub r12, qword [rsp + 0x58]
add r12, 2
mov r10, r14
and r10, r12
neg r11
mov r13d, 0xa
test r8d, r8d
je 0x140018b7a
mov eax, esi
xor edx, edx
div r8d
cmp r15, 0x12
je 0x140018b7a
mov esi, edx
mov edx, edx
mov ecx, ebx
shl rdx, cl
add al, 0x30
mov byte [rdi + r15 - 1], al
add rdx, rbp
cmp rdx, r12
jb 0x140018631
lea rax, [r11 + r15]
cmp rax, 1
je 0x140018665
mov eax, r8d
xor edx, edx
div r13d
inc r15
mov r8d, eax
jmp 0x1400185e5
mov eax, r8d
mov ecx, ebx
shl rax, cl
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rdx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], 1
jmp 0x1400186cc
mov eax, 1
cmp r15, 0x11
je 0x140018b7a
imul rdx, rbp, 0xa
mov rbp, rdx
and rbp, r14
imul rax, rax, 0xa
imul r10, r10, 0xa
mov ecx, ebx
shr rdx, cl
add dl, 0x30
mov byte [rdi + r15], dl
inc r15
cmp rbp, r10
jae 0x14001866a
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x78]
imul rcx, rax
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x28], r10
mov qword [rsp + 0x20], rbp
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0xc0]
mov rdx, rdi
mov r8, r15
call fcn.140018353
cmp qword [rsp + 0xc0], 0
mov r14, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xb0]
je 0x14001871b
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x68]
mov qword [rcx + 0x10], rax
movups xmm0, xmmword [rsp + 0xc0]
movups xmmword [rcx], xmm0
jmp 0x140018b47
mov rax, qword [rsp + 0x88]
dec rax
je 0x140018732
bsr rax, rax
xor rax, 0x3f
jmp 0x140018737
mov eax, 0x40
mov rcx, qword [rsp + 0x90]
mov cl, byte [rcx + 0x1a]
mov byte [rsp + 0x56], cl
mov rcx, r14
sub rcx, rax
imul rax, rcx, 0x4d104d42
movabs rbx, 0x1344135080
add rbx, rax
shr rbx, 0x20
lea rcx, [rsp + 0xd8]
call fcn.140017e33
lea rcx, [rsp + 0x180]
mov rdx, qword [rsp + 0x98]
call fcn.140017e33
lea rcx, [rsp + 0x228]
mov rdx, qword [rsp + 0xa0]
call fcn.140017e33
lea rsi, [rsp + 0x2d4]
mov r8d, 0x9c
mov rcx, rsi
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov qword [rsi + 0x9c], 1
mov dword [rsi - 4], 1
cmp word [rsp + 0x66], 0
js 0x1400187fc
lea rcx, [rsp + 0xd8]
mov rdx, qword [rsp + 0x70]
call fcn.140017e98
lea rcx, [rsp + 0x180]
mov rdx, r14
call fcn.140017e98
lea rcx, [rsp + 0x228]
mov rdx, r14
jmp 0x14001880f
mov rax, qword [rsp + 0x70]
neg eax
movsx rdx, ax
lea rcx, [rsp + 0x2d0]
call fcn.140017e98
test bx, bx
js 0x140018826
movzx edx, bx
lea rcx, [rsp + 0x2d0]
jmp 0x140018858
mov eax, ebx
neg eax
movzx esi, ax
lea rcx, [rsp + 0xd8]
mov rdx, rsi
call fcn.140017bbe
lea rcx, [rsp + 0x180]
mov rdx, rsi
call fcn.140017bbe
lea rcx, [rsp + 0x228]
mov rdx, rsi
call fcn.140017bbe
lea rdx, [rsp + 0xd8]
mov rax, qword [rdx + 0xa0]
lea rsi, [rsp + 0x378]
mov qword [rsi + 0xa0], rax
mov r8d, 0xa0
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
lea rdx, [rsp + 0x228]
mov rcx, rsi
call fcn.140017faa
lea rcx, [rsp + 0x2d0]
mov rdx, rsi
call fcn.140018010
cmp al, byte [rsp + 0x56]
jge 0x1400188b8
inc ebx
mov qword [rsp + 0x58], rbx
jmp 0x1400188f3
mov qword [rsp + 0x58], rbx
lea rcx, [rsp + 0xd8]
mov edx, 0xa
call fcn.140017c88
lea rcx, [rsp + 0x180]
mov edx, 0xa
call fcn.140017c88
lea rcx, [rsp + 0x228]
mov edx, 0xa
call fcn.140017c88
lea r15, [rsp + 0x2d0]
mov rax, qword [r15 + 0xa0]
lea rsi, [rsp + 0x420]
mov qword [rsi + 0xa0], rax
mov r8d, 0xa0
mov rcx, rsi
mov rdx, r15
call sub.VCRUNTIME140.dll_memcpy
mov edx, 1
mov rcx, rsi
call fcn.140017e98
mov rax, qword [r15 + 0xa0]
lea rsi, [rsp + 0x4c8]
mov qword [rsi + 0xa0], rax
mov r8d, 0xa0
mov rcx, rsi
mov rdx, r15
call sub.VCRUNTIME140.dll_memcpy
mov edx, 2
mov rcx, rsi
call fcn.140017e98
mov rax, qword [r15 + 0xa0]
lea r14, [rsp + 0x570]
mov qword [r14 + 0xa0], rax
mov r8d, 0xa0
mov rcx, r14
mov rdx, r15
call sub.VCRUNTIME140.dll_memcpy
mov edx, 3
mov rcx, r14
call fcn.140017e98
xor esi, esi
lea r12, [rsp + 0xd8]
lea rbp, [rsp + 0x378]
lea rbx, [rsp + 0x228]
mov rcx, r12
mov rdx, r14
call fcn.14001807e
test al, al
je 0x1400189d0
mov rcx, r12
mov rdx, r14
call fcn.140018091
mov r14b, 8
jmp 0x1400189d3
xor r14d, r14d
mov r13, rdi
mov rcx, r12
lea rdi, [rsp + 0x4c8]
mov rdx, rdi
call fcn.14001807e
test al, al
je 0x1400189fc
mov rcx, r12
mov rdx, rdi
call fcn.140018091
or r14b, 4
lea rdi, [rsp + 0x420]
mov rcx, r12
mov rdx, rdi
call fcn.14001807e
test al, al
je 0x140018a22
mov rcx, r12
mov rdx, rdi
call fcn.140018091
add r14b, 2
mov rdi, r13
mov rcx, r12
mov rdx, r15
call fcn.14001807e
test al, al
je 0x140018a42
mov rcx, r12
mov rdx, r15
call fcn.140018091
inc r14b
cmp rsi, 0x11
je 0x140018b7a
add r14b, 0x30
mov byte [rdi + rsi], r14b
mov rcx, r12
lea rdx, [rsp + 0x180]
call fcn.140018010
mov r14d, eax
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x418], rax
mov r8d, 0xa0
mov rcx, rbp
mov rdx, r12
call sub.VCRUNTIME140.dll_memcpy
mov rcx, rbp
mov rdx, rbx
call fcn.140017faa
mov rcx, r15
mov rdx, rbp
call fcn.140018010
mov cl, byte [rsp + 0x56]
cmp r14b, cl
jl 0x140018ae7
cmp al, cl
jl 0x140018ae7
mov rcx, r12
mov edx, 0xa
call fcn.140017c88
lea rcx, [rsp + 0x180]
mov edx, 0xa
call fcn.140017c88
mov rcx, rbx
mov edx, 0xa
call fcn.140017c88
inc rsi
lea r14, [rsp + 0x570]
jmp 0x1400189b1
lea r15, [rsi + 1]
cmp al, cl
jge 0x140018b2c
cmp r14b, cl
jge 0x140018b1d
lea rbx, [rsp + 0xd8]
mov edx, 1
mov rcx, rbx
call fcn.140017e98
lea rdx, [rsp + 0x2d0]
mov rcx, rbx
call fcn.14001807e
test al, al
je 0x140018b2c
mov rcx, rdi
mov rdx, r15
call fcn.1400180ea
test al, 1
jne 0x140018b5b
cmp rsi, 0x11
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
jae 0x140018b7a
mov qword [rax], rdi
mov qword [rax + 8], r15
mov word [rax + 0x10], cx
add rsp, 0x618
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp rsi, 0xf
ja 0x140018b7a
mov byte [rdi + rsi + 1], dl
add rsi, 2
mov rcx, qword [rsp + 0x58]
inc ecx
mov r15, rsi
mov rax, qword [rsp + 0x68]
jmp 0x140018b3c
ud2