Function at 0x140036450
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov rbp, r9
mov r15d, r8d
mov rdi, rdx
mov r14, rcx
mov rax, qword [0x1404a7eb8]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov dword [rcx], 0
lea rcx, [0x1404a9578]
lea rdx, [0x140027730]
call fcn.1400a4e60
lea rdx, [0x1404a9580]
mov rcx, rdi
call fcn.1400284c0
mov esi, 1
test eax, eax
jle 0x140036a8e
mov r12d, dword [rdi + 8]
test r12d, r12d
jle 0x14003655f
mov r13, qword [rdi]
mov rbx, qword [r13]
test bl, 1
jne 0x140036588
xor rbx, 2
cmp r12d, 1
je 0x140036572
mov eax, 1
cmp r12d, 5
jb 0x140036550
lea rcx, [r12 - 1]
mov rdx, rcx
and rdx, 0xfffffffffffffffc
lea rax, [rdx + 1]
movq xmm1, rbx
pxor xmm0, xmm0
xor r8d, r8d
nop word cs:[rax + rax]
movdqu xmm2, xmmword [r13 + r8*8 + 8]
por xmm1, xmm2
movdqu xmm2, xmmword [r13 + r8*8 + 0x18]
por xmm0, xmm2
add r8, 4
cmp rdx, r8
jne 0x140036510
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
movq rbx, xmm1
cmp rcx, rdx
je 0x140036572
nop word cs:[rax + rax]
or rbx, qword [r13 + rax*8]
inc rax
cmp r12, rax
jne 0x140036550
jmp 0x140036572
test r12, r12
je 0x1400366ed
mov rax, qword [rdi]
mov rbx, qword [rax]
xor rbx, 2
xor eax, eax
test rbx, rbx
jne 0x140036580
cmp dword [rdi + 0x10], 0
sete al
mov dword [r14], eax
jmp 0x140036a8e
mov rcx, rbx
xor rcx, 3
cmp r12d, 1
je 0x14003660d
mov eax, 1
cmp r12d, 5
jb 0x140036600
lea rdx, [r12 - 1]
mov r8, rdx
and r8, 0xfffffffffffffffc
lea rax, [r8 + 1]
movq xmm1, rcx
pxor xmm0, xmm0
xor ecx, ecx
nop dword [rax + rax]
movdqu xmm2, xmmword [r13 + rcx*8 + 8]
por xmm1, xmm2
movdqu xmm2, xmmword [r13 + rcx*8 + 0x18]
por xmm0, xmm2
add rcx, 4
cmp r8, rcx
jne 0x1400365c0
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
movq rcx, xmm1
cmp rdx, r8
je 0x14003660d
nop word cs:[rax + rax]
or rcx, qword [r13 + rax*8]
inc rax
cmp r12, rax
jne 0x140036600
test rcx, rcx
jne 0x14003661c
cmp dword [rdi + 0x10], 0
je 0x140036713
cmp dword [rsp + 0xe0], 0
je 0x1400366b6
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x30], r14
xor ebp, ebp
cmp r12d, 0x11
setge bpl
shl ebp, 9
add rbp, 0x200
mov esi, 1
lea r14, [0x14039a4f0]
nop dword [rax]
movzx r15d, word [r14 + rsi*2]
mov rcx, rdi
mov edx, r15d
call fcn.14002baf0
xor ecx, ecx
test ax, ax
sete cl
test ecx, ecx
jne 0x1400366f7
inc rsi
cmp rbp, rsi
jne 0x140036660
mov r8, qword [rsp + 0xe8]
test r8, r8
mov r14, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x28]
mov r15d, dword [rsp + 0x38]
je 0x1400366b6
mov ecx, 1
mov edx, 0xffffffff
call qword [rioctlsocket + 8]
test eax, eax
je 0x140036973
test r15d, r15d
jne 0x1400368c5
mov ecx, dword [rdi + 8]
test ecx, ecx
jle 0x1400367b5
mov rax, qword [rdi]
nop dword [rax]
mov edx, ecx
cmp qword [rax + rdx*8 - 8], 0
jne 0x1400367be
lea edx, [rcx - 1]
cmp ecx, 1
mov ecx, edx
jg 0x1400366d0
jmp 0x1400368bf
xor eax, eax
mov dword [r14], eax
jmp 0x140036a8e
movzx eax, r15w
xor rbx, rax
cmp r12d, 1
jne 0x14003671f
mov r9, qword [rsp + 0x30]
mov esi, 1
jmp 0x14003679d
mov dword [r14], 1
jmp 0x140036a8e
mov eax, 1
cmp r12d, 5
mov r9, qword [rsp + 0x30]
mov esi, 1
jb 0x140036790
lea rcx, [r12 - 1]
mov rdx, rcx
and rdx, 0xfffffffffffffffc
lea rax, [rdx + 1]
movq xmm1, rbx
pxor xmm0, xmm0
xor r8d, r8d
movdqu xmm2, xmmword [r13 + r8*8 + 8]
por xmm1, xmm2
movdqu xmm2, xmmword [r13 + r8*8 + 0x18]
por xmm0, xmm2
add r8, 4
cmp rdx, r8
jne 0x140036750
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
movq rbx, xmm1
cmp rcx, rdx
je 0x14003679d
nop word cs:[rax + rax]
or rbx, qword [r13 + rax*8]
inc rax
cmp r12, rax
jne 0x140036790
xor eax, eax
test rbx, rbx
jne 0x1400367ad
xor eax, eax
cmp dword [rdi + 0x10], 0
sete al
mov dword [r9], eax
jmp 0x140036a8e
je 0x1400368bf
mov rax, qword [rdi]
movsxd rdx, ecx
shl ecx, 6
mov rdx, qword [rax + rdx*8 - 8]
xor eax, eax
test rdx, rdx
setne al
or eax, ecx
xor ecx, ecx
mov r8, rdx
shr r8, 0x20
setne cl
cmove r8, rdx
shl ecx, 5
mov r9, r8
shr r9, 0x10
xor edx, edx
cmp r8, 0x10000
setae dl
cmovb r9, r8
shl edx, 4
mov r10, r9
shr r10, 8
xor r8d, r8d
cmp r9, 0x100
setae r8b
cmovb r10, r9
mov r9, r10
shr r9, 4
xor r11d, r11d
cmp r10, 0x10
cmovb r9, r10
setae r11b
mov r10, r9
shr r10, 2
xor esi, esi
cmp r9, 4
setae sil
cmovb r10, r9
or ecx, eax
or ecx, edx
cmp r10, 2
lea eax, [rcx + r8*8]
lea eax, [rax + r11*4]
lea eax, [rax + rsi*2]
sbb eax, 0xffffffff
add eax, 0xffffffc0
mov r15d, 3
cmp eax, 0xea2
jg 0x1400368c5
mov r15d, 4
cmp eax, 0x540
jg 0x1400368c5
mov r15d, 5
cmp eax, 0x1db
jg 0x1400368c5
mov r15d, 6
cmp eax, 0x18f
jg 0x1400368c5
mov r15d, 7
cmp eax, 0x15a
jg 0x1400368c5
mov r15d, 8
cmp eax, 0x133
jg 0x1400368c5
cmp eax, 0x37
mov eax, 0x1b
mov r15d, 0x22
cmovge r15d, eax
jmp 0x1400368c5
mov r15d, 0x22
xor esi, esi
test rbp, rbp
je 0x1400368db
xor r12d, r12d
cmp byte [rbp + 0x28], 0
jne 0x140036980
jmp 0x14003690c
mov ecx, 0x30
call fcn.1400985f0
test rax, rax
je 0x140036a8e
mov r12, rax
pxor xmm0, xmm0
movdqu xmmword [rax + 0x1a], xmm0
movdqu xmmword [rax + 0x10], xmm0
movdqu xmmword [rax], xmm0
mov rbp, rax
cmp byte [rbp + 0x28], 0
jne 0x140036980
mov rcx, qword [rbp + 0x10]
mov rbx, qword [rbp + 0x20]
cmp rcx, qword [rbp + 0x18]
jne 0x140036965
lea rax, [rcx + rcx*2]
shr rax, 1
test rcx, rcx
mov esi, 0x20
cmovne rsi, rax
cmp rsi, rcx
setbe al
mov rcx, rsi
shr rcx, 0x3d
setne cl
or cl, al
jne 0x14003697a
lea rdx, [rsi*8]
mov rcx, qword [rbp + 8]
call fcn.1400987b0
test rax, rax
je 0x14003697a
mov qword [rbp + 8], rax
mov qword [rbp + 0x18], rsi
mov rcx, qword [rbp + 0x10]
jmp 0x140036969
mov rax, qword [rbp + 8]
mov qword [rax + rcx*8], rbx
inc qword [rbp + 0x10]
jmp 0x140036980
xor esi, esi
jmp 0x140036a8e
mov word [rbp + 0x28], 0x101
mov ebx, r15d
mov rcx, rbp
call fcn.140028b10
mov r15, rax
mov ecx, 0x40
call fcn.1400985f0
mov r13, rax
test rax, rax
je 0x140036a2c
pxor xmm0, xmm0
movdqu xmmword [r13 + 0x30], xmm0
movdqu xmmword [r13 + 0x20], xmm0
movdqu xmmword [r13 + 0x10], xmm0
movdqu xmmword [r13], xmm0
mov rcx, r13
mov rdx, rdi
call fcn.140033220
test eax, eax
je 0x140036a2c
mov rcx, r13
mov rdx, rbp
call fcn.140033680
test eax, eax
je 0x140036a2c
xor esi, esi
test r15, r15
je 0x140036a39
lea rcx, [rsp + 0x48]
mov rdx, r13
mov r8, rbp
call fcn.140035770
test eax, eax
je 0x140036a39
mov qword [rsp + 0x28], rbp
mov rax, 0xffffffffffffffff
test rax, rax
je 0x140036b74
movsxd rax, ebx
mov qword [rsp + 0x38], rax
mov edi, 1
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x30], rax
xor ebp, ebp
jmp 0x140036af0
mov rcx, r13
call fcn.14002c8a0
xor r13d, r13d
xor esi, esi
mov rcx, r13
call fcn.14002c8a0
cmp byte [rbp + 0x28], 0
jne 0x140036a60
mov rax, qword [rbp + 8]
mov rcx, qword [rbp + 0x10]
lea rdx, [rcx - 1]
mov qword [rbp + 0x10], rdx
mov rax, qword [rax + rcx*8 - 8]
mov qword [rbp + 0x20], rax
test r12, r12
je 0x140036a8e
mov rcx, qword [r12]
lea rdx, [0x140018ac0]
lea r8, [fcn.140027560]
call fcn.1400a44e0
mov rcx, qword [r12 + 8]
call fcn.140098760
mov rcx, r12
call fcn.140098760
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
cmp rcx, qword [0x1404a7eb8]
jne 0x140036ab2
mov eax, esi
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.14029fd30
int3
add rbp, rbx
xor eax, eax
cmp edi, 0x10
lea edi, [rdi + 1]
setb al
mov rdx, rbp
mov r9, qword [rsp + 0x38]
xor rdx, r9
mov r8, rbp
sub r8, r9
xor r8, rbp
or r8, rdx
xor r8, rbp
sar r8, 0x3f
or r8, rax
test r8, r8
je 0x140036b74
mov r8d, 2
mov rcx, r15
lea rdx, [rsp + 0x44]
mov r9, qword [rsp + 0x30]
call fcn.140036bb0
test eax, eax
je 0x140036b8a
movsxd rbx, dword [rsp + 0x44]
mov dword [rsp + 0x40], 0
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x48]
lea rdx, [rsp + 0x40]
mov r8, r15
mov r9, r13
call fcn.140035a90
xor esi, esi
test eax, eax
je 0x140036b6a
cmp dword [rsp + 0x40], 0
je 0x140036b94
mov r8, qword [rsp + 0xe8]
test r8, r8
je 0x140036ab8
lea edx, [rdi - 1]
mov ecx, 1
call qword [rioctlsocket + 8]
test eax, eax
jne 0x140036ab8
mov rbp, qword [rsp + 0x28]
jmp 0x140036a39
mov dword [r14], 1
mov rbp, qword [rsp + 0x28]
mov esi, 1
jmp 0x140036a39
mov rbp, qword [rsp + 0x28]
jmp 0x140036a37
mov dword [r14], 0
mov esi, 1
mov rbp, qword [rsp + 0x28]
jmp 0x140036a39