Function at 0x140059df0
Capabilities:
Decode data using base64 via dword translation table
Encode data using base64

Disassembly:
push rsi
push r13
push r15
sub rsp, 0x30
mov r13, r8
mov rsi, rdx
mov r15, rcx
test rcx, rcx
je 0x140059e82
test r8, r8
jne 0x140059e12
test r9, r9
jne 0x140059e82
mov r10, qword [rsp + 0x70]
test r10, r10
je 0x140059e82
mov qword [r10], 0
cmp rdx, 0xffffffffffffffff
jne 0x140059e39
mov rsi, rdx
nop dword [rax]
inc rsi
cmp byte [rcx + rsi], 0
jne 0x140059e30
lea rax, [rsi + 3]
shr rax, 2
lea rdx, [rax + rax*2]
cmp r9, rdx
jae 0x140059e8e
mov rcx, rsi
test rsi, rsi
je 0x140059e60
cmp byte [r15 + rcx - 1], 0x3d
jne 0x140059e60
sub rcx, 1
jne 0x140059e52
mov rax, rcx
and eax, 3
jbe 0x140059e7f
shr rcx, 2
lea rdx, [rcx*2 - 1]
add rdx, rax
add rdx, rcx
cmp r9, rdx
jae 0x140059e8e
mov qword [r10], rdx
xor al, al
add rsp, 0x30
pop r15
pop r13
pop rsi
ret
test r13, r13
jne 0x140059ea4
test r9, r9
jne 0x140059e82
mov al, 1
add rsp, 0x30
pop r15
pop r13
pop rsi
ret
mov qword [rsp + 0x28], r12
xor r11d, r11d
mov qword [rsp + 0x20], r14
xor r10d, r10d
xor r14d, r14d
xor r12d, r12d
test rsi, rsi
je 0x14005a215
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbp
movabs rbp, 0xffffffc07ff1
mov qword [rsp + 0x60], rdi
xor edi, edi
xor r9d, r9d
xor r8d, r8d
xor ebx, ebx
movabs rcx, 0x100002600
cmp r10, rsi
jae 0x14005a086
lfence
nop dword [rax]
movzx ebx, byte [r10 + r15]
inc r10
cmp ebx, 0x41
jb 0x140059f12
cmp bl, 0x5a
jbe 0x140059f48
lea eax, [rbx - 0x61]
cmp al, 0x19
jbe 0x140059f48
lea eax, [rbx - 0x2f]
cmp al, 0xa
jbe 0x140059f48
cmp bl, 0x2b
je 0x140059f48
cmp bl, 0x3d
je 0x140059f42
cmp bl, 0x20
ja 0x140059f35
bt rcx, rbx
jb 0x140059f3b
mov r14d, 1
cmp r10, rsi
jb 0x140059f00
jmp 0x140059f48
mov r11d, 1
cmp r10, rsi
jae 0x14005a086
movzx r8d, byte [r10 + r15]
inc r10
cmp r8d, 0x41
jb 0x140059f65
cmp r8b, 0x5a
jbe 0x140059fa3
lea eax, [r8 - 0x61]
cmp al, 0x19
jbe 0x140059fa3
lea eax, [r8 - 0x2f]
cmp al, 0xa
jbe 0x140059fa3
cmp r8b, 0x2b
je 0x140059fa3
cmp r8b, 0x3d
je 0x140059f9d
cmp r8b, 0x20
ja 0x140059f8d
bt rcx, r8
jb 0x140059f93
mov r14d, 1
cmp r10, rsi
jb 0x140059f51
jmp 0x14005a086
mov r11d, 1
cmp r10, rsi
jae 0x14005a086
nop dword [rax]
movzx r9d, byte [r10 + r15]
mov ecx, r8d
inc r10
mov edx, r11d
cmp r9d, 0x41
jb 0x140059fca
cmp r9b, 0x5a
jbe 0x14005a011
lea eax, [r9 - 0x61]
cmp al, 0x19
jbe 0x14005a011
lea eax, [r9 - 0x2f]
cmp al, 0xa
jbe 0x14005a011
cmp r9b, 0x2b
je 0x14005a011
cmp r9b, 0x3d
je 0x14005a00b
cmp r9b, 0xd
je 0x14005a004
cmp r9b, 0xa
je 0x14005a004
cmp r9b, 0x20
je 0x14005a004
cmp r9b, 9
je 0x14005a004
mov r14d, 1
cmp r10, rsi
jb 0x140059fb0
jmp 0x14005a086
mov r11d, 1
cmp r10, rsi
jae 0x14005a086
lfence
nop dword [rax]
movzx edi, byte [r10 + r15]
mov ecx, r8d
inc r10
cmp edi, 0x41
jb 0x14005a036
cmp dil, 0x5a
jbe 0x14005a07c
lea eax, [rdi - 0x61]
cmp al, 0x19
jbe 0x14005a07c
lea eax, [rdi - 0x2f]
cmp al, 0xa
jbe 0x14005a07c
cmp dil, 0x2b
je 0x14005a07c
cmp dil, 0x3d
je 0x14005a076
cmp dil, 0x20
ja 0x14005a066
movabs r8, 0x100002600
bt r8, rdi
jb 0x14005a06c
mov r14d, 1
mov r8d, ecx
cmp r10, rsi
jb 0x14005a020
jmp 0x14005a07c
mov r11d, 1
movabs rbp, 0xffffffc07ff1
lea eax, [rbx - 0x2b]
mov ecx, r8d
mov edx, r9d
cmp eax, 0x2f
ja 0x14005a09a
bt rbp, rax
jb 0x14005a0a6
lea eax, [rbx - 0x61]
cmp eax, 0x19
ja 0x14005a164
lea eax, [rcx - 0x2b]
mov r8, rcx
mov r9, rdx
cmp eax, 0x2f
ja 0x14005a0ba
bt rbp, rax
jb 0x14005a0c6
lea eax, [rcx - 0x61]
cmp eax, 0x19
ja 0x14005a164
lea eax, [rdx - 0x2b]
cmp eax, 0x2f
ja 0x14005a0d4
bt rbp, rax
jb 0x14005a0e0
lea eax, [rdx - 0x61]
cmp eax, 0x19
ja 0x14005a164
lea eax, [rdi - 0x2b]
cmp eax, 0x2f
ja 0x14005a0ee
bt rbp, rax
jb 0x14005a0f6
lea eax, [rdi - 0x61]
cmp eax, 0x19
ja 0x14005a164
lea rcx, [0x1401aa490]
movzx edx, byte [r8 + rcx]
movzx r8d, byte [r9 + rcx]
movzx eax, dl
movzx ecx, byte [rbx + rcx]
shr al, 4
and al, 3
shl cl, 2
or cl, al
shl dl, 4
mov byte [r12 + r13], cl
movzx eax, r8b
shr al, 2
lea rcx, [0x1401aa490]
movzx ecx, byte [rdi + rcx]
and al, 0xf
and cl, 0x3f
shl r8b, 6
or al, dl
or cl, r8b
mov byte [r12 + r13 + 1], al
mov byte [r12 + r13 + 2], cl
add r12, 3
test r11d, r11d
jne 0x14005a206
cmp r10, rsi
jae 0x14005a206
jmp 0x140059edc
mov ecx, ebx
call fcn.140059be0
test eax, eax
je 0x14005a206
mov ecx, r8d
call fcn.140059be0
test eax, eax
je 0x14005a206
mov ecx, r9d
call fcn.140059be0
test eax, eax
je 0x14005a1d7
cmp edi, 0x3d
jne 0x14005a1d7
mov eax, r8d
lea r8, [0x1401aa490]
movzx ecx, byte [rbx + r8]
shl cl, 2
movzx edx, byte [rax + r8]
movzx eax, dl
shl dl, 4
shr al, 4
and al, 3
or cl, al
mov eax, r9d
mov byte [r12 + r13], cl
movzx ecx, byte [rax + r8]
shr cl, 2
and cl, 0xf
or cl, dl
mov byte [r12 + r13 + 1], cl
add r12, 2
jmp 0x14005a206
cmp r9d, 0x3d
jne 0x14005a206
cmp edi, r9d
jne 0x14005a206
lea rcx, [0x1401aa490]
mov eax, r8d
movzx edx, byte [rax + rcx]
movzx ecx, byte [rbx + rcx]
shr dl, 4
and dl, 3
shl cl, 2
or dl, cl
mov byte [r12 + r13], dl
inc r12
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x60]
mov rax, qword [rsp + 0x70]
test r14d, r14d
mov r14, qword [rsp + 0x20]
mov qword [rax], r12
sete al
mov r12, qword [rsp + 0x28]
add rsp, 0x30
pop r15
pop r13
pop rsi
ret