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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x10], ecx
cmp dword [edi + 0x14], 0x10
mov ebx, dword [edi + 0x10]
jb 0x405190
mov esi, dword [edi]
jmp 0x405192
mov esi, edi
xor ecx, ecx
mov edx, 0x811c9dc5
test ebx, ebx
je 0x4051b1
lea ecx, [ecx]
movzx eax, byte [ecx + esi]
xor edx, eax
inc ecx
imul edx, edx, 0x1000193
cmp ecx, ebx
jb 0x4051a0
mov ebx, dword [esp + 0x10]
mov esi, dword [ebx + 0x14]
mov ecx, esi
and ecx, edx
cmp dword [ebx + 0x18], ecx
ja 0x4051ca
shr esi, 1
or eax, 0xffffffff
sub eax, esi
add ecx, eax
mov esi, dword [ebx]
shl ecx, 3
mov dword [esp + 0x1c], ecx
add ecx, dword [ebx + 8]
mov eax, dword [ecx]
mov dword [esp + 0x14], eax
cmp esi, eax
je 0x4052b9
mov esi, dword [ecx + 4]
mov esi, dword [esi]
cmp esi, eax
je 0x4052b9
mov esi, dword [esi + 4]
cmp dword [esi + 0x1c], 0x10
mov edx, dword [esi + 0x18]
lea ecx, [esi + 8]
mov dword [esp + 0x18], edx
jb 0x405206
mov ecx, dword [ecx]
cmp dword [edi + 0x14], 0x10
jb 0x405210
mov ebx, dword [edi]
jmp 0x405212
mov ebx, edi
mov eax, dword [ebp + 0xc]
mov edi, edx
cmp dword [eax + 0x10], edx
cmovb edi, dword [eax + 0x10]
mov eax, dword [esp + 0x14]
test edi, edi
je 0x405289
sub edi, 4
jb 0x405241
jmp 0x405230
mov edx, dword [ebx]
cmp edx, dword [ecx]
jne 0x405246
add ebx, 4
add ecx, 4
sub edi, 4
jae 0x405230
cmp edi, 0xfffffffc
je 0x40527a
mov dl, byte [ebx]
cmp dl, byte [ecx]
jne 0x405273
cmp edi, 0xfffffffd
je 0x40527a
mov dl, byte [ebx + 1]
cmp dl, byte [ecx + 1]
jne 0x405273
cmp edi, 0xfffffffe
je 0x40527a
mov dl, byte [ebx + 2]
cmp dl, byte [ecx + 2]
jne 0x405273
cmp edi, 0xffffffff
je 0x40527a
mov dl, byte [ebx + 3]
cmp dl, byte [ecx + 3]
je 0x40527a
sbb ecx, ecx
or ecx, 1
jmp 0x40527c
xor ecx, ecx
test ecx, ecx
je 0x405285
mov edi, dword [ebp + 0xc]
jmp 0x40529f
mov edx, dword [esp + 0x18]
mov edi, dword [ebp + 0xc]
mov ebx, dword [edi + 0x10]
cmp ebx, edx
jae 0x405298
or ecx, 0xffffffff
jmp 0x40529f
xor ecx, ecx
cmp ebx, edx
setne cl
test ecx, ecx
sete cl
test cl, cl
sete cl
test cl, cl
je 0x4052fd
cmp esi, eax
jne 0x4051f1
mov ebx, dword [esp + 0x10]
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
cmp esi, eax
je 0x4052e3
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 [ebx + 8]
mov edx, dword [esp + 0x1c]
add ecx, edx
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x405332
mov dword [ecx], edi
mov eax, dword [ebx + 8]
mov dword [eax + edx + 4], edi
jmp 0x405354
lea eax, [esi + 8]
push edi
push eax
call fcn.004038e0
test al, al
je 0x40530f
mov esi, dword [esi]
jmp 0x4052b5
push dword [ebp + 0x10]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
call fcn.00404190
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 0xc
cmp eax, esi
jne 0x40533a
mov dword [ecx], edi
jmp 0x405354
mov eax, dword [ecx + 4]
mov eax, dword [eax]
mov dword [ecx + 4], eax
cmp eax, edi
je 0x405354
mov ecx, dword [ebx + 8]
mov eax, dword [ecx + edx + 4]
mov eax, dword [eax + 4]
mov dword [ecx + edx + 4], eax
mov ecx, ebx
call fcn.004056b0
mov eax, dword [ebp + 8]
mov dword [eax], edi
pop edi
pop esi
mov byte [eax + 4], 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc