public void a(ClassRecord A_0, UnknownB0 A_1) { this.b01 = A_1; this.classRecord = A_0; this.classHash = A_0.hash; UnknownA8 a81 = (A_1.a(VLTOtherValue.TABLE_END) as UnknownA8); int num = a81.genht1[A_0.position].i2; A_1.ms1.Seek(num, SeekOrigin.Begin); BinaryReader br = new BinaryReader(A_1.ms1); this.fields = new VLTClass.aclz1[this.classRecord.i2]; for (int i = 0; i < this.classRecord.i2; ++i) { VLTClass.aclz1 a = new VLTClass.aclz1(); a.read(br); HashTracker.getValueForHash(a.hash); this.fields[i] = a; } this.dqb1 = new VLTClass.bie(this); }
// This is where our problems with Carbon and up appear to stem from. public void a(RowRecord A_0, UnknownB0 A_1) { BinaryReader binaryReader = new BinaryReader(A_1.ms1); BinaryReader binaryReader2 = new BinaryReader(A_1.ms2); UnknownDR dr = new UnknownDR(this.vltClass.classRecord.i2); UnknownA8 a = A_1.a(VLTOtherValue.TABLE_END) as UnknownA8; int num; if (a.genht1.ContainsKey(A_0.position)) { num = a.genht1[A_0.position].i2; } else { // NOTE: THIS IS A BUG, IT SHOULD NOT HAPPEN. // The ONLY reason I'm checking ContainsKey instead of using exception handling, // is because exception handling causes huge slowdowns in Visual Studio debugging. if (BuildConfig.DEBUG) { ++numFails; Console.WriteLine("VLTClass.a(): num fail (num" + numFails + ",b" + b8Fails + ")"); } return; } dr.b01 = A_1; dr.dq1 = this.vltClass; dr.c1 = A_0; for (int i = 0; i < this.vltClass.classRecord.i2; ++i) { VLTClass.aclz1 a2 = this.vltClass.fields[i]; BinaryReader binaryReader3; if (!a2.c()) { binaryReader3 = binaryReader; binaryReader3.BaseStream.Seek(num + a2.us1, SeekOrigin.Begin); } else { binaryReader3 = null; for (int j = 0; j < A_0.i1; ++j) { if (A_0.caa1[j].hash == a2.hash) { if (A_0.caa1[j].a()) { binaryReader3 = binaryReader2; binaryReader3.BaseStream.Seek(A_0.caa1[j].position, SeekOrigin.Begin); } else { binaryReader3 = binaryReader; binaryReader3.BaseStream.Seek(a.genht1[A_0.caa1[j].position].i2, SeekOrigin.Begin); } } } if (binaryReader3 == null) { continue; } } Type type = TypeMap.instance.getTypeForKey(a2.ui2); if (type == null) { type = typeof(VLTRawType); } VLTBaseType bb; if (a2.isArray()) { bb = new VLTArrayType(a2, type); } else { bb = VLTBaseType.a(type); bb.size = a2.len; if (bb is VLTRawType) { (bb as VLTRawType).len = a2.len; } } bb.ui1 = (uint)binaryReader3.BaseStream.Position; bb.isVltOffset = (binaryReader3 == binaryReader2); bb.typeHash = a2.ui2; bb.ui3 = a2.hash; bb.dr1 = dr; bb.read(binaryReader3); dr.a(i, bb); } this.drList.Add(dr); }