private int CheckCodeBlock(int offset, byte[] allBytes, SymbolCollection newSymbols, List<CodeBlock> newCodeBlocks)
{
int codeBlockID = 0;
try
{
int endOfTable = Convert.ToInt32(allBytes[offset + 0x01000]) + Convert.ToInt32(allBytes[offset + 0x01001]) * 256 + offset;
int codeBlockAddress = Convert.ToInt32(allBytes[offset + 0x01002]) + Convert.ToInt32(allBytes[offset + 0x01003]) * 256 + offset;
if (endOfTable == offset + 0xC3C3) return 0;
codeBlockID = Convert.ToInt32(allBytes[codeBlockAddress]) + Convert.ToInt32(allBytes[codeBlockAddress + 1]) * 256;
foreach (CodeBlock cb in newCodeBlocks)
{
if (cb.StartAddress <= codeBlockAddress && cb.EndAddress >= codeBlockAddress)
{
cb.CodeID = codeBlockID;
cb.AddressID = codeBlockAddress;
}
}
}
catch (Exception)
{
}
return codeBlockID;
}