Function at 0x1802a3a60
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
mov r11d, dword [rcx + 0xb8]
mov eax, r9d
sar eax, 0x10
mov r15, rcx
mov ecx, dword [rcx + 0xa0]
mov rbx, r8
imul eax, r11d
mov r12d, r9d
mov rdi, rdx
mov dword [rsp + 0x90], r11d
mov dword [rsp + 0x20], ecx
mov qword [rsp + 0x38], r13
movsxd r8, eax
mov rax, qword [r15 + 0xa8]
lea r10, [rax + r8*4]
mov r8d, dword [rbx]
mov qword [rsp + 0x28], r10
nop dword [rax]
mov eax, dword [rdi]
xor r9d, r9d
test eax, eax
cmovns r9d, eax
mov eax, r8d
sar eax, 0x10
cmp eax, ecx
jl 0x1802a3adf
mov r8d, ecx
shl r8d, 0x10
dec r8d
cmp r8d, r9d
jle 0x1802a3ce4
movzx ecx, r8w
mov eax, 0xa000a001
add ecx, 0x199a
mov r13d, r9d
mul ecx
movzx ecx, r9w
mov r14d, r8d
mov eax, edx
sar r13d, 0x10
shr eax, 0xd
add ecx, 0x199a
mov dword [rsp + 0x88], eax
mov esi, r13d
and esi, 1
movsxd rbp, r13d
movzx eax, sil
sar rbp, 1
shl al, 2
add rbp, r10
mov byte [rsp + 0x98], al
mov eax, 0xa000a001
mul ecx
mov rcx, rbp
sar r14d, 0x10
mov eax, edx
mov edx, 1
shr eax, 0xd
mov dword [rsp + 0x80], eax
mov rax, qword [r15 + 0x100]
call rax
movzx ecx, byte [rsp + 0x98]
cmp r13d, r14d
jne 0x1802a3b8f
movzx r8d, al
shr r8b, cl
and r8b, 0xf
sub r8b, byte [rsp + 0x80]
add r8b, byte [rsp + 0x88]
movzx edx, r8b
jmp 0x1802a3c99
movzx edx, al
mov r8d, recv
shr dl, cl
lea ecx, [rsi*4]
and dl, 0xf
shl r8d, cl
sub dl, byte [rsp + 0x80]
not r8d
add dl, 5
movzx eax, al
movzx edx, dl
and r8d, eax
mov r9d, edx
shr r9d, 4
neg r9d
or edx, r9d
and edx, 0xf
shl edx, cl
mov rcx, rbp
or edx, r8d
mov r8d, 1
call qword [r15 + 0x108]
mov eax, esi
xor esi, 1
add rbp, rax
inc r13d
cmp r13d, r14d
jge 0x1802a3c71
sub r14d, r13d
nop word [rax + rax]
mov edx, 1
mov rcx, rbp
call qword [r15 + 0x100]
movzx ecx, sil
mov r8d, recv
shl cl, 2
movzx edx, al
shr dl, cl
lea ecx, [rsi*4]
and dl, 0xf
shl r8d, cl
add dl, 5
movzx eax, al
movzx edx, dl
not r8d
mov r9d, edx
and r8d, eax
shr r9d, 4
neg r9d
or edx, r9d
and edx, 0xf
shl edx, cl
mov rcx, rbp
or edx, r8d
mov r8d, 1
call qword [r15 + 0x108]
movsxd rax, esi
xor esi, 1
add rbp, rax
sub r14, 1
jne 0x1802a3c00
mov edx, 1
mov rcx, rbp
call qword [r15 + 0x100]
movzx edx, al
movzx ecx, sil
shl cl, 2
shr dl, cl
and dl, 0xf
add dl, byte [rsp + 0x88]
movzx edx, dl
mov r9d, edx
movzx eax, al
lea ecx, [rsi*4]
shr r9d, 4
neg r9d
mov r8d, recv
shl r8d, cl
or edx, r9d
and edx, 0xf
not r8d
shl edx, cl
and r8d, eax
or edx, r8d
mov rcx, rbp
mov r8d, 1
call qword [r15 + 0x108]
mov r11d, dword [rsp + 0x90]
mov r10, qword [rsp + 0x28]
cmp r12d, dword [rsp + 0xa0]
je 0x1802a3dbd
mov ecx, dword [rdi]
mov edx, dword [rdi + 4]
cmp r12w, 0xd555
je 0x1802a3d58
mov r8d, dword [rdi + 0x18]
add r8d, ecx
mov ecx, dword [rdi + 0x20]
add ecx, edx
mov dword [rdi], r8d
mov dword [rdi + 4], ecx
test ecx, ecx
jle 0x1802a3d23
sub ecx, dword [rdi + 0x10]
mov dword [rdi + 4], ecx
mov ecx, dword [rdi + 0xc]
add ecx, r8d
mov dword [rdi], ecx
mov eax, dword [rbx + 0x20]
add dword [rbx + 4], eax
mov r8d, dword [rbx + 0x18]
add r8d, dword [rbx]
mov eax, dword [rbx + 4]
mov dword [rbx], r8d
test eax, eax
jle 0x1802a3d47
sub eax, dword [rbx + 0x10]
add r8d, dword [rbx + 0xc]
mov dword [rbx], r8d
mov dword [rbx + 4], eax
mov ecx, dword [rsp + 0x20]
mov eax, 0x5555
add r12d, eax
jmp 0x1802a3ac0
mov r8d, dword [rdi + 0x1c]
add r8d, ecx
mov ecx, dword [rdi + 0x24]
add ecx, edx
mov dword [rdi], r8d
mov dword [rdi + 4], ecx
test ecx, ecx
jle 0x1802a3d7c
sub ecx, dword [rdi + 0x10]
mov dword [rdi + 4], ecx
mov ecx, dword [rdi + 0xc]
add ecx, r8d
mov dword [rdi], ecx
mov eax, dword [rbx + 0x24]
add dword [rbx + 4], eax
mov r8d, dword [rbx + 0x1c]
add r8d, dword [rbx]
mov eax, dword [rbx + 4]
mov dword [rbx], r8d
test eax, eax
jle 0x1802a3da0
sub eax, dword [rbx + 0x10]
add r8d, dword [rbx + 0xc]
mov dword [rbx], r8d
mov dword [rbx + 4], eax
mov ecx, dword [rsp + 0x20]
movsxd rax, r11d
lea r10, [r10 + rax*4]
mov eax, 0x5556
add r12d, eax
mov qword [rsp + 0x28], r10
jmp 0x1802a3ac0
mov r13, qword [rsp + 0x38]
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret