Function at 0x58e110
Capabilities:
Encode data using base64

Disassembly:
mov rax, rsp
mov byte [rax + 0x10], dl
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x120
mov qword [rsp + 0xf8], 0xfffffffffffffffe
mov qword [rax + 8], rbx
xor r15d, r15d
mov r12d, r15d
mov dword [rsp + 0x170], r15d
mov r8b, 0x2c
mov rdx, rcx
lea rcx, [rsp + 0x78]
call fcn.0041fd10
nop
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x78]
movabs rdi, 0x2aaaaaaaaaaaaaab
mov rax, rdi
imul rcx
mov rbx, rdx
sar rbx, 3
mov rax, rbx
shr rax, 0x3f
add rbx, rax
mov qword [rsp + 0x170], rbx
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x40], r15
lea r8, [rsp + 0x170]
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.005ffe4c
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov rcx, qword [rsp + 0x170]
shl rcx, 4
add rcx, rax
mov qword [rsp + 0x40], rcx
lea rcx, [0x007986b0]
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], r15d
shl rbx, 4
add rbx, rax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x170]
lea r8, [rsp + 0x48]
mov rdx, rbx
mov rcx, rax
call fcn.00591e2c
mov qword [rsp + 0x38], rbx
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x78]
mov rax, rdi
imul rcx
mov rbx, rdx
sar rbx, 3
mov rax, rbx
shr rax, 0x3f
add rbx, rax
mov rdi, rbx
mov qword [rsp + 0xb0], r15
mov qword [rsp + 0xb8], r15
mov qword [rsp + 0xc0], r15
movabs rax, 0xfffffffffffffff
cmp rbx, rax
jbe 0x58e293
lea r8d, [r15 + 1]
lea rdx, str.bad_allocation
lea rcx, [rsp + 0x100]
call fcn.006a4a74
lea r11, vtable.std::bad_alloc.0
mov qword [rsp + 0x100], r11
lea rdx, [0x00850ba0]
lea rcx, [rsp + 0x100]
call fcn.006ab82c
int3
mov ebp, 0x100
cmp rbx, r15
je 0x58e2e3
mov rcx, rbx
shl rcx, 4
mov qword [rsp + 0x98], rcx
cmp rcx, rbp
jbe 0x58e2c0
call fcn.006a494c
mov rsi, rax
mov qword [rsp + 0x60], rax
jmp 0x58e2d5
lea rcx, [rsp + 0x98]
call fcn.006a36c0
mov rsi, rax
mov qword [rsp + 0x60], rax
mov rdi, qword [rsp + 0x98]
shr rdi, 4
jmp 0x58e2eb
mov rsi, r15
mov qword [rsp + 0x60], r15
mov qword [rsp + 0xb0], rsi
shl rdi, 4
add rdi, rsi
mov qword [rsp + 0xc0], rdi
shl rbx, 4
add rbx, rsi
mov qword [rsp + 0xb8], rbx
mov r13, r15
mov r14, r15
mov qword [rsp + 0xa8], r15
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x78]
movabs rax, 0x2aaaaaaaaaaaaaab
imul rcx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x58e891
mov r8, r15
mov qword [rsp + 0xa0], r15
lea rdi, [rsi + 8]
mov rsi, r15
mov rax, qword [rsp + 0x78]
lea rbp, [r8 + rax]
xor r8d, r8d
mov dl, 0x3d
mov rcx, rbp
call fcn.00420e80
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x58e4cb
mov rbx, qword [rsp + 0x30]
mov r9, rax
mov r8, qword [rbp + 0x28]
lea rdx, [rsp + 0x48]
lea rcx, [0x008ade00]
call fcn.0044fd94
mov rcx, qword [rax]
mov qword [rsi + rbx], rcx
cmp byte [rsp + 0x168], 0
je 0x58e3e2
mov rax, qword [rbp + 0x28]
and dword [rsp + 0x170], 0
lea rcx, [rax + r15 + 1]
lea r8, [rsp + 0x170]
lea rdx, [0x00795cc0]
call fcn.006a5a7c
mov r11d, dword [rsp + 0x170]
jmp 0x58e46c
or r12d, 1
mov rax, qword [rbp + 0x28]
lea rdx, [rax + r15 + 1]
lea r8, [rsp + 0x170]
lea rcx, [rsp + 0xc8]
call fcn.004021a8
or r12d, 2
lea rcx, [rsp + 0x90]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x74]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x6c]
lea r8, [rsp + 0x178]
lea rdx, str._d._d._d._d
mov rcx, qword [rax + 0x28]
call fcn.006a5a7c
cmp eax, 4
jne 0x58e469
mov r11d, dword [rsp + 0x178]
shl r11d, 8
add r11d, dword [rsp + 0x6c]
shl r11d, 8
add r11d, dword [rsp + 0x74]
shl r11d, 8
add r11d, dword [rsp + 0x90]
jmp 0x58e46c
xor r11d, r11d
mov rax, qword [rsp + 0x30]
mov dword [rsi + rax + 8], r11d
test r12b, 2
je 0x58e4ba
and r12d, 0xfffffffd
lea rax, [rsp + 0xc8]
mov rcx, qword [rsp + 0xf0]
cmp rcx, rax
je 0x58e4ba
test rcx, rcx
je 0x58e4ba
mov rdx, qword [rsp + 0xc8]
sub rdx, rcx
cmp rdx, 0x100
jbe 0x58e4b5
call fcn.006a4944
jmp 0x58e4ba
call fcn.006a3610
test r12b, 1
je 0x58e4c4
and r12d, 0xfffffffe
inc r13
add rsi, 0x10
xor r8d, r8d
mov dl, 0x7e
mov rcx, rbp
call fcn.00420e80
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x58e5c3
mov rcx, qword [rbp + 0x28]
call fcn.0058d91c
xor r15d, r15d
cmp eax, r15d
je 0x58e5c6
mov rcx, rax
shr rcx, 0x20
cmp eax, ecx
ja 0x58e5c6
mov dword [rdi - 8], eax
mov dword [rdi - 4], ecx
mov rax, qword [rbp + 0x28]
lea rdx, [rax + rbx + 1]
lea r8, [rsp + 0x170]
lea rcx, [rsp + 0xc8]
call fcn.004021a8
lea rcx, [rsp + 0x5c]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x70]
lea rdx, str._d._d._d._d
mov rcx, qword [rax + 0x28]
call fcn.006a5a7c
cmp eax, 4
jne 0x58e57b
mov eax, dword [rsp + 0x70]
shl eax, 8
add eax, dword [rsp + 0x68]
shl eax, 8
add eax, dword [rsp + 0x58]
shl eax, 8
add eax, dword [rsp + 0x5c]
jmp 0x58e57e
mov eax, r15d
mov dword [rdi], eax
lea rax, [rsp + 0xc8]
mov rcx, qword [rsp + 0xf0]
cmp rcx, rax
je 0x58e5ba
cmp rcx, r15
je 0x58e5ba
mov rdx, qword [rsp + 0xc8]
sub rdx, rcx
cmp rdx, 0x100
jbe 0x58e5b5
call fcn.006a4944
jmp 0x58e5ba
call fcn.006a3610
inc r14
add rdi, 0x10
jmp 0x58e5c6
xor r15d, r15d
mov rbx, qword [rsp + 0xa8]
inc rbx
mov qword [rsp + 0xa8], rbx
mov r8, qword [rsp + 0xa0]
add r8, 0x30
mov qword [rsp + 0xa0], r8
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x78]
movabs rax, 0x2aaaaaaaaaaaaaab
imul rcx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rbx, rdx
jb 0x58e35f
cmp r13, r15
mov rdi, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0x60]
jne 0x58e639
cmp r14, r15
je 0x58e88c
lea rax, [0x007986b0]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], r15d
mov rbx, qword [rsp + 0x38]
mov rax, rbx
mov rbp, qword [rsp + 0x30]
sub rax, rbp
sar rax, 4
cmp r13, rax
jae 0x58e67c
mov rax, r13
shl rax, 4
add rax, rbp
cmp rax, rbx
je 0x58e6f1
mov rbx, rax
mov qword [rsp + 0x38], rax
jmp 0x58e6f1
mov rcx, r13
sub rcx, rax
je 0x58e6f1
mov rax, qword [rsp + 0x40]
sub rax, rbx
sar rax, 4
cmp rax, rcx
jb 0x58e6c3
lea rax, [rsp + 0x170]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
mov r8, rcx
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.005914ac
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x30]
jmp 0x58e6f1
mov byte [rsp + 0x28], r15b
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x170]
lea r8, [rsp + 0x48]
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.00591364
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x30]
cmp rbp, rbx
je 0x58e7ac
mov rax, rbx
sub rax, rbp
sar rax, 4
mov r9, r15
cmp rax, 1
je 0x58e719
inc r9
sar rax, 1
cmp rax, 1
jne 0x58e70d
add r9, r9
lea r12, [fcn.0058e0ec]
mov qword [rsp + 0x20], r12
xor r8d, r8d
mov rdx, rbx
mov rcx, rbp
call fcn.00591604
mov r11, rbx
sub r11, rbp
and r11, 0xfffffffffffffff0
cmp r11, 0x100
jle 0x58e79b
lea r12, [rbp + 0x100]
lea r9, [fcn.0058e0ec]
xor r8d, r8d
mov rdx, r12
mov rcx, rbp
call fcn.00591b44
cmp r12, rbx
je 0x58e7ac
mov rax, qword [r12]
mov qword [rsp + 0x48], rax
mov eax, dword [r12 + 8]
mov dword [rsp + 0x50], eax
lea r8, [fcn.0058e0ec]
lea rdx, [rsp + 0x48]
mov rcx, r12
call fcn.00591e68
add r12, 0x10
cmp r12, rbx
jne 0x58e76a
jmp 0x58e7ac
mov r9, r12
xor r8d, r8d
mov rdx, rbx
mov rcx, rbp
call fcn.00591b44
lea rcx, [r14 + r13 + 3]
shl rcx, 4
call fcn.006a5470
mov rbx, rax
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], r14
cmp r13, r15
jbe 0x58e7f9
mov r8, r15
lea r9, [rax + 0x28]
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rcx + r8]
mov qword [r9 - 8], rdx
mov rax, qword [rsp + 0x30]
mov ecx, dword [rax + r8 + 8]
mov dword [r9], ecx
add r8, 0x10
add r9, 0x10
sub r13, 1
jne 0x58e7d1
mov rdx, r15
cmp r14, r15
jbe 0x58e826
mov r8, rsi
mov rax, qword [rbx + 0x10]
lea rcx, [rdx + rax + 2]
add rcx, rcx
movdqu xmm0, xmmword [r8]
movdqu xmmword [rbx + rcx*8], xmm0
inc rdx
add r8, 0x10
cmp rdx, r14
jb 0x58e804
cmp rsi, r15
je 0x58e851
sub rdi, rsi
and rdi, 0xfffffffffffffff0
cmp rdi, 0x100
jbe 0x58e845
mov rcx, rsi
call fcn.006a4944
jmp 0x58e851
mov rdx, rdi
mov rcx, rsi
call fcn.006a3610
nop
mov rcx, qword [rsp + 0x30]
cmp rcx, r15
je 0x58e87d
mov rdx, qword [rsp + 0x40]
sub rdx, rcx
and rdx, 0xfffffffffffffff0
cmp rdx, 0x100
jbe 0x58e877
call fcn.006a4944
jmp 0x58e87d
call fcn.006a3610
nop
lea rcx, [rsp + 0x78]
call fcn.00401d58
mov rax, rbx
jmp 0x58e8ec
mov ebp, 0x100
cmp rsi, r15
je 0x58e8b8
sub rdi, rsi
and rdi, 0xfffffffffffffff0
cmp rdi, rbp
jbe 0x58e8ac
mov rcx, rsi
call fcn.006a4944
jmp 0x58e8b8
mov rdx, rdi
mov rcx, rsi
call fcn.006a3610
nop
mov rcx, qword [rsp + 0x30]
cmp rcx, r15
je 0x58e8e0
mov rdx, qword [rsp + 0x40]
sub rdx, rcx
and rdx, 0xfffffffffffffff0
cmp rdx, rbp
jbe 0x58e8da
call fcn.006a4944
jmp 0x58e8e0
call fcn.006a3610
nop
lea rcx, [rsp + 0x78]
call fcn.00401d58
xor eax, eax
mov rbx, qword [rsp + 0x160]
add rsp, 0x120
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret