Function at 0x180231820
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x40
mov rbp, qword [rsp + 0xa0]
xor ebx, ebx
mov r14, qword [rcx + 0x20]
add rbp, r9
mov rsi, r9
mov r13, r8
mov rdi, rcx
mov qword [rsp + 0x80], r9
mov r12d, ebx
mov qword [rsp + 0xa0], r14
cmp byte [rcx + 0x3c], bl
je 0x180231879
mov eax, 0xfffffdf5
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, qword [rcx + 0xb0]
mov qword [rsp + 0x90], r15
call fcn.18027ec10
mov rcx, qword [rdi + 0xa8]
call fcn.18027ec10
mov qword [rdi + 0xb0], rbx
mov r15d, 0xffffffff
mov qword [rdi + 0xa8], rbx
mov dword [r13], ebx
mov r9d, 0x3f
lea r8, [0x180000000]
nop
cmp rsi, rbp
jne 0x1802318ce
test r12d, r12d
je 0x18023203a
movsxd rdx, dword [rdi + 0xe4]
mov r12d, ebx
cmp edx, 0xc
ja case.default.0x1802318e8
mov ecx, dword [r8 + rdx*4 + 0x232208]
add rcx, r8
jmp rcx
movzx eax, byte [rsi]
and al, 0xe0
cmp al, 0x20
jne 0x1802321d8
movzx ecx, byte [rsi]
movzx eax, cl
and al, 0xe0
cmp al, 0x20
jne 0x180231930
cmp edx, 2
je 0x1802321d8
mov dword [rdi + 0xe0], 1
mov dword [rdi + 0xe4], 3
mov qword [rdi + 0xb8], rbx
mov qword [rdi + 0xd8], rbx
jmp case.default.0x1802318e8
test cl, cl
jns 0x18023195b
mov dword [rdi + 0xe0], 1
mov dword [rdi + 0xe4], 4
mov qword [rdi + 0xb8], rbx
mov qword [rdi + 0xd8], rbx
jmp case.default.0x1802318e8
test cl, 0xaf
jne 0x18023196f
cmp cl, 0x50
je 0x18023196f
mov eax, 5
lea ecx, [rax - 3]
jmp 0x180231979
mov eax, 4
mov ecx, 3
mov dword [rdi + 0xe0], ecx
mov dword [rdi + 0xe4], eax
movzx eax, byte [rsi]
shr al, 6
and al, 1
mov byte [rdi + 0xe9], al
movzx eax, byte [rsi]
and al, 0xf0
cmp al, 0x10
sete al
mov byte [rdi + 0xea], al
cmp ecx, 2
jne 0x1802319ab
inc rsi
mov qword [rdi + 0xb8], rbx
mov qword [rdi + 0xd8], rbx
jmp case.default.0x1802318e8
mov rax, qword [rdi + 0xc8]
mov r14, qword [rdi + 0xd0]
mov r10d, dword [rdi + 0xb8]
cmp r14, rax
mov r9, qword [rdi + 0xd8]
cmovae r14, rax
mov qword [rdi + 0xd8], rbx
mov rax, rsi
test r10d, r10d
jne 0x180231a22
movzx ecx, byte [rsi]
movzx eax, cl
and al, 0x1f
cmp al, 0x1f
je 0x180231a0f
mov r10d, ecx
mov ebx, 1
and r10d, 0x1f
mov eax, ebx
jmp 0x180231a9d
lea rax, [rsi + 1]
mov r10d, 0x1f
cmp rax, rbp
jne 0x180231a30
sub eax, esi
jmp 0x180231a94
cmp rsi, rbp
je 0x180231a7b
nop word [rax + rax]
movzx r11d, byte [rax]
mov r8d, r11d
and r8d, 0x7f
cmp r9, 0x20
jae 0x1802321d8
mov edx, r15d
mov rcx, r9
shr edx, cl
cmp edx, r8d
jb 0x1802321d8
shl r8d, cl
mov ecx, r8d
not ecx
cmp ecx, r10d
jb 0x1802321d8
add r10d, r8d
test r11b, r11b
jns 0x180231a7b
inc rax
add r9, 7
cmp rax, rbp
jne 0x180231a30
mov qword [rdi + 0xd8], r9
cmp rax, rbp
jne 0x180231a8b
sub eax, esi
jmp 0x180231a94
sub eax, esi
mov ebx, 1
inc eax
cmp eax, 0xffffffff
je 0x1802321d8
mov edx, r10d
cmp rdx, r14
ja 0x1802321d8
mov qword [rdi + 0xb8], rdx
test eax, eax
js 0x1802321ec
movsxd rcx, eax
add rsi, rcx
test ebx, ebx
je 0x1802321ca
mov qword [rdi + 0x30], rdx
mov rcx, rdi
xor edx, edx
mov qword [rdi + 0xd0], r15
call fcn.180233920
mov r14, qword [rsp + 0xa0]
xor ebx, ebx
mov dword [rdi + 0xe4], 1
jmp 0x1802318b1
mov r15d, dword [rdi + 0xe0]
cmp r15d, 1
jne 0x180231b07
lea edx, [r15 + 0x7e]
jmp 0x180231b17
cmp byte [rdi + 0xe9], 0
mov edx, reloc.WS2_32.dll_ntohs
cmovne edx, r9d
mov r14, qword [rdi + 0x18]
mov r8, rsi
mov r10d, dword [rdi + 0xb8]
add r14, 0x3d
mov rcx, qword [rdi + 0xd8]
mov r11d, ebx
mov qword [rdi + 0xd8], rbx
test r10d, r10d
jne 0x180231b6a
movzx r10d, byte [rsi]
and r10d, edx
cmp r10d, edx
je 0x180231b59
mov r11d, 1
mov r8d, r11d
jmp 0x180231bf0
lea r8, [rsi + 1]
mov r10d, edx
cmp r8, rbp
jne 0x180231b6f
sub r8d, esi
jmp 0x180231be6
cmp rsi, rbp
je 0x180231bc9
mov ebx, 0xffffffff
nop dword [rax]
nop dword [rax + rax]
movzx r9d, byte [r8]
mov edx, r9d
and edx, 0x7f
cmp rcx, 0x20
jae 0x1802321d8
mov eax, ebx
shr eax, cl
cmp eax, edx
jb 0x1802321d8
shl edx, cl
mov eax, edx
not eax
cmp eax, r10d
jb 0x1802321d8
add r10d, edx
test r9b, r9b
jns 0x180231bc3
inc r8
add rcx, 7
cmp r8, rbp
jne 0x180231b80
mov r9d, 0x3f
mov qword [rdi + 0xd8], rcx
cmp r8, rbp
jne 0x180231bda
sub r8d, esi
jmp 0x180231be6
sub r8d, esi
mov r11d, 1
inc r8d
cmp r8d, 0xffffffff
je 0x1802321d8
mov ebx, r10d
cmp rbx, r14
ja 0x1802321d8
mov qword [rdi + 0xb8], rbx
mov eax, r8d
test r8d, r8d
js 0x1802321ec
movsxd rax, r8d
add rsi, rax
test r11d, r11d
je 0x1802321ca
test r10d, r10d
je 0x1802321d8
dec rbx
mov qword [rdi + 0xc0], rbx
cmp r15d, 1
je 0x180232068
mov r14, qword [rsp + 0xa0]
xor ebx, ebx
mov dword [rdi + 0xe4], 9
mov r15d, 0xffffffff
jmp 0x1802318b7
movzx eax, byte [rsi]
shr al, 7
mov byte [rdi + 0xe8], al
mov dword [rdi + 0xe4], 6
mov qword [rdi + 0xb8], rbx
mov qword [rdi + 0xd8], rbx
mov r9d, dword [rdi + 0xb8]
mov r8, rsi
mov rcx, qword [rdi + 0xd8]
mov r11d, ebx
mov qword [rdi + 0xd8], rbx
test r9d, r9d
jne 0x180231cd3
movzx edx, byte [rsi]
movzx eax, dl
and al, 0x7f
cmp al, 0x7f
je 0x180231cbf
mov r9d, edx
mov r11d, 1
and r9d, 0x7f
mov r8d, r11d
jmp 0x180231d4b
lea r8, [rsi + 1]
mov r9d, 0x7f
cmp r8, rbp
jne 0x180231ce0
sub r8d, esi
jmp 0x180231d41
cmp rsi, rbp
je 0x180231d24
nop dword [rax + rax]
movzx r10d, byte [r8]
mov edx, r10d
and edx, 0x7f
cmp rcx, 0x20
jae 0x1802321d8
mov eax, r15d
shr eax, cl
cmp eax, edx
jb 0x1802321d8
shl edx, cl
mov eax, edx
not eax
cmp eax, r9d
jb 0x1802321d8
add r9d, edx
test r10b, r10b
jns 0x180231d24
inc r8
add rcx, 7
cmp r8, rbp
jne 0x180231ce0
mov qword [rdi + 0xd8], rcx
cmp r8, rbp
jne 0x180231d35
sub r8d, esi
jmp 0x180231d41
sub r8d, esi
mov r11d, 1
inc r8d
cmp r8d, 0xffffffff
je 0x1802321d8
cmp r9d, 0x10000
ja 0x1802321d8
mov edx, r9d
mov eax, r8d
mov qword [rdi + 0xb8], rdx
test r8d, r8d
js 0x1802321ec
movsxd rax, r8d
add rsi, rax
test r11d, r11d
je 0x1802321ca
cmp byte [rdi + 0xe8], 0
je 0x180231da0
lea rcx, [rdi + 0x40]
call fcn.18027f010
mov rdx, qword [rdi + 0xb8]
mov eax, 7
add rdx, rdx
jmp 0x180231da5
mov eax, 8
inc rdx
mov dword [rdi + 0xe4], eax
mov r8, r14
lea rcx, [rdi + 0x98]
call fcn.18027ec60
test eax, eax
jne 0x1802321ec
mov rdx, qword [rdi + 0x98]
lea rcx, [rdi + 0x48]
mov r8, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x10]
call fcn.1802346f0
xor ebx, ebx
jmp 0x1802318b1
lea rdx, [rdi + 0x48]
mov r9, rbp
mov r8, rsi
mov rcx, rdi
call fcn.180233d10
test eax, eax
js 0x1802321ec
movsxd rcx, eax
add rsi, rcx
cmp qword [rdi + 0xb8], 0
jne 0x1802321ca
mov rax, qword [rdi + 0x60]
mov byte [rax], 0
mov rcx, qword [rdi + 0x60]
mov rax, qword [rdi + 0x98]
sub rcx, qword [rdi + 0x58]
mov qword [rax + 0x18], rcx
mov dword [rdi + 0xe4], 9
jmp 0x1802318b1
mov rax, qword [rdi + 0xb8]
mov rbx, rbp
mov rcx, qword [rdi + 0x60]
sub rbx, rsi
cmp rbx, rax
mov rdx, rsi
cmovae rbx, rax
mov r8, rbx
call fcn.1801c7410
mov qword [rdi + 0x60], rax
mov r8, rax
mov rdx, qword [rdi + 0xb8]
sub rdx, rbx
movsxd rax, ebx
mov qword [rdi + 0xb8], rdx
test ebx, ebx
js 0x1802321ec
add rsi, rax
test rdx, rdx
jne 0x1802321ca
mov byte [r8], dl
mov rcx, qword [rdi + 0x60]
sub rcx, qword [rdi + 0x58]
mov rax, qword [rdi + 0x98]
xor ebx, ebx
mov qword [rax + 0x18], rcx
mov dword [rdi + 0xe4], 9
jmp 0x1802318b1
movzx eax, byte [rsi]
shr al, 7
mov byte [rdi + 0xe8], al
mov dword [rdi + 0xe4], 0xa
mov qword [rdi + 0xb8], rbx
mov qword [rdi + 0xd8], rbx
mov r9d, dword [rdi + 0xb8]
mov r8, rsi
mov rcx, qword [rdi + 0xd8]
mov r11d, ebx
mov qword [rdi + 0xd8], rbx
test r9d, r9d
jne 0x180231f2d
movzx edx, byte [rsi]
movzx eax, dl
and al, 0x7f
cmp al, 0x7f
je 0x180231f19
mov r9d, edx
mov r11d, 1
and r9d, 0x7f
mov r8d, r11d
jmp 0x180231f9d
lea r8, [rsi + 1]
mov r9d, 0x7f
cmp r8, rbp
jne 0x180231f32
sub r8d, esi
jmp 0x180231f93
cmp rsi, rbp
je 0x180231f76
movzx r10d, byte [r8]
mov edx, r10d
and edx, 0x7f
cmp rcx, 0x20
jae 0x1802321d8
mov eax, r15d
shr eax, cl
cmp eax, edx
jb 0x1802321d8
shl edx, cl
mov eax, edx
not eax
cmp eax, r9d
jb 0x1802321d8
add r9d, edx
test r10b, r10b
jns 0x180231f76
inc r8
add rcx, 7
cmp r8, rbp
jne 0x180231f32
mov qword [rdi + 0xd8], rcx
cmp r8, rbp
jne 0x180231f87
sub r8d, esi
jmp 0x180231f93
sub r8d, esi
mov r11d, 1
inc r8d
cmp r8d, 0xffffffff
je 0x1802321d8
cmp r9d, 0x10000
ja 0x1802321d8
mov edx, r9d
mov eax, r8d
mov qword [rdi + 0xb8], rdx
test r8d, r8d
js 0x1802321ec
movsxd rax, r8d
add rsi, rax
test r11d, r11d
je 0x1802321ca
cmp byte [rdi + 0xe8], 0
je 0x180231ff2
lea rcx, [rdi + 0x40]
call fcn.18027f010
mov rdx, qword [rdi + 0xb8]
mov eax, ntohs
add rdx, rdx
jmp 0x180231ff7
mov eax, ntohs
inc rdx
mov dword [rdi + 0xe4], eax
mov r8, r14
lea rcx, [rdi + 0xa0]
call fcn.18027ec60
test eax, eax
jne 0x1802321ec
mov rdx, qword [rdi + 0xa0]
lea rcx, [rdi + 0x70]
mov r8, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x10]
call fcn.1802346f0
xor ebx, ebx
lea r12d, [rbx + 1]
jmp 0x1802318b1
cmp dword [rsp + 0xa8], 0
je 0x18023205a
mov eax, dword [rdi + 0xe4]
dec eax
cmp eax, 1
ja 0x1802321d8
or dword [r13], 1
sub esi, dword [rsp + 0x80]
mov eax, esi
jmp 0x1802321f0
cmp rbx, r14
jb 0x180232086
mov r8d, 0x516
lea rdx, [0x1803e95f0]
lea rcx, str.INDEX_RANGE_VALID_context__idx_
call fcn.18029a158
cmp rbx, 0x3d
jb 0x1802320cb
add rbx, 0xffffffffffffffc3
cmp rbx, qword [rdi + 0x18]
jb 0x1802320af
mov r8d, 0x262
lea rdx, [0x1803e95f0]
lea rcx, str.idx___ringbuf__len
call fcn.18029a158
mov rcx, qword [rdi + 0x10]
mov rax, qword [rdi]
add rcx, rbx
and rcx, qword [rdi + 8]
mov rcx, qword [rax + rcx*8]
movups xmm0, xmmword [rcx]
movsd xmm1, qword [rcx + 0x10]
jmp 0x18023210f
lea rcx, [0x180000000]
shl rbx, 7
lea rax, [rcx + 0x3883b0]
mov byte [rsp + 0x34], 0
add rax, rbx
mov qword [rsp + 0x20], rax
lea rax, [rcx + 0x3883d8]
add rax, rbx
mov qword [rsp + 0x28], rax
mov eax, dword [rbx + rcx + 0x388428]
movups xmm0, xmmword [rsp + 0x20]
mov dword [rsp + 0x30], eax
movsd xmm1, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x88]
movups xmmword [rdx], xmm0
movsd qword [rdx + 0x10], xmm1
mov dword [rdi + 0xe4], 2
or dword [r13], 2
sub esi, dword [rsp + 0x80]
mov eax, esi
jmp 0x1802321f0
lea rdx, [rdi + 0x70]
mov r9, rbp
mov r8, rsi
mov rcx, rdi
call fcn.180233d10
test eax, eax
js 0x1802321ec
movsxd rcx, eax
add rsi, rcx
cmp qword [rdi + 0xb8], 0
jne 0x1802321ca
mov rax, qword [rdi + 0x88]
mov rdx, qword [rsp + 0x88]
mov byte [rax], 0
mov rcx, qword [rdi + 0x88]
sub rcx, qword [rdi + 0x80]
mov rax, qword [rdi + 0xa0]
mov qword [rax + 0x18], rcx
mov rcx, rdi
cmp dword [rdi + 0xe0], 2
jne 0x1802321df
call fcn.180233e00
jmp 0x1802321e4
lea rdx, [rdi + 0x70]
mov r9, rbp
mov r8, rsi
mov rcx, rdi
call fcn.180233da0
test eax, eax
js 0x1802321ec
movsxd rcx, eax
add rsi, rcx
cmp qword [rdi + 0xb8], 0
je 0x180232166
cmp dword [rsp + 0xa8], 0
je 0x18023212e
mov eax, 0xfffffdf5
jmp 0x1802321ec
call fcn.180233ec0
test eax, eax
je 0x18023211f
mov byte [rdi + 0x3c], 1
mov r15, qword [rsp + 0x90]
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret