Function at 0x140039480
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
lea r12, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
lea rax, [0x14005f4c0]
test r8b, r8b
mov r14, rcx
mov r13, rdx
cmove r12, rax
imul rbx, rdx, 4
jo 0x140039c6c
movabs rax, 0x5555555555555556
imul rbx
sar rbx, 0x3f
sub rdx, rbx
mov rbx, rdx
add rbx, 6
js 0x140039a00
xor ecx, ecx
mov rdx, rbx
call fcn.14000bef0
mov rcx, r13
mov rdi, rax
movabs rax, 0x5555555555555556
imul r13
mov rax, r13
sar rax, 0x3f
sub rdx, rax
lea rax, [rdx + rdx*2]
sub rcx, rax
mov rax, r13
sub rax, rcx
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x20], rax
jo 0x140039c4e
cmp qword [rsp + 0x20], 0
je 0x140039ba0
xor r15d, r15d
xor esi, esi
lea rax, [r13 - 1]
test rdi, rdi
mov qword [rsp + 0x28], rax
setne byte [rsp + 0x3f]
jne 0x140039620
jmp 0x1400396c0
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
mov edx, ebp
shr edx, 0x12
movzx edx, byte [r12 + rdx]
mov byte [rdi + r15 + 0x10], dl
add r15, 1
jo 0x140039c3a
mov rdx, qword [rdi]
test r15, r15
js 0x140039582
cmp r15, rdx
jl 0x14003958e
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
mov edx, ebp
shr edx, 0xc
and edx, 0x3f
movzx edx, byte [r12 + rdx]
mov byte [rdi + r15 + 0x10], dl
add r15, 1
jo 0x140039c26
mov rdx, qword [rdi]
test r15, r15
js 0x1400395b7
cmp r15, rdx
jl 0x1400395c3
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
mov edx, ebp
shr edx, 6
and edx, 0x3f
movzx edx, byte [r12 + rdx]
mov byte [rdi + r15 + 0x10], dl
add r15, 1
jo 0x140039c1c
mov rdx, qword [rdi]
test r15, r15
js 0x1400395ec
cmp r15, rdx
jl 0x1400395f8
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
and ebp, 0x3f
mov rax, r15
movzx edx, byte [r12 + rbp]
add rax, 1
mov byte [rdi + r15 + 0x10], dl
mov r15, rax
jo 0x1400398a8
cmp qword [rsp + 0x20], rbx
je 0x140039811
test rsi, rsi
js 0x140039890
cmp r13, rsi
jle 0x140039890
movzx ebp, byte [r14 + rsi]
shl ebp, 0x10
add rsi, 1
mov rbx, rsi
jo 0x140039c30
test rbx, rbx
js 0x140039878
cmp rbx, r13
jge 0x140039878
movzx esi, byte [r14 + rbx]
shl esi, 8
or esi, ebp
add rbx, 1
jo 0x140039c44
test rbx, rbx
js 0x140039860
cmp rbx, r13
jge 0x140039860
movzx ebp, byte [r14 + rbx]
or ebp, esi
add rbx, 1
mov rsi, rbx
jo 0x140039850
mov rdx, qword [rdi]
test r15, r15
js 0x140039550
cmp rdx, r15
jg 0x14003955c
jmp 0x140039550
call fcn.140008a30
cmp qword [rsp + 0x20], rbx
je 0x140039811
cmp r13, rsi
jle 0x1400398f8
test rsi, rsi
js 0x1400398f8
movzx ebp, byte [r14 + rsi]
shl ebp, 0x10
add rsi, 1
mov rbx, rsi
jo 0x140039c80
cmp r13, rbx
jle 0x1400398e0
test rbx, rbx
js 0x1400398e0
movzx esi, byte [r14 + rbx]
shl esi, 8
or esi, ebp
add rbx, 1
jo 0x140039c76
cmp r13, rbx
jle 0x1400398c8
test rbx, rbx
js 0x1400398c8
movzx ebp, byte [r14 + rbx]
or ebp, esi
add rbx, 1
mov rsi, rbx
jo 0x1400398b8
mov rdx, 0xffffffffffffffff
mov rcx, r15
call fcn.14000dfd0
mov edx, ebp
shr edx, 0x12
movzx edx, byte [r12 + rdx]
mov byte [r15 + 0x10], dl
add r15, 1
jo 0x140039c58
mov rdx, qword [pe_dos_header]
test r15, r15
js 0x14003976c
cmp rdx, r15
jg 0x140039778
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
mov edx, ebp
shr edx, 0xc
and edx, 0x3f
movzx edx, byte [r12 + rdx]
mov byte [r15 + 0x10], dl
add r15, 1
jo 0x140039c8a
mov rdx, qword [pe_dos_header]
test r15, r15
js 0x1400397a5
cmp rdx, r15
jg 0x1400397b1
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
mov edx, ebp
shr edx, 6
and edx, 0x3f
movzx edx, byte [r12 + rdx]
mov byte [r15 + 0x10], dl
add r15, 1
jo 0x140039c62
mov rdx, qword [pe_dos_header]
test r15, r15
js 0x1400397de
cmp rdx, r15
jg 0x1400397ea
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
and ebp, 0x3f
mov rax, r15
movzx edx, byte [r12 + rbp]
add rax, 1
mov byte [r15 + 0x10], dl
mov r15, rax
jo 0x1400396b0
cmp qword [rsp + 0x20], rbx
jne 0x1400396c0
cmp qword [rsp + 0x30], 1
je 0x140039910
cmp qword [rsp + 0x30], 2
je 0x140039a40
test r15, r15
js 0x140039a20
mov rdx, r15
mov rcx, rdi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.14000bef0
call fcn.140008a30
jmp 0x140039693
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call fcn.14000dfd0
jmp 0x14003967f
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call fcn.14000dfd0
jmp 0x140039659
mov rdx, qword [rsp + 0x28]
mov rcx, rsi
call fcn.14000dfd0
jmp 0x140039632
call fcn.140008a30
jmp 0x140039615
call fcn.140008a30
jmp 0x140039733
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call fcn.14000dfd0
jmp 0x14003971f
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call fcn.14000dfd0
jmp 0x1400396f9
mov rdx, qword [rsp + 0x28]
mov rcx, rsi
call fcn.14000dfd0
jmp 0x1400396d2
test rsi, rsi
js 0x140039b70
cmp r13, rsi
jle 0x140039b70
mov rbx, r15
add r14, rsi
not rbx
shr rbx, 0x3f
and bl, byte [rsp + 0x3f]
movzx ebp, byte [r14]
shl ebp, 0x10
add rsi, 1
jo 0x140039cb2
test bl, bl
jne 0x140039b88
mov rdx, 0xffffffffffffffff
test rdi, rdi
je 0x14003995f
mov rdx, qword [rdi]
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
mov edx, ebp
mov rbx, r15
shr edx, 0x12
add rbx, 1
movzx edx, byte [r12 + rdx]
mov byte [rdi + r15 + 0x10], dl
jo 0x140039ca8
mov rdx, qword [rdi]
test rbx, rbx
js 0x140039990
cmp rbx, rdx
jl 0x14003999c
sub rdx, 1
mov rcx, rbx
call fcn.14000dfd0
shr ebp, 0xc
and ebp, 0x30
movzx eax, byte [r12 + rbp]
mov byte [rdi + rbx + 0x10], al
add rbx, 1
jo 0x140039c9e
mov rdx, qword [rdi]
test rbx, rbx
js 0x1400399c2
cmp rbx, rdx
jl 0x1400399ce
sub rdx, 1
mov rcx, rbx
call fcn.14000dfd0
mov byte [rdi + rbx + 0x10], 0x3d
add rbx, 1
jo 0x140039c94
mov rdx, qword [rdi]
test rbx, rbx
js 0x1400399ee
cmp rbx, rdx
jl 0x140039b58
sub rdx, 1
mov rcx, rbx
call fcn.14000dfd0
jmp 0x140039b58
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, rbx
call fcn.14000de30
jmp 0x1400394d6
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, r15
call fcn.14000de30
jmp 0x140039832
test rsi, rsi
js 0x140039bfb
cmp r13, rsi
jle 0x140039bfb
mov rax, r15
lea rdx, [r14 + rsi]
not rax
shr rax, 0x3f
and al, byte [rsp + 0x3f]
movzx ebx, byte [rdx]
shl ebx, 0x10
add rsi, 1
jo 0x140039cf7
test rsi, rsi
js 0x140039be1
cmp rsi, r13
jge 0x140039be1
movzx ebp, byte [r14 + rsi]
shl ebp, 8
or ebp, ebx
add rsi, 1
jo 0x140039ce4
test al, al
jne 0x140039bd0
mov rdx, 0xffffffffffffffff
test rdi, rdi
je 0x140039ab5
mov rdx, qword [rdi]
sub rdx, 1
mov rcx, r15
call fcn.14000dfd0
mov edx, ebp
mov rbx, r15
shr edx, 0x12
add rbx, 1
movzx edx, byte [r12 + rdx]
mov byte [rdi + r15 + 0x10], dl
jo 0x140039cda
mov rax, qword [rdi]
test rbx, rbx
js 0x140039ae6
cmp rbx, rax
jl 0x140039af2
lea rdx, [rax - 1]
mov rcx, rbx
call fcn.14000dfd0
mov eax, ebp
shr eax, 0xc
and eax, 0x3f
movzx eax, byte [r12 + rax]
mov byte [rdi + rbx + 0x10], al
add rbx, 1
jo 0x140039cd0
mov rax, qword [rdi]
test rbx, rbx
js 0x140039b1a
cmp rbx, rax
jl 0x140039b26
lea rdx, [rax - 1]
mov rcx, rbx
call fcn.14000dfd0
shr ebp, 6
and ebp, 0x3c
movzx eax, byte [r12 + rbp]
mov byte [rdi + rbx + 0x10], al
add rbx, 1
jo 0x140039cc6
mov rax, qword [rdi]
test rbx, rbx
js 0x140039b4c
cmp rbx, rax
jl 0x140039b58
lea rdx, [rax - 1]
mov rcx, rbx
call fcn.14000dfd0
mov byte [rdi + rbx + 0x10], 0x3d
add rbx, 1
jo 0x140039cbc
mov r15, rbx
jmp 0x140039829
lea rdx, [r13 - 1]
mov rcx, rsi
call fcn.14000dfd0
jmp 0x140039922
mov rdx, qword [rdi]
cmp rdx, r15
jle 0x14003995b
jmp 0x140039967
cmp qword [rsp + 0x30], 1
je 0x140039c0c
xor r15d, r15d
cmp qword [rsp + 0x30], 2
jne 0x140039832
test rdi, rdi
mov rdx, r14
setne al
xor esi, esi
jmp 0x140039a64
mov rdx, qword [rdi]
cmp rdx, r15
jle 0x140039ab1
jmp 0x140039abd
lea rdx, [r13 - 1]
mov rcx, rsi
mov byte [rsp + 0x20], al
call fcn.14000dfd0
movzx eax, byte [rsp + 0x20]
jmp 0x140039a86
lea rdx, [r13 - 1]
mov rcx, rsi
call fcn.14000dfd0
jmp 0x140039a52
test rdi, rdi
setne bl
xor r15d, r15d
xor esi, esi
jmp 0x140039933
call fcn.140008a30
jmp 0x1400395df
call fcn.140008a30
jmp 0x1400395aa
call fcn.140008a30
jmp 0x140039647
call fcn.140008a30
jmp 0x140039575
call fcn.140008a30
jmp 0x14003966d
call fcn.140008a30
jmp 0x14003951a
call fcn.140008a30
jmp 0x14003975a
call fcn.140008a30
jmp 0x1400397cc
call fcn.140008a30
jmp 0x1400394b5
call fcn.140008a30
jmp 0x14003970d
call fcn.140008a30
jmp 0x1400396e7
call fcn.140008a30
jmp 0x140039793
call fcn.140008a30
jmp 0x1400399dd
call fcn.140008a30
jmp 0x1400399b5
call fcn.140008a30
jmp 0x140039983
call fcn.140008a30
jmp 0x140039944
call fcn.140008a30
jmp 0x140039b67
call fcn.140008a30
jmp 0x140039b3f
call fcn.140008a30
jmp 0x140039b0d
call fcn.140008a30
jmp 0x140039ad9
mov byte [rsp + 0x20], al
call fcn.140008a30
movzx eax, byte [rsp + 0x20]
jmp 0x140039a9a
mov byte [rsp + 0x20], al
call fcn.140008a30
movzx eax, byte [rsp + 0x20]
jmp 0x140039a74