Function at 0x416880
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x548a9f
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x582654]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x30], ebx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x2c], esi
call fcn.004160f0
push 4
lea eax, [ebp - 0x38]
mov ecx, esi
push eax
call fcn.005228ff
mov ecx, 0x553ce4
lea eax, [ebp - 0x38]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4168f0
test dl, dl
je 0x4168ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4168f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4168d0
xor eax, eax
jmp 0x4168f5
sbb eax, eax
or eax, 1
test eax, eax
je 0x416912
push str.not_an_animation_file
push str.Fatal_Error
call fcn.00521c77
add esp, 8
xor eax, eax
jmp 0x416bc3
lea edi, [ebx + 0xc]
mov ecx, esi
push 1
push edi
mov dword [ebp - 0x3c], edi
call fcn.005228ff
push 1
push ebx
mov ecx, esi
call fcn.005228ff
lea eax, [ebx + 1]
mov ecx, esi
push 1
push eax
mov dword [ebp - 0x34], eax
call fcn.005228ff
lea eax, [ebx + 2]
mov ecx, esi
push 1
push eax
call fcn.005228ff
lea eax, [ebx + 3]
mov ecx, esi
push 1
push eax
call fcn.005228ff
cmp byte [edi], 6
jb 0x416968
push 4
lea eax, [ebp - 0x24]
mov ecx, esi
push eax
call fcn.005228ff
lea edi, [ebx + 6]
mov ecx, esi
push 2
push edi
mov dword [ebp - 0x24], edi
call fcn.005228ff
push 2
lea eax, [ebx + 8]
mov ecx, esi
push eax
call fcn.005228ff
push 2
lea eax, [ebx + 0xa]
mov ecx, esi
push eax
call fcn.005228ff
push 1
lea eax, [ebx + 4]
mov ecx, esi
push eax
call fcn.005228ff
push 0xe
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
call fcn.005228ff
push 0x20
lea eax, [ebx + 0x10]
mov ecx, esi
push eax
call fcn.005228ff
movsx eax, word [edi]
mov ecx, ebx
push 0x64
push eax
movzx eax, byte [ebx]
push eax
call fcn.004161d0
mov al, byte [ebx + 0xc]
cmp al, 3
jne 0x4169e4
movsx eax, word [edi]
mov ecx, esi
shl eax, 3
push eax
push dword [ebx + 0x34]
call fcn.005228ff
jmp 0x416a12
cmp al, 4
jb 0x416a12
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x28], ecx
cmp ax, word [edi]
jge 0x416a12
mov eax, dword [ebx + 0x34]
push 8
lea eax, [eax + ecx*8]
mov ecx, esi
push eax
call fcn.005228ff
mov ecx, dword [ebp - 0x28]
movsx eax, word [edi]
inc ecx
mov dword [ebp - 0x28], ecx
cmp ecx, eax
jl 0x4169f4
xor eax, eax
cmp ax, word [edi]
jge 0x416a3c
xor esi, esi
nop dword [eax + eax]
mov eax, dword [ebx + 0x34]
movzx eax, word [eax + esi*8 + 2]
push eax
call fcn.00417590
movsx eax, word [edi]
inc esi
add esp, 4
cmp esi, eax
jl 0x416a20
mov esi, dword [ebp - 0x2c]
xor edx, edx
mov dword [ebp - 0x28], edx
cmp byte [ebx], dl
jbe 0x416b0f
lea esi, [ebx + 0x38]
lea ecx, [ebx + 6]
nop
cmp dword [esi - 0x28], 0
je 0x416af7
xor eax, eax
xor edi, edi
cmp ax, word [ecx]
jge 0x416af7
mov eax, dword [esi]
mov ebx, dword [eax + edi*4]
test ebx, ebx
je 0x416a82
mov ecx, ebx
call fcn.004363b0
push 0x20
push ebx
call fcn.0052389d
add esp, 8
mov eax, dword [esi]
push 0x20
mov dword [eax + edi*4], 0
call fcn.00523854
add esp, 4
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x416aae
mov ecx, eax
call fcn.00436380
mov ecx, eax
jmp 0x416ab0
xor ecx, ecx
mov eax, dword [esi]
mov dword [ebp - 4], 0xffffffff
mov dword [eax + edi*4], ecx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [esi]
cmp byte [eax], 7
mov eax, dword [ebp - 0x34]
mov ecx, dword [ecx + edi*4]
movzx eax, byte [eax]
push eax
push dword [ebp - 0x2c]
jne 0x416ada
call fcn.00436590
jmp 0x416adf
call fcn.00436910
mov eax, dword [ebp - 0x24]
inc edi
movsx eax, word [eax]
cmp edi, eax
jl 0x416a67
mov ebx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
movzx eax, byte [ebx]
inc edx
add esi, 4
mov dword [ebp - 0x28], edx
cmp edx, eax
jl 0x416a50
mov esi, dword [ebp - 0x2c]
lea edi, [ebx + 6]
cmp byte [ebx + 0xc], 4
lea eax, [ebx + 0xc]
jb 0x416b43
push 4
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
call fcn.005228ff
xor eax, eax
xor ecx, ecx
cmp ax, word [edi]
jge 0x416b43
nop
mov eax, dword [ebx + 0x34]
xor dword [eax + ecx*8 + 4], 0x14ad
inc ecx
movsx eax, word [edi]
cmp ecx, eax
jl 0x416b30
mov al, byte [ebx + 3]
xor esi, esi
mov dword [ebx + 0x30], esi
test al, al
je 0x416b96
movzx eax, al
mov dword [ebp - 0x24], eax
test eax, eax
jle 0x416bb2
movzx ecx, byte [ebx + 2]
movsx edi, word [edi]
mov dword [ebp - 0x30], ecx
cmp esi, edi
jge 0x416b8a
mov eax, dword [ebx + 0x34]
mov edx, edi
mov ecx, dword [ebx + 0x30]
lea eax, [eax + esi*8]
add eax, 4
sub edx, esi
add ecx, dword [eax]
lea eax, [eax + 8]
mov dword [ebx + 0x30], ecx
sub edx, 1
jne 0x416b77
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x30]
sub eax, 1
mov esi, ecx
mov dword [ebp - 0x24], eax
jne 0x416b63
jmp 0x416bb2
movsx edx, word [edi]
test edx, edx
jle 0x416bb2
mov eax, dword [ebx + 0x34]
xor ecx, ecx
add eax, 4
add ecx, dword [eax]
lea eax, [eax + 8]
mov dword [ebx + 0x30], ecx
sub edx, 1
jne 0x416ba5
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x58], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x5c], eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052388c
mov esp, ebp
pop ebp
ret 0xc