Function at 0x40784a
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x425848]
xor eax, ebp
mov dword [ebp + 0x39c], eax
push ebx
mov ebx, dword [ebp + 0x3ac]
push esi
mov esi, dword [ebp + 0x3a8]
test esi, esi
push edi
mov dword [ebp - 0x70], ebx
mov edi, str.E:_sourcedemo2emucore_ffscntnr.c
jne 0x407898
push 0x29f
push edi
call fcn.00401130
push str.Pointer_is_NULL_n
call fcn.0040180d
add esp, 0xc
cmp dword [esi], edi
je 0x4078b8
push 0x29f
push edi
call fcn.00401130
push edi
push dword [esi]
push esi
push str.Struct_mismatch_pointer__0x_p:_s____s__n
call fcn.0040180d
add esp, 0x18
test ebx, ebx
jne 0x4078d4
push 0x2a0
push edi
call fcn.00401130
push str.Pointer_is_NULL_n
call fcn.0040180d
add esp, 0xc
push esi
call fcn.0040769e
cmp byte [ebx], 0
pop ecx
jne 0x4078f3
push str.Flat_Fast_File_System_Bypassed..._n
call fcn.004017c6
pop ecx
xor eax, eax
inc eax
jmp 0x407df2
lea edi, [esi + 4]
push edi
call fcn.00408e42
push 0x41
push ebx
push dword [edi]
call fcn.00408f7a
add esp, 0x10
test eax, eax
jne 0x407926
push edi
call fcn.00408eab
push ebx
push str.Couldnt_open_flat_file__s__n
call fcn.004017c6
add esp, 0xc
jmp 0x407df0
push 0x140
lea eax, [esi + 0x20]
push ebx
push eax
call fcn.00403610
lea eax, [ebp - 0x7c]
push eax
push dword [edi]
call fcn.00408d06
mov eax, dword [ebp - 0x7c]
add esp, 0x14
cmp eax, dword [ebp + 0x3b4]
jge 0x407978
push dword [ebp + 0x3b4]
push dword [ebp - 0x78]
push eax
push ebx
push str.Offset_too_large_for_flat_file__s___d____d___n
call fcn.004017c6
push dword [edi]
call fcn.0040896e
push edi
call fcn.00408eab
add esp, 0x1c
jmp 0x407df0
mov ebx, dword [ebp + 0x3b0]
test ebx, ebx
jne 0x407987
and dword [esi + 0x14], ebx
jmp 0x407999
mov eax, ebx
cdq
push edx
push eax
push dword [edi]
call fcn.00408aa6
add esp, 0xc
mov dword [esi + 0x14], ebx
push 4
lea eax, [ebp + 0x394]
push eax
push esi
call fcn.00406b23
add esp, 0xc
cmp byte [ebp + 0x394], 0x46
jne 0x4079d3
cmp byte [ebp + 0x395], 0x46
jne 0x4079d3
cmp byte [ebp + 0x396], 0x53
jne 0x4079d3
cmp byte [ebp + 0x397], 0x21
je 0x407a93
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x78]
sub eax, 8
sbb ecx, 0
push ecx
push eax
push dword [edi]
call fcn.00408aa6
push 4
lea eax, [ebp + 0x194]
push eax
push esi
call fcn.00406b23
movzx ebx, byte [ebp + 0x197]
movzx eax, byte [ebp + 0x196]
shl ebx, 8
or ebx, eax
movzx eax, byte [ebp + 0x195]
shl ebx, 8
or ebx, eax
movzx eax, byte [ebp + 0x194]
shl ebx, 8
add esp, 0x18
or ebx, eax
jbe 0x407dd3
xor eax, eax
cmp eax, dword [ebp - 0x78]
jg 0x407dd3
jl 0x407a41
cmp ebx, dword [ebp - 0x7c]
jae 0x407dd3
push eax
push ebx
push dword [edi]
call fcn.00408aa6
push 4
lea eax, [ebp + 0x394]
push eax
push esi
call fcn.00406b23
add esp, 0x18
cmp byte [ebp + 0x394], 0x46
jne 0x407da8
cmp byte [ebp + 0x395], 0x46
jne 0x407da8
cmp byte [ebp + 0x396], 0x53
jne 0x407da8
cmp byte [ebp + 0x397], 0x21
jne 0x407da8
mov dword [esi + 0x14], ebx
push 4
lea eax, [ebp + 0x194]
push eax
push esi
call fcn.00406b23
movzx eax, byte [ebp + 0x197]
movzx ecx, byte [ebp + 0x196]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x195]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x194]
shl eax, 8
or eax, ecx
mov dword [esi + 0x10], eax
push 4
lea eax, [ebp + 0x194]
push eax
push esi
call fcn.00406b23
movzx ebx, byte [ebp + 0x197]
movzx eax, byte [ebp + 0x196]
shl ebx, 8
or ebx, eax
movzx eax, byte [ebp + 0x195]
shl ebx, 8
or ebx, eax
movzx eax, byte [ebp + 0x194]
shl ebx, 8
or ebx, eax
push 4
lea eax, [ebp + 0x194]
push eax
push esi
not ebx
call fcn.00406b23
movzx eax, byte [ebp + 0x197]
movzx ecx, byte [ebp + 0x196]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x195]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x194]
shl eax, 8
or eax, ecx
mov dword [esi + 0xc], eax
push 4
lea eax, [ebp + 0x194]
push eax
push esi
call fcn.00406b23
movzx eax, byte [ebp + 0x197]
movzx ecx, byte [ebp + 0x196]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x195]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x194]
shl eax, 8
or eax, ecx
not eax
mov dword [ebp - 0x70], eax
push 4
lea eax, [ebp + 0x194]
push eax
push esi
call fcn.00406b23
movzx eax, byte [ebp + 0x197]
movzx ecx, byte [ebp + 0x196]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x195]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x194]
shl eax, 8
add esp, 0x3c
or eax, ecx
mov dword [esi + 8], eax
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x407bf0
push ebx
push eax
push str.FFS:_CMatch_Fail__d____d_n
call fcn.004017c6
push dword [edi]
call fcn.0040896e
push edi
call fcn.00408eab
add esp, 0x14
jmp 0x407df0
mov ecx, dword [esi + 0xc]
cmp ecx, dword [ebp - 0x70]
je 0x407c03
push dword [ebp - 0x70]
push ecx
push str.FFS:_SMatch_Fail__d____d_n
jmp 0x407bd6
xor ebx, ebx
cmp dword [esi + 0x18], ebx
jne 0x407c25
push 0x305
push str.E:_sourcedemo2emucore_ffscntnr.c
shl eax, 3
push 1
push eax
call fcn.00402455
add esp, 0x10
mov dword [esi + 0x18], eax
cmp dword [esi + 0x10], ebx
jbe 0x407cbc
push 4
lea eax, [ebp + 0x194]
push eax
push esi
call fcn.00406b23
movzx eax, byte [ebp + 0x197]
movzx ecx, byte [ebp + 0x196]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x195]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x194]
shl eax, 8
or eax, ecx
mov ecx, dword [esi + 0x18]
mov dword [ecx + ebx*8], eax
push 4
lea eax, [ebp + 0x194]
push eax
push esi
call fcn.00406b23
movzx eax, byte [ebp + 0x197]
movzx ecx, byte [ebp + 0x196]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x195]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x194]
shl eax, 8
or eax, ecx
mov ecx, dword [esi + 0x18]
add esp, 0x18
mov dword [ecx + ebx*8 + 4], eax
inc ebx
cmp ebx, dword [esi + 0x10]
jb 0x407c2e
cmp dword [ebp + 0x3b8], 1
jne 0x4078eb
mov eax, dword [ebp + 0x3b4]
cdq
push edx
push eax
push dword [edi]
call fcn.00408aa6
mov eax, dword [esi + 0xc]
and dword [ebp - 0x70], 0
or dword [ebp - 0x74], 0xffffffff
add esp, 0xc
sub eax, 4
je 0x407d51
mov ebx, dword [esi + 0xc]
sub ebx, dword [ebp - 0x70]
mov eax, 0x200
add ebx, 0xfffffffc
cmp ebx, eax
jbe 0x407d00
mov ebx, eax
lea eax, [ebp - 0x80]
push eax
push ebx
lea eax, [ebp - 0x6c]
push eax
push dword [edi]
call fcn.00408c18
add esp, 0x10
cmp dword [ebp - 0x80], ebx
jne 0x407d51
xor eax, eax
test ebx, ebx
jbe 0x407d43
movzx ecx, byte [ebp + eax - 0x6c]
mov edx, dword [ebp - 0x74]
and edx, 0xff
xor ecx, edx
mov edx, dword [ebp - 0x74]
shr edx, 8
xor edx, dword [ecx*4 + 0x425018]
inc eax
cmp eax, ebx
mov dword [ebp - 0x74], edx
jb 0x407d1e
mov eax, dword [esi + 0xc]
add dword [ebp - 0x70], ebx
sub eax, 4
cmp dword [ebp - 0x70], eax
jb 0x407cec
not dword [ebp - 0x74]
push 4
lea eax, [ebp + 0x194]
push eax
push esi
call fcn.00406b23
movzx eax, byte [ebp + 0x197]
movzx ecx, byte [ebp + 0x196]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x195]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0x194]
shl eax, 8
or eax, ecx
add esp, 0xc
cmp dword [ebp - 0x74], eax
je 0x4078eb
push eax
push dword [ebp - 0x74]
push str.FFS:_CMatch2_Fail__d____d_n
jmp 0x407bd6
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x78]
sub eax, 4
sbb ecx, 0
push ecx
push eax
push ebx
push str.FFS_Does_not_contain_proper_tag__Read__d_from__d_____n
call fcn.004017c6
push dword [edi]
call fcn.0040896e
push edi
call fcn.00408eab
add esp, 0x18
jmp 0x407df0
push dword [ebp - 0x70]
push str.File__s_doesnt_contain_FFS_data__n
call fcn.004017c6
push dword [edi]
call fcn.0040896e
push edi
call fcn.00408eab
add esp, 0x10
xor eax, eax
mov ecx, dword [ebp + 0x39c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040f870
add ebp, 0x3a0
leave
ret