Function at 0x180020840
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push rbp
push rsi
push rdi
push r12
push r15
sub rsp, 0xd0
mov rax, qword [0x18025ed68]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov esi, dword [rsp + 0x120]
mov r12d, r8d
mov rax, qword [rsp + 0x128]
mov ebp, esi
movdqa xmm0, xmmword [0x1801ba880]
mov r15d, edx
imul ebp, r8d
mov qword [rsp + 0x78], rax
mov eax, dword [0x18022c03c]
mov dword [rsp + 0x40], r9d
mov dword [rsp + 0x48], r8d
mov dword [rsp + 0x44], edx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x4c], esi
mov dword [rsp + 0x90], 6
mov dword [rsp + 0x98], 0x474e5089
mov dword [rsp + 0x9c], 0xa1a0a0d
movdqu xmmword [rsp + 0x80], xmm0
test edx, edx
jne 0x1800208db
mov r15d, ebp
mov dword [rsp + 0x44], ebp
cmp eax, 5
mov qword [rsp + 0xc8], rbx
mov ecx, 0xffffffff
mov qword [rsp + 0xb8], r14
cmovge eax, ecx
mov dword [rsp + 0x50], eax
lea eax, [rbp + 1]
imul eax, r9d
movsxd rcx, eax
mov dword [rsp + 0x54], eax
call fcn.1801847b0
mov qword [rsp + 0x68], rax
mov rdi, rax
test rax, rax
je 0x180020935
movsxd r14, ebp
mov rcx, r14
call fcn.1801847b0
mov rbx, rax
test rax, rax
jne 0x180020966
mov rcx, rdi
call fcn.180180634
xor eax, eax
mov r14, qword [rsp + 0xb8]
mov rbx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.18015d5d0
add rsp, 0xd0
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
mov eax, dword [rsp + 0x40]
xor edi, edi
mov qword [rsp + 0xc0], r13
mov r13d, edi
test eax, eax
jle 0x180020b99
lea ecx, [rbp + 1]
movsxd rcx, ecx
mov qword [rsp + 0x70], rcx
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x60], rcx
mov ecx, dword [rsp + 0x50]
cmp ecx, 0xffffffff
jle 0x1800209cd
mov qword [rsp + 0x38], rbx
mov esi, ecx
mov dword [rsp + 0x30], ecx
mov r9d, eax
mov ecx, dword [rsp + 0x4c]
mov r8d, r12d
mov dword [rsp + 0x28], ecx
mov edx, r15d
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x20], r13d
call fcn.180020500
jmp 0x180020b61
mov r12d, edi
mov r15d, 0x7fffffff
mov esi, edi
nop dword [rax + rax]
mov ecx, dword [rsp + 0x4c]
mov r9d, eax
mov r8d, dword [rsp + 0x48]
mov edx, dword [rsp + 0x44]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], ecx
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x20], r13d
call fcn.180020500
mov r10d, edi
mov rcx, rdi
test ebp, ebp
jle 0x180020aa7
cmp ebp, 8
jb 0x180020aa7
cmp dword [reloc.WS2_32.dll_accept], 2
jl 0x180020aa7
mov edx, ebp
xorps xmm3, xmm3
xorps xmm4, xmm4
and edx, 0x80000007
jge 0x180020a47
dec edx
or edx, 0xfffffff8
inc edx
mov eax, ebp
sub eax, edx
movsxd rdx, eax
nop
movd xmm0, dword [rcx + rbx]
pmovsxbd xmm1, xmm0
movd xmm0, dword [rcx + rbx + 4]
pabsd xmm2, xmm1
paddd xmm3, xmm2
add rcx, 8
pmovsxbd xmm1, xmm0
pabsd xmm2, xmm1
paddd xmm2, xmm4
movdqa xmm4, xmm2
cmp rcx, rdx
jl 0x180020a50
paddd xmm3, xmm2
movdqa xmm0, xmm3
psrldq xmm0, 8
paddd xmm3, xmm0
movdqa xmm0, xmm3
psrldq xmm0, 4
paddd xmm3, xmm0
movd r10d, xmm3
mov r8d, edi
mov r9d, edi
cmp rcx, r14
jge 0x180020afc
mov rax, r14
sub rax, rcx
cmp rax, 2
jl 0x180020ae9
lea r11, [r14 - 1]
movsx eax, byte [rcx + rbx]
cdq
xor eax, edx
sub eax, edx
add r8d, eax
movsx eax, byte [rcx + rbx + 1]
cdq
add rcx, 2
xor eax, edx
sub eax, edx
add r9d, eax
cmp rcx, r11
jl 0x180020ac2
cmp rcx, r14
jge 0x180020af5
movsx eax, byte [rcx + rbx]
cdq
xor eax, edx
sub eax, edx
add r10d, eax
lea eax, [r9 + r8]
add r10d, eax
cmp r10d, r15d
mov eax, esi
cmovge eax, r12d
inc esi
cmp r10d, r15d
mov r12d, eax
mov eax, dword [rsp + 0x40]
cmovge r10d, r15d
mov r15d, r10d
cmp esi, 5
jl 0x1800209e0
mov r15d, dword [rsp + 0x44]
cmp esi, r12d
je 0x180020b5c
mov eax, dword [rsp + 0x4c]
mov edx, r15d
mov r9d, dword [rsp + 0x40]
mov r8d, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r13d
call fcn.180020500
mov esi, r12d
mov r12d, dword [rsp + 0x48]
mov rax, qword [rsp + 0x60]
mov r8, r14
mov rdx, rbx
mov byte [rax], sil
lea rcx, [rax + 1]
mov rsi, rax
call fcn.18017b690
add rsi, qword [rsp + 0x70]
inc r13d
mov eax, dword [rsp + 0x40]
mov qword [rsp + 0x60], rsi
cmp r13d, eax
jl 0x180020994
mov esi, dword [rsp + 0x4c]
mov rcx, rbx
call fcn.180180634
mov r9d, dword [reloc.WS2_32.dll_htonl]
lea r8, [rsp + 0x50]
mov edx, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x68]
call fcn.18001f310
mov rcx, qword [rsp + 0x68]
mov r15, rax
call fcn.180180634
mov r13, qword [rsp + 0xc0]
test r15, r15
je 0x180020935
movsxd rbp, dword [rsp + 0x50]
lea ebx, [rbp + 0x39]
movsxd rcx, ebx
call fcn.1801847b0
mov r14, rax
test rax, rax
je 0x180020935
mov r9d, dword [rsp + 0x40]
mov rax, qword [rsp + 0x78]
mov dword [rax], ebx
lea rbx, [r14 + 8]
mov rax, qword [rsp + 0x98]
mov qword [r14], rax
mov eax, r12d
sar eax, 0x18
mov byte [rbx + 8], al
mov eax, r12d
sar eax, 0x10
mov byte [rbx + 9], al
mov eax, r12d
sar eax, 8
mov byte [rbx + 0xa], al
mov eax, r9d
sar eax, 0x18
mov byte [rbx + 0xc], al
mov eax, r9d
sar eax, 0x10
mov byte [rbx + 0xd], al
mov eax, r9d
sar eax, 8
mov byte [rbx + 0xe], al
mov byte [rbx + 0xf], r9b
mov byte [rbx + 0xb], r12b
lea r12, [0x18022c120]
mov dword [rbx], 0xd000000
mov dword [rbx + 4], 0x52444849
mov byte [rbx + 0x10], 8
mov word [rbx + 0x12], di
mov byte [rbx + 0x14], dil
movsxd rax, esi
movzx r9d, byte [rsp + rax*4 + 0x80]
mov byte [rbx + 0x11], r9b
movzx eax, byte [rbx + 4]
not al
movzx ecx, al
movzx eax, byte [rbx + 5]
mov r8d, dword [r12 + rcx*4]
xor r8d, 0xffffff
movzx ecx, r8b
xor rcx, rax
shr r8d, 8
movzx eax, byte [rbx + 6]
mov edx, dword [r12 + rcx*4]
xor edx, r8d
movzx ecx, dl
xor rcx, rax
shr edx, 8
movzx eax, byte [rbx + 7]
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
movzx ecx, r8b
xor rcx, rax
shr r8d, 8
movzx eax, byte [rbx + 8]
mov edx, dword [r12 + rcx*4]
xor edx, r8d
movzx ecx, dl
xor rcx, rax
shr edx, 8
movzx eax, byte [rbx + 9]
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
movzx ecx, r8b
xor rcx, rax
shr r8d, 8
movzx eax, byte [rbx + 0xa]
mov edx, dword [r12 + rcx*4]
xor edx, r8d
movzx ecx, dl
xor rcx, rax
shr edx, 8
movzx eax, byte [rbx + 0xb]
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
movzx ecx, r8b
xor rcx, rax
shr r8d, 8
mov edx, dword [r12 + rcx*4]
movzx eax, byte [rbx + 0xc]
xor edx, r8d
movzx ecx, dl
xor rcx, rax
shr edx, 8
movzx eax, byte [rbx + 0xd]
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
movzx ecx, r8b
xor rcx, rax
shr r8d, 8
movzx eax, byte [rbx + 0xe]
mov edx, dword [r12 + rcx*4]
xor edx, r8d
movzx ecx, dl
xor rcx, rax
shr edx, 8
movzx eax, byte [rbx + 0xf]
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
movzx ecx, r8b
xor rcx, rax
shr r8d, 8
movzx eax, byte [rbx + 0x10]
mov byte [rbx + 0x1c], bpl
mov dword [rbx + 0x1d], 0x54414449
mov edx, dword [r12 + rcx*4]
xor edx, r8d
movzx ecx, dl
xor rcx, rax
shr edx, 8
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
movzx ecx, r8b
shr r8d, 8
xor rcx, r9
mov edx, dword [r12 + rcx*4]
xor edx, r8d
movzx ecx, dl
shr edx, 8
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r12 + rcx*4]
xor edx, r8d
movzx ecx, dl
shr edx, 8
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
mov rdx, r15
not r8d
mov eax, r8d
mov byte [rbx + 0x18], r8b
shr eax, 0x18
mov byte [rbx + 0x15], al
mov eax, r8d
shr eax, 0x10
mov byte [rbx + 0x16], al
mov eax, r8d
shr eax, 8
mov r8, rbp
mov byte [rbx + 0x17], al
mov eax, ebp
sar eax, 0x18
mov byte [rbx + 0x19], al
mov eax, ebp
sar eax, 0x10
mov byte [rbx + 0x1a], al
mov eax, ebp
sar eax, 8
mov byte [rbx + 0x1b], al
add rbx, 0x21
mov rcx, rbx
call fcn.18017b690
mov rcx, r15
add rbx, rbp
call fcn.180180634
lea eax, [rbp + 4]
mov r8d, 0xffffffff
movsxd r10, eax
test eax, eax
jle 0x180020e72
mov r9, rbx
sub r9, rbp
nop dword [rax]
nop word [rax + rax]
movzx edx, byte [rdi + r9 - 4]
mov eax, r8d
movzx ecx, r8b
inc rdi
xor rdx, rcx
shr eax, 8
mov r8d, dword [r12 + rdx*4]
xor r8d, eax
cmp rdi, r10
jl 0x180020e50
mov edx, dword [0x18022c3f8]
not r8d
mov byte [rbx + 3], r8b
mov eax, r8d
shr eax, 0x18
xor edx, 0xffffff
mov byte [rbx], al
mov eax, r8d
shr eax, 0x10
mov byte [rbx + 1], al
mov eax, r8d
mov dword [rbx + 4], 0
mov dword [rbx + 8], 0x444e4549
shr eax, 8
mov byte [rbx + 2], al
movzx eax, byte [rbx + 9]
movzx ecx, dl
xor rcx, rax
shr edx, 8
movzx eax, byte [rbx + 0xa]
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
movzx ecx, r8b
xor rcx, rax
shr r8d, 8
movzx eax, byte [rbx + 0xb]
mov edx, dword [r12 + rcx*4]
xor edx, r8d
movzx ecx, dl
xor rcx, rax
shr edx, 8
mov rax, r14
mov r8d, dword [r12 + rcx*4]
xor r8d, edx
not r8d
mov ecx, r8d
mov byte [rbx + 0xf], r8b
shr ecx, 0x18
mov byte [rbx + 0xc], cl
mov ecx, r8d
shr ecx, 0x10
mov byte [rbx + 0xd], cl
mov ecx, r8d
shr ecx, 8
mov byte [rbx + 0xe], cl
jmp 0x180020937