Function at 0x4ed080
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 0x4ed09e
mov edx, dword [edi]
jmp 0x4ed0a0
mov edx, edi
mov ebx, 0x811c9dc5
xor ecx, ecx
mov dword [ebp - 8], ebx
add esi, esi
je 0x4ed0c7
nop
movzx eax, byte [edx + ecx]
inc ecx
xor eax, ebx
imul ebx, eax, 0x1000193
cmp ecx, esi
jb 0x4ed0b0
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 0x4ed117
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 0x4ed120
mov ecx, dword [ebp - 4]
push esi
call fcn.004ece60
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.004ed2a0
mov ecx, dword [ebp - 0x14]
mov edi, eax
mov esi, dword [ecx]
nop dword [eax]
test esi, esi
je 0x4ed1e9
mov eax, dword [esi + 0x24]
cmp eax, ebx
ja 0x4ed1e9
jne 0x4ed1e3
cmp dword [edi + 0x18], 8
lea eax, [edi + 4]
lea edx, [eax + 0x10]
lea ecx, [esi + 4]
mov dword [ebp - 0x14], edx
jb 0x4ed1c1
mov eax, dword [eax]
cmp dword [ecx + 0x14], 8
lea edx, [ecx + 0x10]
jb 0x4ed1cc
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 0x4ed208
mov ecx, esi
mov esi, dword [esi]
jmp 0x4ed1a0
mov dword [edi], esi
mov edx, edi
mov eax, esi
lock cmpxchg dword [ecx], edx
cmp eax, esi
je 0x4ed220
cmp eax, edi
je 0x4ed220
mov dword [ebp - 0x10], 0
mov byte [ebp - 0xc], 0
jmp 0x4ed197
push edi
call fcn.004ecd70
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 + 0x5edf30]
mov eax, edx
shr eax, 0x1f
cvtpd2ps xmm1, xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x5edf30]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
comiss xmm1, dword [ecx + 0x98]
jbe 0x4ed289
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