Control flow following assembly
check if game transition phase global var == 11 if yes return 0
check if the first value of the game asset index table is FF if yes return 0 (impossible)
Enter a loop to check if param 1 is in the small asset index table. if not then return 0
Enter a loop to check if param 2 is in the small asset index table.
if not return 0 if yes return 1
Current working theory:
For seeing which file to use it seems to follow this pattern
iVar1 = cdlib_conditional?(gameAssetTableIndex,(ushort)index);
if (iVar1 == 0) {
fileTableIndex = assetPointer[1].cdFileTableIndex;
}
else {
fileTableIndex = assetPointer->cdFileTableIndex;
}
Leads me to believe its part of the mechanism to check if we need the first asset in the group or not. Because remember we always do setup asset load which loads the first one and then from there call push asset load new for the remaining files in a group.
However I do not know how the small asset index table facilitates this. From my pov its just a small array of index values. Until I map out what each index for both params corresponds to and understand why overlap is necessary the true purpose of what this function is doing can not be 100% ascertained.