private void method_2(BinaryReader A_0, bool A_1) { int num = A_1 ? A_0.ReadInt16() : A_0.ReadByte(); string str = new string(Class813.smethod_15(A_0, A_1, num)); this.vmethod_0(str, A_0); }
internal static void smethod_0(BinaryReader A_0, Class1111 A_1, Document A_2) { Class907 settings = A_2.Settings; int num = A_1.int_0; int num2 = A_1.int_1; A_0.BaseStream.Seek((long)num, SeekOrigin.Begin); int num3 = A_0.ReadUInt16(); settings.bool_37 = (num3 & 1) != 0; settings.bool_67 = (num3 & 2) != 0; A_2.FootnoteOptions.method_54((FootnotePosition)((num3 & 0x60) >> 5)); num3 = A_0.ReadUInt16(); A_2.FootnoteOptions.method_55(((FootnoteRestartRule)num3) & (FootnoteRestartRule.RestartPage | FootnoteRestartRule.RestartSection)); A_2.FootnoteOptions.method_56((num3 & 0xfffc) >> 2); num3 = A_0.ReadUInt16(); settings.bool_28 = (num3 & 0x800) == 0; settings.bool_27 = (num3 & 0x1000) != 0; settings.bool_16 = (num3 & 0x4000) != 0; settings.bool_21 = (num3 & 0x8000) != 0; num3 = A_0.ReadUInt16(); settings.bool_63 = (num3 & 4) != 0; settings.bool_64 = (num3 & 8) != 0; settings.bool_34 = (num3 & 0x10) != 0; settings.bool_11 = (num3 & 0x20) != 0; settings.bool_35 = (num3 & 0x200) != 0; settings.bool_0 = (num3 & 0x400) != 0; settings.method_2((num3 & 0x800) != 0); settings.bool_65 = (num3 & 0x1000) != 0; settings.bool_36 = (num3 & 0x4000) != 0; settings.bool_7 = (num3 & 0x8000) != 0; num3 = A_0.ReadUInt16(); settings.float_0 = A_0.ReadUInt16(); A_0.ReadUInt16(); settings.int_16 = A_0.ReadUInt16(); settings.int_15 = A_0.ReadUInt16(); A_0.ReadUInt16(); A_0.ReadUInt32(); A_0.ReadUInt32(); A_0.ReadUInt32(); A_0.ReadInt16(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt16(); A_0.ReadInt32(); num3 = A_0.ReadUInt16(); A_2.EndnoteOptions.RestartRule = ((FootnoteRestartRule)num3) & (FootnoteRestartRule.RestartPage | FootnoteRestartRule.RestartSection); A_2.EndnoteOptions.StartNumber = (num3 & 0xfffc) >> 2; num3 = A_0.ReadUInt16(); A_2.EndnoteOptions.method_54(((FootnotePosition)num3) & FootnotePosition.PrintAsEndOfDocument); settings.bool_6 = (num3 & 0x400) != 0; settings.bool_10 = (num3 & 0x800) != 0; settings.bool_41 = (num3 & 0x1000) == 0; A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt16(); A_0.ReadInt32(); A_0.ReadInt32(); A_2.LegacyHash = (uint)A_0.ReadInt32(); num3 = A_0.ReadUInt16(); A_2.ViewSetup.DocumentViewType = ((DocumentViewType)num3) & ((DocumentViewType)7); int num4 = (num3 & 0xff8) >> 3; if (num4 > 0) { A_2.ViewSetup.ZoomPercent = num4; } A_2.ViewSetup.ZoomType = (ZoomType)((num3 & 0x3000) >> 12); settings.bool_15 = (num3 & 0x8000) != 0; smethod_6(settings, num2); Class908 class3 = settings.method_5(); if (num2 >= 500) { smethod_2(A_0.ReadInt32(), class3); settings.autoFormatDocumentType_0 = (AutoFormatDocumentType)A_0.ReadUInt16(); num3 = A_0.ReadUInt16(); settings.bool_42 = (num3 & 1) != 0; settings.characterSpacing_0 = (CharacterSpacing)((num3 & 6) >> 1); settings.bool_44 = (num3 & 0x18) != 0; settings.bool_43 = (num3 & 0x20) != 0; int num5 = A_0.ReadInt16(); int num6 = A_0.ReadInt16(); int num7 = (num3 & 0x380) >> 7; settings.localeIDs_0 = Class813.smethod_23(num7); char[] chArray = Class813.smethod_15(A_0, true, 0x65); char[] chArray2 = Class813.smethod_15(A_0, true, 0x33); settings.string_2 = new string(chArray, 0, Math.Min(num5, 0x65)); settings.string_1 = new string(chArray2, 0, Math.Min(num6, 0x33)); settings.int_23 = A_0.ReadInt16(); settings.int_24 = A_0.ReadInt16(); settings.int_19 = A_0.ReadInt16(); settings.int_20 = A_0.ReadInt16(); num3 = A_0.ReadUInt16(); settings.int_22 = num3 & 0x7f; settings.bool_68 = (num3 & 0x80) != 0; settings.int_21 = (num3 & 0x7f00) >> 8; settings.bool_40 = (num3 & 0x8000) != 0; num3 = A_0.ReadUInt16(); settings.int_28 = (num3 & 30) >> 1; if ((num3 & 0x20) != 0) { settings.proofState_1 = ((num3 & 0x40) != 0) ? ProofState.Clean : ProofState.Dirty; } else { settings.proofState_1 = ProofState.None; } settings.bool_9 = (num3 & 0x80) != 0; settings.bool_69 = (num3 & 0x100) != 0; settings.bool_66 = (num3 & 0x200) != 0; settings.bool_12 = (num3 & 0x800) != 0; settings.bool_13 = (num3 & 0x1000) == 0; settings.bool_14 = (num3 & 0x2000) == 0; num3 = A_0.ReadUInt16(); settings.bool_70 = (num3 & 1) != 0; settings.bool_71 = (num3 & 2) != 0; A_0.ReadBytes(12); A_0.ReadInt32(); A_0.ReadInt32(); A_2.VbaDocumentEvents = (VbaDocumentEvents)A_0.ReadInt32(); num3 = A_0.ReadInt32(); A_0.ReadBytes(30); A_0.ReadUInt32(); A_0.ReadUInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadUInt32(); A_2.FootnoteOptions.method_53((FootnoteNumberFormat)A_0.ReadInt16()); A_2.EndnoteOptions.method_53((FootnoteNumberFormat)A_0.ReadInt16()); A_0.ReadUInt16(); A_0.ReadUInt16(); } if (num2 >= 0x220) { A_0.ReadUInt16(); settings.int_30 = A_0.ReadUInt16(); num3 = A_0.ReadInt32(); settings.bool_29 = (num3 & 2) != 0; if ((num3 & 0x10000000) != 0) { settings.bool_48 = (num3 & 0x200) == 0; settings.bool_46 = (num3 & 0x400) != 0; settings.bool_47 = (num3 & 0x800) != 0; settings.screenSize_1 = (ScreenSize)((num3 & 0xf000) >> 12); settings.bool_50 = (num3 & 0x10000) == 0; settings.bool_51 = (num3 & 0x20000) == 0; settings.int_25 = (num3 & 0xffc0000) >> 0x12; } smethod_2(A_0.ReadInt32(), class3); num3 = A_0.ReadInt32(); class3.method_68((num3 & 1) != 0); class3.method_70((num3 & 2) != 0); class3.method_72((num3 & 4) != 0); class3.method_74((num3 & 8) != 0); class3.method_76((num3 & 0x10) != 0); class3.method_78((num3 & 0x20) != 0); class3.method_80((num3 & 0x40) != 0); class3.method_82((num3 & 0x80) != 0); class3.method_84((num3 & 0x100) != 0); class3.method_86((num3 & 0x200) != 0); if (num2 >= 0x252) { class3.method_88((num3 & 0x400) != 0); class3.method_90((num3 & 0x800) != 0); class3.method_92((num3 & 0x1000) != 0); class3.method_94((num3 & 0x2000) != 0); class3.method_96((num3 & 0x4000) != 0); class3.method_98((num3 & 0x8000) != 0); } if (num2 >= 0x268) { class3.method_100((num3 & 0x10000) != 0); class3.method_102((num3 & 0x20000) != 0); } if (num2 >= 0x2a2) { class3.method_104((num3 & 0x40000) != 0); class3.method_106((num3 & 0x80000) != 0); class3.method_108((num3 & 0x100000) != 0); class3.method_110((num3 & 0x200000) != 0); class3.method_112((num3 & 0x400000) != 0); class3.method_114((num3 & 0x800000) != 0); class3.method_116((num3 & 0x1000000) != 0); class3.method_118((num3 & 0x2000000) != 0); class3.method_120((num3 & 0x4000000) != 0); class3.method_122((num3 & 0x8000000) != 0); class3.method_124((num3 & 0x10000000) != 0); class3.method_126((num3 & 0x20000000) != 0); class3.method_128((num3 & 0x40000000) != 0); class3.method_130((num3 & 0x80000000L) != 0L); } num3 = A_0.ReadInt32(); if (num2 >= 0x2a2) { class3.method_132((num3 & 1) != 0); } A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); num3 = A_0.ReadInt32(); A_2.ViewSetup.DoNotDisplayPageBoundaries = (num3 & 0x20000) != 0; settings.bool_3 = (num3 & 0x800000) != 0; if ((num3 & 0x8000000) != 0) { settings.bool_52 = (num3 & 0x10000000) != 0; settings.bool_53 = (num3 & 0x20000000) != 0; settings.bool_58 = (num3 & 0x40000000) == 0; settings.bool_60 = (num3 & 0x80000000L) != 0L; } } if (num2 >= 0x252) { A_0.ReadInt32(); num3 = A_0.ReadUInt16(); settings.bool_8 = (num3 & 1) != 0; settings.bool_61 = (num3 & 8) == 0; settings.bool_62 = (num3 & 0x10) != 0; settings.bool_39 = (num3 & 0x40) != 0; settings.bool_38 = (num3 & 0x80) != 0; settings.bool_19 = (num3 & 0x800) != 0; settings.bool_22 = (num3 & 0x1000) != 0; settings.bool_23 = (num3 & 0x2000) != 0; settings.bool_24 = (num3 & 0x4000) != 0; settings.bool_25 = (num3 & 0x8000) != 0; settings.int_31 = A_0.ReadUInt16(); A_0.ReadUInt16(); settings.int_32 = A_0.ReadUInt16(); settings.int_18 = A_0.ReadUInt16(); settings.int_27 = A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); settings.int_26 = A_0.ReadInt32(); } if (num2 >= 0x268) { num3 = A_0.ReadInt32(); settings.bool_33 = (num3 & 1) != 0; bool flag2 = (num3 & 2) != 0; settings.bool_2 = (num3 & 4) != 0; settings.bool_54 = (num3 & 8) != 0; settings.bool_59 = (num3 & 0x10) != 0; bool flag = (num3 & 0x20) != 0; settings.bool_1 = flag2 && flag; settings.bool_56 = (num3 & 0x80) != 0; settings.bool_57 = (num3 & 0x100) != 0; settings.bool_18 = (num3 & 0x800) != 0; settings.bool_17 = (num3 & 0x1000) != 0; num3 = A_0.ReadUInt16(); settings.bool_30 = (num3 & 1) != 0; settings.bool_26 = (num3 & 2) != 0; settings.bool_31 = (num3 & 4) != 0; settings.bool_32 = (num3 & 8) != 0; settings.int_17 = (num3 & 0x70) >> 4; A_2.ViewSetup.DisplayBackgroundShape = (num3 & 0x80) != 0; A_0.ReadUInt16(); A_0.ReadUInt16(); A_0.ReadInt32(); A_0.ReadUInt16(); A_0.ReadUInt16(); A_0.ReadInt32(); } if (num2 >= 0x2a2) { A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); A_0.ReadInt32(); smethod_1(A_0, A_2); } long position = A_0.BaseStream.Position; }