Function at 0x14004f650
Capabilities:
Encode data using base64

Disassembly:
push rsi
push rdi
push r12
push r13
sub rsp, 0x168
mov rax, qword [0x1402c8b58]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov r13, rcx
mov esi, r8d
lea r8d, [r8*4 + 8]
mov eax, 0xaaaaaaab
mov r12, rdx
mov rdi, r9
mov r9d, dword [rcx + 8]
mul r8d
mov ecx, edx
shr ecx, 1
test r9d, r9d
je 0x14004f6a5
xor edx, edx
lea eax, [rcx + rcx]
div r9d
add eax, ecx
jmp 0x14004f6a7
mov eax, ecx
mov qword [rsp + 0x160], rbx
lea edx, [rax + 3]
mov qword [rsp + 0x158], rbp
mov rcx, rdi
mov qword [rsp + 0x150], r14
mov qword [rsp + 0x148], r15
call fcn.140035d80
test al, al
je 0x14004f955
test esi, esi
je 0x14004f951
test r12, r12
je 0x14004f951
mov eax, 0xaaaaaaab
lea r10, [0x1401f0ec0]
mul esi
xor ebp, ebp
xor r15d, r15d
mov r14d, edx
xor r8d, r8d
xor ebx, ebx
shr r14d, 1
je 0x14004f825
nop
movzx r9d, byte [rbp + r12]
lea rdx, [0x1401f0ec0]
movsxd rcx, r8d
mov eax, r9d
shr rax, 2
inc r8d
inc ebp
and r9d, 3
shl r9d, 4
add r15d, 4
movzx eax, byte [rax + rdx]
movzx r11d, byte [rbp + r12]
inc ebp
mov byte [rsp + rcx + 0x20], al
mov eax, r11d
shr rax, 4
and r11d, 0xf
movsxd rcx, r8d
inc r8d
mov edx, r9d
or rdx, rax
mov r10d, ebp
lea rax, [0x1401f0ec0]
shl r11d, 2
inc ebp
movzx eax, byte [rdx + rax]
movzx r9d, byte [r10 + r12]
lea r10, [0x1401f0ec0]
mov byte [rsp + rcx + 0x20], al
mov eax, r9d
shr rax, 6
and r9d, 0x3f
movsxd rcx, r8d
inc r8d
mov edx, r11d
or rdx, rax
movzx eax, byte [rdx + r10]
mov byte [rsp + rcx + 0x20], al
movzx eax, byte [r9 + r10]
movsxd rcx, r8d
inc r8d
mov byte [rsp + rcx + 0x20], al
cmp r15d, dword [r13 + 8]
jb 0x14004f7d1
movsxd rax, r8d
inc r8d
mov byte [rsp + rax + 0x20], recv
movsxd rax, r8d
inc r8d
xor r15d, r15d
mov byte [rsp + rax + 0x20], 0xa
cmp r8d, 0x100
jl 0x14004f7f9
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.140032210
test al, al
je 0x14004f955
xor r8d, r8d
lea r10, [0x1401f0ec0]
inc ebx
cmp ebx, r14d
jb 0x14004f710
test r8d, r8d
je 0x14004f825
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.140032210
test al, al
je 0x14004f955
lea r10, [0x1401f0ec0]
lea eax, [r14 + r14*2]
mov bl, 1
sub esi, eax
je 0x14004f90e
sub esi, 1
je 0x14004f8ac
cmp esi, 1
jne 0x14004f92c
movzx r14d, byte [rbp + r12]
lea eax, [rbp + 1]
movzx esi, byte [rax + r12]
mov edx, r14d
shr rdx, 2
mov rcx, rdi
movzx edx, byte [rdx + r10]
call fcn.140031340
movzx ebx, al
test al, al
je 0x14004f92c
and r14d, 3
lea rbp, [0x1401f0ec0]
shl r14d, 4
mov eax, esi
shr rax, 4
mov rcx, rdi
mov edx, r14d
or rdx, rax
movzx edx, byte [rdx + rbp]
call fcn.140031340
movzx ebx, al
test al, al
je 0x14004f92c
and esi, 0xf
shl esi, 2
movzx edx, byte [rsi + rbp]
jmp 0x14004f8ee
movzx esi, byte [rbp + r12]
mov rcx, rdi
mov edx, esi
shr rdx, 2
movzx edx, byte [rdx + r10]
call fcn.140031340
movzx ebx, al
test al, al
je 0x14004f92c
and esi, 3
lea rax, [0x1401f0ec0]
shl esi, 4
mov rcx, rdi
movzx edx, byte [rsi + rax]
call fcn.140031340
movzx ebx, al
test al, al
je 0x14004f92c
mov dl, 0x3d
mov rcx, rdi
call fcn.140031340
movzx ebx, al
test al, al
je 0x14004f92c
mov dl, 0x3d
mov rcx, rdi
call fcn.140031340
movzx ebx, al
test al, al
je 0x14004f92c
mov dl, 0xd
mov rcx, rdi
call fcn.140031340
movzx ebx, al
test al, al
je 0x14004f92c
mov dl, 0xa
mov rcx, rdi
call fcn.140031340
movzx ebx, al
lea rdx, str._r_n_r_n
mov rcx, rdi
call fcn.140035a50
test al, al
je 0x14004f94c
mov edx, 2
mov rcx, rdi
call fcn.14003a540
movzx eax, bl
jmp 0x14004f957
mov al, 1
jmp 0x14004f957
xor al, al
mov r15, qword [rsp + 0x148]
mov r14, qword [rsp + 0x150]
mov rbp, qword [rsp + 0x158]
mov rbx, qword [rsp + 0x160]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1401e12d0
add rsp, 0x168
pop r13
pop r12
pop rdi
pop rsi
ret