Function at 0x10021b40
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [esp + 0x34]
cmp eax, 0x10000001
jae 0x10021df2
mov edi, ecx
add eax, 0xffffffff
or eax, 1
bsr ecx, eax
xor ecx, 0x1f
neg cl
mov esi, 1
shl esi, cl
lea ecx, [edi + 0xc]
mov ebx, dword [edi + 4]
lea eax, [esi + esi]
push ebx
push eax
call fcn.10017f10
lea eax, [esi - 1]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], esi
mov dword [esp + 0x14], edi
mov eax, dword [edi + 4]
mov eax, dword [eax]
mov dword [esp + 0x10], ebx
cmp eax, ebx
je 0x10021dd7
mov ebx, eax
mov dword [esp + 0x18], edi
jmp 0x10021bc4
mov ecx, dword [esp + 0xc]
mov dword [eax + ecx*4], edi
mov dword [eax + esi*4], edi
cmp ebx, dword [esp + 0x10]
je 0x10021dd7
mov eax, ebx
cmp dword [ebx + 0x1c], 7
jbe 0x10021be0
mov ecx, dword [eax + 8]
jmp 0x10021be3
lea ecx, [eax + 8]
mov dword [esp], eax
mov edx, dword [eax + 0x18]
mov ebx, edx
add ebx, edx
je 0x10021c10
lea edi, [ebx - 1]
mov esi, ebx
and esi, 2
cmp edi, 3
jae 0x10021c20
mov ebp, 0x811c9dc5
xor edi, edi
jmp 0x10021c6a
mov ebp, 0x811c9dc5
jmp 0x10021c93
and ebx, 0xfffffffc
mov ebp, 0x811c9dc5
xor edi, edi
nop word [eax + eax]
movzx eax, byte [ecx + edi]
xor eax, ebp
imul eax, eax, 0x1000193
movzx ebp, byte [ecx + edi + 1]
xor ebp, eax
imul eax, ebp, 0x1000193
movzx ebp, byte [ecx + edi + 2]
xor ebp, eax
imul eax, ebp, 0x1000193
movzx ebp, byte [ecx + edi + 3]
xor ebp, eax
imul ebp, ebp, 0x1000193
add edi, 4
cmp ebx, edi
jne 0x10021c30
test esi, esi
je 0x10021c93
add edi, ecx
xor ebx, ebx
nop word cs:[eax + eax]
nop dword [eax]
movzx eax, byte [edi + ebx]
xor eax, ebp
imul ebp, eax, 0x1000193
add ebx, 1
cmp esi, ebx
jne 0x10021c80
mov edi, dword [esp]
mov ebx, dword [edi]
mov eax, dword [esp + 0x18]
and ebp, dword [eax + 0x18]
mov eax, dword [eax + 0xc]
mov esi, ebp
add esi, ebp
mov dword [esp + 0xc], esi
lea esi, [ebp + 1]
add esi, ebp
mov ebp, dword [eax + ebp*8]
mov dword [esp + 0x1c], ebp
cmp ebp, dword [esp + 0x10]
je 0x10021bb0
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov edi, dword [eax + esi*4]
cmp edx, dword [edi + 0x18]
jne 0x10021d40
test edx, edx
je 0x10021d02
cmp dword [edi + 0x1c], 7
jbe 0x10021ce3
mov ebp, dword [edi + 8]
jmp 0x10021ce6
lea ebp, [edi + 8]
xor ebx, ebx
nop dword [eax + eax]
movzx eax, word [ecx + ebx*2]
cmp ax, word [ebp + ebx*2]
jne 0x10021d40
add ebx, 1
cmp edx, ebx
jne 0x10021cf0
mov ebp, esi
mov ecx, dword [edi]
mov edi, dword [esp]
cmp ecx, edi
mov ebx, dword [esp + 4]
je 0x10021d29
mov eax, dword [edi + 4]
mov dword [eax], ebx
mov edx, dword [ebx + 4]
mov dword [edx], ecx
mov esi, dword [ecx + 4]
mov dword [esi], edi
mov dword [ecx + 4], edx
mov dword [ebx + 4], eax
mov dword [edi + 4], esi
mov eax, dword [esp + 8]
mov dword [eax + ebp*4], edi
jmp 0x10021bba
mov esi, dword [esp + 0x1c]
cmp esi, edi
je 0x10021da8
mov edi, dword [edi + 4]
cmp edx, dword [edi + 0x18]
jne 0x10021d44
test edx, edx
je 0x10021d82
cmp dword [edi + 0x1c], 7
jbe 0x10021d60
mov ebp, dword [edi + 8]
jmp 0x10021d63
lea ebp, [edi + 8]
xor ebx, ebx
nop word cs:[eax + eax]
nop
movzx eax, word [ecx + ebx*2]
cmp ax, word [ebp + ebx*2]
jne 0x10021d44
add ebx, 1
cmp edx, ebx
jne 0x10021d70
mov eax, dword [edi]
mov edi, dword [esp]
mov ecx, dword [edi + 4]
mov ebx, dword [esp + 4]
mov dword [ecx], ebx
mov edx, dword [ebx + 4]
mov dword [edx], eax
mov esi, dword [eax + 4]
mov dword [esi], edi
mov dword [eax + 4], edx
mov dword [ebx + 4], ecx
mov dword [edi + 4], esi
jmp 0x10021bba
mov edi, dword [esp]
mov eax, dword [edi + 4]
mov ebx, dword [esp + 4]
mov dword [eax], ebx
mov ecx, dword [ebx + 4]
mov dword [ecx], esi
mov edx, dword [esi + 4]
mov dword [edx], edi
mov dword [esi + 4], ecx
mov dword [ebx + 4], eax
mov dword [edi + 4], edx
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [eax + ecx*4], edi
jmp 0x10021bba
mov dword [esp + 0x14], 0
lea ecx, [esp + 0x14]
call fcn.10021e00
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret 4
push str.invalid_hash_bucket_count
call fcn.1002310f
int3