Function at 0x505240
Capabilities:
Encode data using base64

Disassembly:
lea r12, [rsp - 8]
cmp r12, qword [r14 + 0x10]
jbe 0x505615
sub rsp, 0x88
mov qword [rsp + 0x80], rbp
lea rbp, [rsp + 0x80]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], rbx
nop word [rax + rax]
nop
cmp rcx, 2
jl 0x505322
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0x90], rax
lea rdx, [rcx + 7]
sar rdx, 0x3f
shr rdx, 0x3d
lea rbx, [rdx + rcx]
lea rbx, [rbx + 7]
sar rbx, 3
mov qword [rsp + 0x38], rbx
lea rax, [0x005cf7c0]
mov rcx, rbx
call fcn.00449160
mov qword [rsp + 0x58], rax
lea rax, [0x005e6440]
call fcn.0040d360
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
movups xmmword [rsp + 0x70], xmm15
mov rdx, qword [rsp + 0xa0]
mov rsi, rdx
sar rdx, 3
shl rdx, 3
sub rsi, rdx
test rsi, rsi
mov edx, 8
cmove rsi, rdx
mov qword [rsp + 0x40], rsi
nop
jmp 0x50535d
nop
lea rax, [0x005df380]
call fcn.0040d360
mov qword [rax + 8], 0x2e
lea rcx, [0x00617043]
mov qword [rax], rcx
lea rbx, [0x0066be40]
mov rcx, rax
xor eax, eax
mov rbp, qword [rsp + 0x80]
add rsp, 0x88
ret
nop
mov rax, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x38]
mov rsi, rdi
mov r8, rsi
nop
call fcn.004ad0a0
test rbx, rbx
jne 0x505525
mov r8, qword [rsp + 0x38]
test r8, r8
jbe 0x50560a
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x30], rbx
mov rdx, qword [rsp + 0x40]
cmp rdx, 0x40
sbb r9, r9
mov rdi, qword [rsp + 0x58]
movzx r10d, byte [rdi]
mov rax, rcx
mov rcx, rdx
mov r11d, 1
shl r11, cl
and r11, r9
lea r9, [r11 - 1]
and r9d, r10d
mov byte [rdi], r9b
cmp rcx, 2
jb 0x5053ff
lea r10, [rcx - 2]
cmp r10, 0x20
sbb r11d, r11d
mov rcx, r10
mov r12d, 3
shl r12d, cl
and r12d, r11d
or r12d, r9d
mov byte [rdi], r12b
jmp 0x505419
or r9d, 1
mov byte [rdi], r9b
cmp r8, 1
jle 0x505419
movzx r9d, byte [rdi + 1]
or r9d, 0xffffff80
mov byte [rdi + 1], r9b
movzx edx, byte [r8 + rdi - 1]
or edx, 1
mov byte [r8 + rdi - 1], dl
nop
mov rdx, qword [rsp + 0x48]
mov rax, qword [rdx + 8]
mov rbx, qword [rdx + 0x10]
mov rcx, qword [rdx + 0x18]
mov rsi, r8
nop dword [rax]
call fcn.004fd980
mov rdx, qword [rsp + 0x48]
mov qword [rdx + 0x10], rbx
mov qword [rdx + 0x18], rcx
cmp dword [0x007d6e60], 0
jne 0x505462
mov qword [rdx + 8], rax
nop
jmp 0x50546b
lea rdi, [rdx + 8]
call fcn.004627c0
mov byte [rdx], 0
mov rcx, qword [0x00780820]
lea rax, [rsp + 0x60]
mov rbx, rdx
nop dword [rax]
call fcn.004f2f00
mov rbx, qword [rsp + 0x70]
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x78]
test rbx, rbx
jne 0x50549d
xor edx, edx
jmp 0x5054a0
mov rdx, qword [rax]
mov rsi, qword [rsp + 0xa0]
xor edi, edi
jmp 0x505541
mov rax, qword [rsp + 0x48]
mov ebx, 0x14
call fcn.00502ca0
nop
test al, al
je 0x505511
mov rax, qword [rsp + 0x48]
mov rdx, qword [rax + 0x10]
mov r9, qword [rax + 8]
lea r10, [rdx - 1]
test r10, r10
jl 0x5054fc
mov rdx, qword [r9 + rdx*8 - 8]
bsr rdx, rdx
mov r9, 0xffffffffffffffff
cmove rdx, r9
shl r10, 6
lea rdx, [rdx + r10]
lea rdx, [rdx + 1]
jmp 0x5054fe
xor edx, edx
mov r9, qword [rsp + 0xa0]
cmp r9, rdx
jne 0x50535d
jmp 0x505565
mov rax, qword [rsp + 0x48]
mov r9, qword [rsp + 0xa0]
nop
jmp 0x50535d
xor eax, eax
mov rbp, qword [rsp + 0x80]
add rsp, 0x88
ret
add rdi, 2
mov rax, r13
mov rdx, r15
cmp rdi, 0x100000
jae 0x5054af
lea r8, [rdi + rdx]
mov r9, qword [0x00779230]
mov r10, qword [0x00779238]
xor r11d, r11d
jmp 0x505588
mov rbx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x80]
add rsp, 0x88
ret
inc r11
mov rax, r13
mov rdx, r15
cmp r11, r10
jge 0x5055c0
movzx r12d, byte [r9 + r11]
test r12, r12
je 0x505605
mov r13, rax
mov rax, r8
mov r15, rdx
xor edx, edx
div r12
test rdx, rdx
jne 0x50557f
cmp rsi, 6
jg 0x505537
cmp r12, r8
je 0x50557f
jmp 0x505537
test rdi, rdi
jbe 0x5054af
nop
call fcn.004f6ee0
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x68], rax
mov byte [rsp + 0x60], 0
mov rax, qword [rsp + 0x48]
mov rbx, rax
lea rcx, [rsp + 0x60]
call fcn.004f27c0
mov rsi, qword [rsp + 0xa0]
nop dword [rax]
jmp 0x5054af
call fcn.00434220
xor eax, eax
mov rcx, r8
call fcn.00462c60
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
call fcn.00460580
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
jmp fcn.00505240