Function at 0x507d40
Capabilities:
Encode data using xor
Encrypt data using rc4 prga
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 0x507d5e
mov edx, dword [edi]
jmp 0x507d60
mov edx, edi
mov ebx, 0x811c9dc5
xor ecx, ecx
mov dword [ebp - 8], ebx
add esi, esi
je 0x507d87
nop
movzx eax, byte [edx + ecx]
inc ecx
xor eax, ebx
imul ebx, eax, 0x1000193
cmp ecx, esi
jb 0x507d70
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 0x507dd7
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 0x507de0
mov ecx, dword [ebp - 4]
push esi
call fcn.00506ba0
movzx eax, bl
mov dword [ebp - 0xc], 0
push edi
movzx eax, byte [eax + 0x5d0270]
mov byte [ebp - 0xd], al
movzx eax, bh
movzx eax, byte [eax + 0x5d0270]
mov byte [ebp - 0xe], al
movzx eax, byte [ebp - 6]
movzx eax, byte [eax + 0x5d0270]
mov byte [ebp - 0xf], al
movzx eax, byte [ebp - 5]
movzx eax, byte [eax + 0x5d0270]
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.005084e0
mov ecx, dword [ebp - 0x14]
mov edi, eax
mov esi, dword [ecx]
nop dword [eax]
test esi, esi
je 0x507ea9
mov eax, dword [esi + 0x28]
cmp eax, ebx
ja 0x507ea9
jne 0x507ea3
cmp dword [edi + 0x18], 8
lea eax, [edi + 4]
lea edx, [eax + 0x10]
lea ecx, [esi + 4]
mov dword [ebp - 0x14], edx
jb 0x507e81
mov eax, dword [eax]
cmp dword [ecx + 0x14], 8
lea edx, [ecx + 0x10]
jb 0x507e8c
mov ecx, dword [ecx]
mov ebx, dword [ebp - 0x14]
mov edx, dword [edx]
push dword [ebx]
push eax
call fcn.004b27f0
mov ebx, dword [ebp - 8]
add esp, 8
test eax, eax
je 0x507ec8
mov ecx, esi
mov esi, dword [esi]
jmp 0x507e60
mov dword [edi], esi
mov edx, edi
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp eax, esi
je 0x507ee0
cmp eax, edi
je 0x507ee0
mov dword [ebp - 0x10], 0
mov byte [ebp - 0xc], 0
jmp 0x507e57
push edi
call fcn.00506ab0
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov byte [eax + 4], 0
pop edi
pop esi
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 + 0x5f8120]
mov eax, edx
shr eax, 0x1f
cvtpd2ps xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x5f8120]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
comiss xmm1, dword [ecx + 0x98]
jbe 0x507f49
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