Function at 0x14003898e
Capabilities:
Encode data using base64
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x3e8
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x58], r8
mov r14, qword [rdx]
test r14, r14
je 0x140039364
mov rax, r14
shr rax, 0x3d
jne 0x140039364
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x80], rdx
movzx edx, word [rdx + 0x18]
mov rcx, r14
mov word [rsp + 0x62], dx
call fcn.140037a10
mov ecx, edx
and ecx, 0x5f
mov r8d, edx
not r8d
and r8d, 0xffffffa0
sub r8d, ecx
movsx ecx, r8w
mov r8d, ecx
not r8d
mov r9d, ecx
and r9d, 0xffffffaf
and r8d, 0x50
imul r8d, r9d
mov r9d, ecx
and r9d, 0x50
or ecx, 0x50
imul ecx, r9d
add ecx, r8d
add ecx, 0x153b0
movsxd rcx, ecx
imul rcx, rcx, 0x7b4dc993
mov r8, rcx
shr r8, 0x3f
sar rcx, 0x2a
add ecx, r8d
cmp ecx, 0x51
jae 0x140039364
mov ebx, ecx
shl rbx, 4
lea r12, [0x14007cfb0]
mov r8, qword [rbx + r12]
movzx r9d, word [rbx + r12 + 8]
mov rcx, rax
call fcn.140037acc
mov rdi, rax
mov ebp, edx
neg ebp
mov ecx, ebp
and ecx, 0x3f
mov r13, rax
shr r13, cl
mov edx, 1
mov qword [rsp + 0x78], rcx
shl rdx, cl
movabs rax, 0x88802fb395a75ca1
mov r15, rax
not r15
add r15, rax
add r15, rdx
mov rsi, rdi
xor rsi, r15
not rsi
and rsi, r15
je 0x140038d2f
mov qword [rsp + 0x68], rdx
add r12, rbx
movzx ebx, word [r12 + 0xa]
mov ecx, r13d
call fcn.140037bed
mov r10d, edx
movzx ecx, al
not ebx
lea r11d, [rcx + rbx]
add r11d, 2
movzx r9d, word [rsp + 0x450]
cmp r11w, r9w
jle 0x140038b8b
movzx r8d, bp
movsx rax, r11w
mov dword [rsp + 0x64], r11d
mov edx, r11d
sub edx, r9d
movsx r9, r9w
movabs r11, 0x7c550bedaba33873
add rax, r11
sub rax, r9
sub rax, r11
mov rbp, qword [rsp + 0x50]
cmp rax, rbp
movsx r9, dx
cmovae r9, rbp
neg rcx
neg rbp
mov edi, 1
xor r11d, r11d
mov ebx, 0xcccccccd
lea r12, [rdi + rbp]
mov eax, r13d
xor edx, edx
div r10d
cmp r12, 1
je 0x140039364
mov r13d, edx
add al, 0x30
mov rdx, qword [rsp + 0x58]
mov byte [rdx + rdi - 1], al
cmp r9, rdi
je 0x140038be4
lea rax, [rcx + rdi]
cmp rax, 1
je 0x140038c27
inc r11
mov eax, r10d
imul rax, rbx
shr rax, 0x23
inc rdi
cmp r10d, 0xa
mov r10d, eax
jae 0x140038b31
jmp 0x140039364
movabs rcx, 0xcccccccccccccccd
mov rax, rdi
mul rcx
shr rdx, 3
mov eax, r10d
mov rcx, qword [rsp + 0x78]
shl rax, cl
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x40], rcx
mov word [rsp + 0x28], r9w
mov word [rsp + 0x20], r11w
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x88]
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x50]
xor r9d, r9d
jmp 0x140038cfe
mov eax, r13d
mov rcx, qword [rsp + 0x78]
shl rax, cl
add rsi, rax
mov eax, r10d
shl rax, cl
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x40], rcx
movzx ecx, word [rsp + 0x450]
mov word [rsp + 0x28], cx
mov ecx, dword [rsp + 0x64]
mov word [rsp + 0x20], cx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
jmp 0x140038cec
dec r8d
and r8d, 0x3f
mov eax, 1
mov r11, qword [rsp + 0x68]
mov rdx, rax
mov ecx, r8d
shr rdx, cl
test rdx, rdx
jne 0x140038d2f
cmp rdi, qword [rsp + 0x50]
jae 0x140039364
mov ecx, esi
not ecx
and ecx, 0xa
mov r10, rsi
and r10, 0xfffffffffffffff5
imul r10, rcx
mov ecx, esi
and ecx, 0xa
or rsi, 0xa
imul rsi, rcx
mov rdx, rsi
add rdx, r10
mov rsi, r15
xor rsi, rdx
not rsi
and rsi, rdx
mov ecx, eax
not ecx
and ecx, 0xa
mov r10, rax
and r10, 0xfffffffffffffff5
imul r10, rcx
mov ecx, eax
and ecx, 0xa
or rax, 0xa
imul rax, rcx
add rax, r10
mov rcx, qword [rsp + 0x78]
shr rdx, cl
add dl, 0x30
mov rcx, qword [rsp + 0x58]
mov byte [rcx + rdi], dl
inc rdi
cmp r9, rdi
jne 0x140038c38
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x30], rsi
movzx eax, word [rsp + 0x450]
mov word [rsp + 0x28], ax
mov eax, dword [rsp + 0x64]
mov word [rsp + 0x20], ax
lea rcx, [rsp + 0x88]
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x50]
call fcn.14003887c
cmp qword [rsp + 0x88], 0
je 0x140038d2f
mov rax, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x70]
mov qword [rcx + 0x10], rax
movups xmm0, xmmword [rsp + 0x88]
movups xmmword [rcx], xmm0
jmp 0x14003931d
mov rcx, qword [rsp + 0x80]
mov rax, qword [rcx + 8]
test rax, rax
je 0x140039364
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x140039364
add rcx, r14
jb 0x140039364
cmp r14, rax
jb 0x140039364
movzx r15d, word [rsp + 0x62]
movsx rdi, r15w
movabs r12, 0x1344135080
movabs rcx, 0xd9c94478a05173bc
mov rax, rcx
not rax
add rax, r14
add rax, rcx
je 0x140038d99
bsr rax, rax
xor rax, 0x3f
jmp 0x140038d9e
mov eax, 0x40
mov rcx, rdi
sub rcx, rax
mov eax, ecx
not eax
mov rdx, rcx
and rdx, 0xffffffffb2efb2bd
and eax, 0x4d104d42
imul rax, rdx
mov edx, 0x4d104d42
mov r8, rcx
and r8, rdx
or rcx, rdx
imul rcx, r8
add r12, rcx
add r12, rax
shr r12, 0x20
xor ebx, ebx
lea rcx, [rsp + 0xa0]
mov r8d, 0xa0
xor edx, edx
call fcn.1400706f0
cmp rbx, 0x28
je 0x140039364
mov dword [rsp + rbx*4 + 0xa0], r14d
shr r14, 0x20
mov eax, ebx
and eax, 1
xor rbx, 1
lea rbx, [rbx + rax*2]
test r14, r14
jne 0x140038dee
lea rsi, [rsp + 0x148]
lea rdx, [rsp + 0xa0]
mov r8d, 0xa0
mov rcx, rsi
call fcn.140070050
mov qword [rsi + 0xa0], rbx
lea rsi, [rsp + 0x1f4]
mov r8d, 0x9c
mov rcx, rsi
xor edx, edx
call fcn.1400706f0
mov qword [rsi + 0x9c], 1
mov dword [rsi - 4], 1
test r15w, r15w
js 0x140038e78
lea rcx, [rsp + 0x148]
mov rdx, r15
jmp 0x140038e86
neg edi
movsx rdx, di
lea rcx, [rsp + 0x1f0]
call fcn.140033086
test r12w, r12w
js 0x140038ea7
mov edx, r12d
xor edx, 0xffff0000
and edx, r12d
lea rcx, [rsp + 0x1f0]
jmp 0x140038ec4
movabs rax, 0xffff000000000000
mov rdx, r12
imul rdx, rax
sar rdx, 0x30
lea rcx, [rsp + 0x148]
call fcn.1400378e7
movabs rsi, 0xbe1babc79f243b6a
lea rdx, [rsp + 0x1f0]
mov rdi, qword [rdx + 0xa0]
lea rcx, [rsp + 0xa0]
mov qword [rcx + 0xa0], rdi
mov r8d, 0xa0
call fcn.140070050
movabs rcx, 0x7ffffffffffffff7
mov r8, rsi
not r8
movabs r10, 0x44b82fa09b5a53
mov r9, qword [rsp + 0x50]
cmp rdi, 0x29
jae 0x140039364
test rdi, rdi
je 0x140038f81
shl rdi, 2
xor eax, eax
mov edx, dword [rsp + rdi + 0x9c]
shl rax, 0x20
mov r11d, r8d
and r11d, edx
not rdx
and rdx, rsi
or r11, rdx
mov rbx, r8
xor rbx, rsi
and rbx, rax
xor rbx, rsi
xor rbx, r11
mov rax, rbx
shr rax, 9
mul r10
shr rdx, 0xb
imul rax, rdx, 0x3b9aca00
sub rbx, rax
mov dword [rsp + rdi + 0x9c], edx
mov rax, rbx
add rdi, 0xfffffffffffffffc
jne 0x140038f30
mov rax, r9
and rax, rcx
xor r9, 0xfffffffffffffff7
lea r9, [r9 + rax*2]
cmp r9, 9
jbe 0x140038fa2
mov rdi, qword [rsp + 0x140]
jmp 0x140038f1b
lea rax, [0x14007cee8]
mov eax, dword [rax + r9*4]
add eax, eax
je 0x140039364
mov rcx, qword [rsp + 0x140]
cmp rcx, 0x29
jae 0x140039364
test rcx, rcx
je 0x140038ff8
mov r8d, eax
shl rcx, 2
xor edx, edx
mov eax, dword [rsp + rcx + 0x9c]
shl rdx, 0x20
or rdx, rax
mov rax, rdx
xor edx, edx
div r8
mov dword [rsp + rcx + 0x9c], eax
add rcx, 0xfffffffffffffffc
jne 0x140038fd5
lea rsi, [rsp + 0xa0]
lea rdx, [rsp + 0x148]
mov rcx, rsi
call fcn.140032edb
lea rdx, [rsp + 0x1f0]
mov rcx, rsi
call fcn.1400333f2
cmp al, 2
jae 0x140039029
inc r12d
jmp 0x14003903b
lea rcx, [rsp + 0x148]
mov edx, 0xa
call fcn.140032fee
movzx r8d, word [rsp + 0x450]
cmp r12w, r8w
jl 0x140039241
movsx rax, r12w
movsx rcx, r8w
mov rdx, rax
xor rdx, rcx
not rcx
and rcx, rax
add rcx, rcx
sub rcx, rdx
mov eax, r12d
not eax
and eax, r8d
mov edx, r8d
not edx
and edx, r12d
sub edx, eax
mov rax, qword [rsp + 0x50]
cmp rcx, rax
movsx r14, dx
cmovae r14, rax
test r14, r14
je 0x140039241
lea rdi, [rsp + 0x1f0]
mov rax, qword [rdi + 0xa0]
lea rsi, [rsp + 0x298]
mov qword [rsi + 0xa0], rax
mov r8d, 0xa0
mov rcx, rsi
mov rdx, rdi
call fcn.140070050
mov edx, 1
mov rcx, rsi
call fcn.140033086
mov rax, qword [rdi + 0xa0]
lea rsi, [rsp + 0x340]
mov qword [rsi + 0xa0], rax
mov r8d, 0xa0
mov rcx, rsi
mov rdx, rdi
call fcn.140070050
mov edx, 2
mov rcx, rsi
call fcn.140033086
mov rax, qword [rdi + 0xa0]
lea rbx, [rsp + 0xa0]
mov qword [rbx + 0xa0], rax
mov r8d, 0xa0
mov rcx, rbx
mov rdx, rdi
call fcn.140070050
mov edx, 3
mov rcx, rbx
call fcn.140033086
xor ebp, ebp
lea r13, [rsp + 0x148]
mov rax, qword [rsp + 0x1e8]
cmp rax, 0x29
jae 0x140039364
lea rdi, [rbp + 1]
shl rax, 2
xor ecx, ecx
cmp rax, rcx
je 0x140039331
cmp dword [rsp + rcx + 0x148], 0
lea rcx, [rcx + 4]
je 0x14003915d
mov rcx, r13
mov rdx, rbx
call fcn.1400333f2
cmp al, 2
jae 0x140039192
mov rcx, r13
mov rdx, rbx
call fcn.140032f7e
mov bl, 8
jmp 0x140039194
xor ebx, ebx
mov rcx, r13
mov rdx, rsi
call fcn.1400333f2
cmp al, 1
ja 0x1400391b6
mov rcx, r13
mov r15, rsi
mov rdx, rsi
call fcn.140032f7e
or bl, 4
jmp 0x1400391b9
mov r15, rsi
lea rsi, [rsp + 0x298]
mov rcx, r13
mov rdx, rsi
call fcn.1400333f2
cmp al, 1
ja 0x1400391de
mov rcx, r13
mov rdx, rsi
call fcn.140032f7e
add bl, 2
mov rsi, r15
mov rcx, r13
lea r15, [rsp + 0x1f0]
mov rdx, r15
call fcn.1400333f2
cmp al, 1
ja 0x140039205
mov rcx, r13
mov rdx, r15
call fcn.140032f7e
inc bl
cmp rbp, qword [rsp + 0x50]
je 0x140039364
add bl, 0x30
mov rax, qword [rsp + 0x58]
mov byte [rax + rbp], bl
mov rcx, r13
mov edx, 0xa
call fcn.140032fee
mov rbp, rdi
cmp rdi, r14
lea rbx, [rsp + 0xa0]
jne 0x140039141
mov dil, 1
jmp 0x140039246
xor edi, edi
xor r14d, r14d
lea rsi, [rsp + 0x1f0]
mov rcx, rsi
mov edx, 5
call fcn.140032fee
lea rcx, [rsp + 0x148]
mov rdx, rsi
call fcn.1400333f2
cmp al, 1
je 0x1400392a3
test al, al
sete al
mov ecx, edi
not cl
or cl, al
add cl, dil
inc cl
test cl, 1
je 0x140039300
lea rax, [r14 - 1]
cmp rax, qword [rsp + 0x50]
jae 0x140039364
mov rcx, qword [rsp + 0x58]
mov al, byte [rcx + rax]
not al
or al, 0xfe
cmp al, 0xff
je 0x140039300
cmp r14, qword [rsp + 0x50]
ja 0x140039364
mov rcx, qword [rsp + 0x58]
mov rdx, r14
call fcn.140032611
test al, 1
je 0x140039300
inc r12d
movzx eax, word [rsp + 0x450]
cmp r12w, ax
setg al
cmp r14, qword [rsp + 0x50]
setb cl
mov r8d, eax
or r8b, cl
cmp r8b, 1
jne 0x140039300
xor al, cl
jne 0x140039300
mov rax, qword [rsp + 0x58]
mov byte [rax + r14], dl
mov eax, r14d
and eax, 1
xor r14, 1
lea r14, [r14 + rax*2]
cmp r14, qword [rsp + 0x50]
ja 0x140039364
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
mov qword [rax], rcx
mov qword [rax + 8], r14
mov word [rax + 0x10], r12w
add rsp, 0x3e8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp r14, qword [rsp + 0x50]
ja 0x140039364
cmp r14, rbp
je 0x140039307
mov rax, qword [rsp + 0x58]
lea rcx, [rax + rbp]
mov rax, r14
xor rax, rbp
not rbp
and rbp, r14
add rbp, rbp
sub rbp, rax
mov dl, 0x30
mov r8, rbp
call fcn.1400706f0
jmp 0x140039307
ud2