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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov ebp, ecx
cmp dword [edi + 0x14], 0x10
mov ebx, dword [edi + 0x10]
mov dword [esp + 0x10], ebp
jb 0x40678e
mov esi, dword [edi]
jmp 0x406790
mov esi, edi
xor ecx, ecx
mov edx, 0x811c9dc5
test ebx, ebx
je 0x4067b1
jmp 0x4067a0
movzx eax, byte [ecx + esi]
xor edx, eax
inc ecx
imul edx, edx, 0x1000193
cmp ecx, ebx
jb 0x4067a0
mov esi, dword [ebp + 0x14]
mov ecx, esi
and ecx, edx
cmp dword [ebp + 0x18], ecx
ja 0x4067c6
shr esi, 1
or eax, 0xffffffff
sub eax, esi
add ecx, eax
mov esi, dword [ebp]
lea ebx, [ecx*8]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x14], ebx
mov eax, dword [ecx + ebx]
mov dword [esp + 0x18], eax
cmp esi, eax
je 0x4068bb
mov esi, dword [ecx + ebx + 4]
mov esi, dword [esi]
cmp esi, eax
je 0x4068bb
mov esi, dword [esi + 4]
cmp dword [esi + 0x1c], 0x10
mov ebp, dword [esi + 0x18]
lea ecx, [esi + 8]
jb 0x406805
mov ecx, dword [ecx]
cmp dword [edi + 0x14], 0x10
jb 0x40680f
mov ebx, dword [edi]
jmp 0x406811
mov ebx, edi
mov eax, dword [esp + 0x24]
mov edi, ebp
cmp dword [eax + 0x10], ebp
cmovb edi, dword [eax + 0x10]
mov eax, dword [esp + 0x18]
test edi, edi
je 0x406886
sub edi, 4
jb 0x406841
jmp 0x406830
mov edx, dword [ebx]
cmp edx, dword [ecx]
jne 0x406846
add ebx, 4
add ecx, 4
sub edi, 4
jae 0x406830
cmp edi, 0xfffffffc
je 0x40687a
mov dl, byte [ebx]
cmp dl, byte [ecx]
jne 0x406873
cmp edi, 0xfffffffd
je 0x40687a
mov dl, byte [ebx + 1]
cmp dl, byte [ecx + 1]
jne 0x406873
cmp edi, 0xfffffffe
je 0x40687a
mov dl, byte [ebx + 2]
cmp dl, byte [ecx + 2]
jne 0x406873
cmp edi, 0xffffffff
je 0x40687a
mov dl, byte [ebx + 3]
cmp dl, byte [ecx + 3]
je 0x40687a
sbb ecx, ecx
or ecx, 1
jmp 0x40687c
xor ecx, ecx
test ecx, ecx
je 0x406886
mov edi, dword [esp + 0x24]
jmp 0x40689d
mov edi, dword [esp + 0x24]
mov ebx, dword [edi + 0x10]
cmp ebx, ebp
jae 0x406896
or ecx, 0xffffffff
jmp 0x40689d
xor ecx, ecx
cmp ebx, ebp
setne cl
test ecx, ecx
sete cl
test cl, cl
sete cl
test cl, cl
je 0x4068fd
cmp esi, eax
jne 0x4067f4
mov ebp, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x28]
mov eax, dword [edi]
cmp esi, eax
je 0x4068e6
mov ecx, dword [edi + 4]
mov dword [ecx], eax
mov ecx, dword [eax + 4]
mov dword [ecx], esi
mov ecx, dword [esi + 4]
mov dword [ecx], edi
mov ecx, dword [eax + 4]
mov edx, dword [esi + 4]
mov dword [esi + 4], ecx
mov ecx, dword [edi + 4]
mov dword [eax + 4], ecx
mov dword [edi + 4], edx
mov ecx, dword [ebp + 8]
add ecx, ebx
mov eax, dword [ecx]
cmp eax, dword [ebp]
jne 0x406930
mov dword [ecx], edi
mov eax, dword [ebp + 8]
mov dword [ebx + eax + 4], edi
jmp 0x406952
lea eax, [esi + 8]
push edi
push eax
call fcn.004038e0
test al, al
je 0x40690f
mov esi, dword [esi]
jmp 0x4068b3
push dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
call fcn.00406970
mov eax, dword [esp + 0x20]
mov dword [eax], esi
mov byte [eax + 4], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
cmp eax, esi
jne 0x406938
mov dword [ecx], edi
jmp 0x406952
mov eax, dword [ecx + 4]
mov eax, dword [eax]
mov dword [ecx + 4], eax
cmp eax, edi
je 0x406952
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + ebx + 4]
mov eax, dword [eax + 4]
mov dword [ecx + ebx + 4], eax
mov ecx, ebp
call fcn.004066b0
mov eax, dword [esp + 0x20]
mov dword [eax], edi
pop edi
pop esi
pop ebp
mov byte [eax + 4], 1
pop ebx
add esp, 0xc
ret 0xc