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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov eax, ecx
mov dword [ebp - 4], eax
cmp dword [edi + 0x14], 8
mov esi, dword [edi + 0x10]
jb 0x505f2e
mov edx, dword [edi]
jmp 0x505f30
mov edx, edi
mov ebx, 0x811c9dc5
xor ecx, ecx
mov dword [ebp - 8], ebx
add esi, esi
je 0x505f57
nop
movzx eax, byte [edx + ecx]
inc ecx
xor eax, ebx
imul ebx, eax, 0x1000193
cmp ecx, esi
jb 0x505f40
mov eax, dword [ebp - 4]
mov dword [ebp - 8], ebx
lea ecx, [eax + 0x94]
mov dword [ebp - 0xc], 0
xor edx, edx
mov eax, ebx
div dword [ecx]
mov esi, edx
mov eax, esi
or eax, 1
mov dword [ebp - 0x14], eax
bsr eax, eax
mov dword [ebp - 0xc], eax
movzx ecx, al
mov eax, dword [ebp - 4]
mov eax, dword [eax + ecx*4 + 4]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x505fa7
mov edx, 1
mov eax, esi
shl edx, cl
mov ecx, dword [ebp - 0xc]
and edx, 0xfffffffe
sub eax, edx
cmp dword [ecx + eax*4], 0
setne al
test al, al
jne 0x505fb0
mov ecx, dword [ebp - 4]
push esi
call fcn.005057f0
movzx eax, bl
mov dword [ebp - 0xc], 0
push edi
movzx eax, byte [eax + 0x5c68f0]
mov byte [ebp - 0xd], al
movzx eax, bh
movzx eax, byte [eax + 0x5c68f0]
mov byte [ebp - 0xe], al
movzx eax, byte [ebp - 6]
movzx eax, byte [eax + 0x5c68f0]
mov byte [ebp - 0xf], al
movzx eax, byte [ebp - 5]
movzx eax, byte [eax + 0x5c68f0]
mov byte [ebp - 0x10], al
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x10]
bsr eax, eax
or ebx, 1
mov dword [ebp - 0xc], eax
movzx ecx, al
mov eax, 1
shl eax, cl
and eax, 0xfffffffe
mov dword [ebp - 8], ebx
sub esi, eax
mov eax, dword [ebp - 4]
push ebx
mov eax, dword [eax + ecx*4 + 4]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x14], eax
call fcn.00506300
mov ecx, dword [ebp - 0x14]
mov edi, eax
mov esi, dword [ecx]
nop dword [eax]
test esi, esi
je 0x506079
mov eax, dword [esi + 0x24]
cmp eax, ebx
ja 0x506079
jne 0x506073
cmp dword [edi + 0x18], 8
lea eax, [edi + 4]
lea edx, [eax + 0x10]
lea ecx, [esi + 4]
mov dword [ebp - 0x14], edx
jb 0x506051
mov eax, dword [eax]
cmp dword [ecx + 0x14], 8
lea edx, [ecx + 0x10]
jb 0x50605c
mov ecx, dword [ecx]
mov ebx, dword [ebp - 0x14]
mov edx, dword [edx]
push dword [ebx]
push eax
call fcn.004af3c0
mov ebx, dword [ebp - 8]
add esp, 8
test eax, eax
je 0x506098
mov ecx, esi
mov esi, dword [esi]
jmp 0x506030
mov dword [edi], esi
mov edx, edi
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp eax, esi
je 0x5060c4
cmp eax, edi
je 0x5060c4
mov dword [ebp - 0x10], 0
mov byte [ebp - 0xc], 0
jmp 0x506027
mov al, byte [edi + 0x24]
not al
test al, 1
jne 0x5060a9
lea ecx, [edi + 4]
call fcn.00505490
push edi
call fcn.00405150
mov eax, dword [ebp + 8]
add esp, 4
pop edi
mov dword [eax], esi
pop esi
mov byte [eax + 4], 0
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
mov eax, 1
lock xadd dword [ecx + 0x8c], eax
inc eax
mov edx, dword [ecx + 0x94]
lea esi, [ecx + 0x94]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
mov byte [ebp - 0xc], 1
addsd xmm0, qword [eax*8 + 0x5edee0]
mov eax, edx
shr eax, 0x1f
cvtpd2ps xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x5edee0]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
comiss xmm1, dword [ecx + 0x98]
jbe 0x50612d
lea ecx, [edx + edx]
mov eax, edx
lock cmpxchg dword [esi], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [eax], edi
pop edi
pop esi
mov dword [eax + 4], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8