-
Notifications
You must be signed in to change notification settings - Fork 13
/
_agent.js
1350 lines (1317 loc) · 94.1 KB
/
_agent.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HybridCLR = void 0;
const InterpMethodInfo_1 = require("./hybridclr/InterpMethodInfo");
const il2cppApi_1 = require("./il2cpp/il2cppApi");
const utils_1 = require("./il2cpp/struct/utils");
let observes = new Map();
exports.HybridCLR = {
doAttach: function (addr) {
Interceptor.attach(addr, {
onEnter: function (args) {
let interpMethodInfo = new InterpMethodInfo_1.InterpMethodInfo(args[1]);
let methodInfo = interpMethodInfo.get_methodInfo();
let methodName = methodInfo.name();
let klass = methodInfo.getClass();
let il2CppImage = il2cppApi_1.il2cppApi.il2cpp_class_get_image(klass);
let klassName = klass.name();
let dll = il2CppImage.name();
let namespaze = klass.namespaze();
let flags = methodInfo.getFlags();
let methodStatic = utils_1.utils.get_method_static(flags);
// console.log("is methodStatic "+methodStatic)
let argCount = interpMethodInfo.get_argCount();
let key;
if (methodStatic) {
key = dll + "_" + namespaze + "_" + klassName + "_" + methodName + "_" + argCount;
}
else {
key = dll + "_" + namespaze + "_" + klassName + "_" + methodName + "_" + (argCount - 1);
}
let callback = observes.get(key);
if (callback) {
let argBase = args[2];
let runtimeArgs = [];
for (let i = 0; i < argCount; i++) {
let arg = argBase.add(i * Process.pointerSize);
runtimeArgs.push(arg);
}
callback(interpMethodInfo, runtimeArgs);
}
}
});
},
attach: function () {
let module = Process.findModuleByName("libil2cpp.so");
if (module === null) {
setTimeout(function () {
exports.HybridCLR.attach();
}, 500);
return;
}
let moduleSymbolDetails = module.enumerateSymbols();
for (let i = 0; i < moduleSymbolDetails.length; i++) {
let symbol = moduleSymbolDetails[i];
if (symbol.name === "_ZN9hybridclr11interpreter16InterpFrameGroup25EnterFrameFromInterpreterEPKNS0_16InterpMethodInfoEPNS0_11StackObjectE"
|| symbol.name === "_ZN9hybridclr11interpreter16InterpFrameGroup20EnterFrameFromNativeEPKNS0_16InterpMethodInfoEPNS0_11StackObjectE") {
exports.HybridCLR.doAttach(symbol.address);
}
}
},
observe: function (dll, namespace, klass, method, methodCount, callBack) {
let key = dll + "_" + namespace + "_" + klass + "_" + method + "_" + methodCount;
console.log("put key : " + key);
observes.set(key, callBack);
}
};
},{"./hybridclr/InterpMethodInfo":4,"./il2cpp/il2cppApi":7,"./il2cpp/struct/utils":19}],2:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestJs = void 0;
const HybridCLR_1 = require("./HybridCLR");
exports.TestJs = {
test: function () {
HybridCLR_1.HybridCLR.observe("HotUpdate.dll", "HotUpdate", "Hello", "add", 2, function (methodInfo, runtimeArgs) {
console.log("args len " + runtimeArgs.length);
let a = runtimeArgs[1].readU32();
let b = runtimeArgs[2].readU32();
console.log("add call a = " + a + " b= " + b);
runtimeArgs[1].writeU32(100);
});
HybridCLR_1.HybridCLR.attach();
}
};
},{"./HybridCLR":1}],3:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2cppSoName = void 0;
exports.Il2cppSoName = "libil2cpp.so";
},{}],4:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InterpMethodInfo = void 0;
const NativeStruct_1 = require("../il2cpp/NativeStruct");
const MethodInfo_1 = require("../il2cpp/struct/MethodInfo");
class InterpMethodInfo extends NativeStruct_1.NativeStruct {
get_argCount() {
return this.add(0x10).readU32();
}
get_methodInfo() {
return new MethodInfo_1.MethodInfo(this.readPointer());
}
}
exports.InterpMethodInfo = InterpMethodInfo;
},{"../il2cpp/NativeStruct":6,"../il2cpp/struct/MethodInfo":16}],5:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppTypeEnum = void 0;
exports.Il2CppTypeEnum = {
IL2CPP_TYPE_END: 0x00,
IL2CPP_TYPE_VOID: 0x01,
IL2CPP_TYPE_BOOLEAN: 0x02,
IL2CPP_TYPE_CHAR: 0x03,
IL2CPP_TYPE_I1: 0x04,
IL2CPP_TYPE_U1: 0x05,
IL2CPP_TYPE_I2: 0x06,
IL2CPP_TYPE_U2: 0x07,
IL2CPP_TYPE_I4: 0x08,
IL2CPP_TYPE_U4: 0x09,
IL2CPP_TYPE_I8: 0x0a,
IL2CPP_TYPE_U8: 0x0b,
IL2CPP_TYPE_R4: 0x0c,
IL2CPP_TYPE_R8: 0x0d,
IL2CPP_TYPE_STRING: 0x0e,
IL2CPP_TYPE_PTR: 0x0f,
IL2CPP_TYPE_BYREF: 0x10,
IL2CPP_TYPE_VALUETYPE: 0x11,
IL2CPP_TYPE_CLASS: 0x12,
IL2CPP_TYPE_VAR: 0x13,
IL2CPP_TYPE_ARRAY: 0x14,
IL2CPP_TYPE_GENERICINST: 0x15,
IL2CPP_TYPE_TYPEDBYREF: 0x16,
IL2CPP_TYPE_I: 0x18,
IL2CPP_TYPE_U: 0x19,
IL2CPP_TYPE_FNPTR: 0x1b,
IL2CPP_TYPE_OBJECT: 0x1c,
IL2CPP_TYPE_SZARRAY: 0x1d,
IL2CPP_TYPE_MVAR: 0x1e,
IL2CPP_TYPE_CMOD_REQD: 0x1f,
IL2CPP_TYPE_CMOD_OPT: 0x20,
IL2CPP_TYPE_INTERNAL: 0x21,
IL2CPP_TYPE_MODIFIER: 0x40,
IL2CPP_TYPE_SENTINEL: 0x41,
IL2CPP_TYPE_PINNED: 0x45,
IL2CPP_TYPE_ENUM: 0x55
};
},{}],6:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NativeStruct = void 0;
class NativeStruct extends NativePointer {
constructor(pointer) {
super(pointer);
}
}
exports.NativeStruct = NativeStruct;
},{}],7:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.il2cppApi = void 0;
const Il2CppImage_1 = require("./struct/Il2CppImage");
const Il2CppClass_1 = require("./struct/Il2CppClass");
const Il2CppType_1 = require("./struct/Il2CppType");
const Il2CppFieldInfo_1 = require("./struct/Il2CppFieldInfo");
const Il2CppPropertyInfo_1 = require("./struct/Il2CppPropertyInfo");
const MethodInfo_1 = require("./struct/MethodInfo");
const config_1 = require("../config");
let nativeFunMap = new Map();
exports.il2cppApi = {
nativeFunNotExistMap: new Map(),
il2cpp_array_new: function (klass, size) {
let il2cpp_array_new = this.load("il2cpp_array_new", 'pointer', ['pointer', 'uint64']);
return il2cpp_array_new(klass, size);
},
il2cpp_array_get_byte_length: function (array) {
let il2cpp_array_get_byte_length = this.load("il2cpp_array_get_byte_length", 'uint32', ['pointer']);
return il2cpp_array_get_byte_length(array);
},
il2cpp_domain_get: function () {
return this.load("il2cpp_domain_get", 'pointer', []);
},
il2cpp_thread_attach: function (domain) {
return this.load("il2cpp_thread_attach", 'pointer', ['pointer']);
},
il2cpp_string_length: function (Il2cppString) {
let il2cpp_string_length = this.load("il2cpp_string_length", "int", ['pointer']);
return il2cpp_string_length(Il2cppString);
},
il2cpp_string_chars: function (Il2cppString) {
let il2cpp_string_chars = this.load("il2cpp_string_chars", "pointer", ['pointer']);
return il2cpp_string_chars(Il2cppString);
},
il2cpp_string_new: function (str) {
let il2cpp_string_new = this.load("il2cpp_string_new", "pointer", ['pointer']);
return il2cpp_string_new(str);
},
il2cpp_domain_get_assemblies: function (il2Cppdomain, size_t) {
let il2cpp_domain_get_assemblies = this.load("il2cpp_domain_get_assemblies", 'pointer', ['pointer', 'pointer']);
return il2cpp_domain_get_assemblies(il2Cppdomain, size_t);
},
il2cpp_gc_collect_a_little: function () {
let il2cpp_gc_collect_a_little = this.load("il2cpp_gc_collect_a_little" +
"", 'pointer', ['pointer', 'pointer']);
return il2cpp_gc_collect_a_little(il2Cppdomain, size_t);
},
il2cpp_assembly_get_image: function (il2Cppassembly) {
let il2cpp_assembly_get_image = this.load("il2cpp_assembly_get_image", 'pointer', ['pointer']);
try {
return new Il2CppImage_1.Il2CppImage(il2cpp_assembly_get_image(il2Cppassembly));
}
catch (e) {
return new Il2CppImage_1.Il2CppImage(il2Cppassembly.readPointer());
}
},
il2cpp_image_get_class_count: function (image) {
// size_t il2cpp_image_get_class_count(const Il2CppImage * image)
let il2cpp_image_get_class_count = this.load("il2cpp_image_get_class_count", "pointer", ['pointer']);
if (il2cpp_image_get_class_count !== undefined) {
return il2cpp_image_get_class_count(image).toUInt32();
}
else {
return image.getOffsetTypeCount();
}
},
il2cpp_image_get_name: function (Il2CppImage) {
let il2cpp_image_get_name = this.load("il2cpp_image_get_name", "pointer", ['pointer']);
return il2cpp_image_get_name(Il2CppImage);
},
il2cpp_image_get_class: function (il2CppImage, index) {
// // const Il2CppClass* il2cpp_image_get_class(const Il2CppImage * image, size_t index)
let il2cpp_image_get_class = this.load("il2cpp_image_get_class", 'pointer', ['pointer', 'int']);
let il2cppImageGetClass = il2cpp_image_get_class(il2CppImage, index);
return new Il2CppClass_1.Il2CppClass(il2cppImageGetClass);
},
il2cpp_class_get_type: function (il2CppClass) {
let il2cpp_class_get_type = this.load("il2cpp_class_get_type", 'pointer', ["pointer"]);
return new Il2CppType_1.Il2CppType(il2cpp_class_get_type(il2CppClass));
},
il2cpp_class_get_element_class: function (cls) {
let il2cpp_class_get_element_class = this.load("il2cpp_class_get_element_class", 'pointer', ["pointer"]);
return new Il2CppClass_1.Il2CppClass(il2cpp_class_get_element_class(cls));
},
il2cpp_class_get_declaring_type: function (cls) {
let il2cpp_class_get_declaring_type = this.load("il2cpp_class_get_declaring_type", 'pointer', ["pointer"]);
return new Il2CppClass_1.Il2CppClass(il2cpp_class_get_declaring_type(cls));
},
il2cpp_class_from_type: function (Il2CppType) {
let il2cpp_class_from_type = this.load("il2cpp_class_from_type", "pointer", ["pointer"]);
if (Il2CppType === null) {
return null;
}
return new Il2CppClass_1.Il2CppClass(il2cpp_class_from_type(Il2CppType));
},
il2cpp_class_get_image: function (klass) {
let il2cpp_class_get_image = this.load("il2cpp_class_get_image", "pointer", ["pointer"]);
return new Il2CppImage_1.Il2CppImage(il2cpp_class_get_image(klass));
},
il2cpp_class_from_name: function (Il2cppImage, nameSpaze, name) {
let il2cpp_class_from_name = this.load("il2cpp_class_from_name", "pointer", ["pointer", "pointer", "pointer"]);
let nameSpaze_t = Memory.allocUtf8String(nameSpaze);
let name_t = Memory.allocUtf8String(name);
return new Il2CppClass_1.Il2CppClass(il2cpp_class_from_name(Il2cppImage, nameSpaze_t, name_t));
},
il2cpp_class_enum_basetype: function (Il2CppClass) {
let il2cpp_class_enum_basetype = this.load("il2cpp_class_enum_basetype", "pointer", ["pointer"]);
return new Il2CppType_1.Il2CppType(il2cpp_class_enum_basetype(Il2CppClass));
},
il2cpp_class_value_size: function (Il2CppClass, align) {
let il2cpp_class_value_size = this.load("il2cpp_class_value_size", "int32", ["pointer", "pointer"]);
return il2cpp_class_value_size(Il2CppClass);
},
il2cpp_class_get_flags: function (Il2CppClass) {
let il2cpp_class_get_flags = this.load("il2cpp_class_get_flags", "int", ["pointer"]);
return il2cpp_class_get_flags(Il2CppClass);
},
il2cpp_class_is_valuetype: function (Il2CppClass) {
let il2cpp_class_is_valuetype = this.load("il2cpp_class_is_valuetype", "bool", ["pointer"]);
return il2cpp_class_is_valuetype(Il2CppClass);
},
il2cpp_class_is_generic: function (Il2CppClass) {
let il2cpp_class_is_generic = this.load("il2cpp_class_is_generic", "bool", ["pointer"]);
return il2cpp_class_is_generic(Il2CppClass);
},
il2cpp_class_is_enum: function (Il2CppClass) {
let il2cpp_class_is_enum = this.load("il2cpp_class_is_enum", "bool", ["pointer"]);
return il2cpp_class_is_enum(Il2CppClass);
},
il2cpp_class_get_name: function (Il2CppClass) {
let il2cpp_class_get_name = this.load("il2cpp_class_get_name", "pointer", ["pointer"]);
return il2cpp_class_get_name(Il2CppClass);
},
il2cpp_class_get_parent: function (Il2CppClass) {
let il2cpp_class_get_parent = this.load("il2cpp_class_get_parent", "pointer", ["pointer"]);
return il2cpp_class_get_parent(Il2CppClass);
},
il2cpp_class_get_interfaces: function (cls, iter) {
let il2cpp_class_get_interfaces = this.load("il2cpp_class_get_interfaces", 'pointer', ['pointer', 'pointer']);
return new Il2CppClass_1.Il2CppClass(il2cpp_class_get_interfaces(cls, iter));
},
il2cpp_class_get_namespace: function (Il2CppClass) {
let il2cpp_class_get_namespace = this.load("il2cpp_class_get_namespace", 'pointer', ['pointer']);
return il2cpp_class_get_namespace(Il2CppClass);
},
il2cpp_class_num_fields: function (Il2CppClass) {
let il2cpp_class_num_fields = this.load("il2cpp_class_num_fields", 'size_t', ['pointer']);
return il2cpp_class_num_fields(Il2CppClass);
},
il2cpp_class_get_fields: function (Il2CppClass, iter) {
let il2cpp_class_get_fields = this.load("il2cpp_class_get_fields", 'pointer', ['pointer', 'pointer']);
return new Il2CppFieldInfo_1.Il2CppFieldInfo(il2cpp_class_get_fields(Il2CppClass, iter));
},
il2cpp_class_get_properties: function (Il2CppClass, iter) {
let il2cpp_class_get_properties = this.load("il2cpp_class_get_properties", 'pointer', ['pointer', 'pointer']);
return new Il2CppPropertyInfo_1.Il2CppPropertyInfo(il2cpp_class_get_properties(Il2CppClass, iter));
},
il2cpp_class_get_methods: function (Il2CppClass, iter) {
let il2cpp_class_get_methods = this.load("il2cpp_class_get_methods", 'pointer', ['pointer', 'pointer']);
return new MethodInfo_1.MethodInfo(il2cpp_class_get_methods(Il2CppClass, iter));
},
il2cpp_class_get_method_from_name: function (Il2CppClass, name, argsCount) {
let il2cpp_class_get_method_from_name = this.load("il2cpp_class_get_method_from_name", 'pointer', ['pointer', 'pointer', "int"]);
let name_t = Memory.allocUtf8String(name);
return new MethodInfo_1.MethodInfo(il2cpp_class_get_method_from_name(Il2CppClass, name_t, argsCount));
},
il2cpp_type_get_type: function (Il2CppType) {
let il2cpp_type_get_type = this.load("il2cpp_type_get_type", 'int', ['pointer']);
return il2cpp_type_get_type(Il2CppType);
},
/**
* 非必要参数
* @param Il2CppType
* @returns {number|*}
*/
il2cpp_type_is_byref: function (Il2CppType) {
let il2cpp_type_is_byref = this.load("il2cpp_type_is_byref", "bool", ["pointer"]);
// log(" il2cpp_type_is_byref:"+il2cpp_type_is_byref);
if (il2cpp_type_is_byref !== undefined) {
return il2cpp_type_is_byref(Il2CppType);
}
return Il2CppType.add(4).readS8();
},
il2cpp_type_get_attrs: function (Il2cppType) {
let il2cpp_type_get_attrs = this.load("il2cpp_type_get_attrs", "int32", ["pointer"]);
return il2cpp_type_get_attrs(Il2cppType);
},
il2cpp_type_get_object: function (Il2CppType) {
let il2cpp_type_get_object = this.load("il2cpp_type_get_object", 'pointer', ['pointer']);
return il2cpp_type_get_object(Il2CppType);
},
il2cpp_object_get_class: function (il2cppObj) {
let il2cpp_object_get_class = this.load("il2cpp_object_get_class", 'pointer', ['pointer']);
return new Il2CppClass_1.Il2CppClass(il2cpp_object_get_class(il2cppObj));
},
il2cpp_type_get_name: function (Il2CppType) {
let il2cpp_type_get_name = this.load("il2cpp_type_get_name", 'pointer', ['pointer']);
try {
return il2cpp_type_get_name(Il2CppType);
}
catch (e) {
return null;
}
},
il2cpp_field_static_get_value: function (FieldInfo, value) {
let il2cpp_field_static_get_value = this.load("il2cpp_field_static_get_value", 'void', ['pointer', 'pointer']);
return il2cpp_field_static_get_value(FieldInfo, value);
},
il2cpp_field_get_parent: function (FieldInfo) {
let il2cpp_field_get_parent = this.load("il2cpp_field_get_parent", 'pointer', ['pointer']);
return new Il2CppClass_1.Il2CppClass(il2cpp_field_get_parent(FieldInfo));
},
il2cpp_field_get_flags: function (FieldInfo) {
let il2cpp_field_get_flags = this.load("il2cpp_field_get_flags", "int", ['pointer']);
return il2cpp_field_get_flags(FieldInfo);
},
il2cpp_field_get_type: function (FieldInfo) {
let il2cpp_field_get_type = this.load("il2cpp_field_get_type", "pointer", ['pointer']);
return new Il2CppType_1.Il2CppType(il2cpp_field_get_type(FieldInfo));
},
il2cpp_field_get_name: function (FieldInfo) {
let il2cpp_field_get_name = this.load("il2cpp_field_get_name", "pointer", ['pointer']);
return il2cpp_field_get_name(FieldInfo);
},
il2cpp_field_get_offset: function (FieldInfo) {
let il2cpp_field_get_offset = this.load("il2cpp_field_get_offset", "size_t", ['pointer']);
return il2cpp_field_get_offset(FieldInfo);
},
il2cpp_property_get_get_method: function (PropertyInfo) {
let il2cpp_property_get_get_method = this.load("il2cpp_property_get_get_method", "pointer", ['pointer']);
return new MethodInfo_1.MethodInfo(il2cpp_property_get_get_method(PropertyInfo));
},
il2cpp_property_get_set_method: function (PropertyInfo) {
let il2cpp_property_get_set_method = this.load("il2cpp_property_get_set_method", "pointer", ['pointer']);
return new MethodInfo_1.MethodInfo(il2cpp_property_get_set_method(PropertyInfo));
},
il2cpp_property_get_name: function (PropertyInfo) {
let il2cpp_property_get_name = this.load("il2cpp_property_get_name", "pointer", ['pointer']);
return il2cpp_property_get_name(PropertyInfo);
},
il2cpp_method_get_flags: function (method, iflags) {
let il2cpp_method_get_flags_api = this.load("il2cpp_method_get_flags", "uint32", ['pointer', 'uint32']);
return il2cpp_method_get_flags_api(method, iflags);
},
il2cpp_method_get_name: function (method) {
let il2cpp_method_get_name = this.load("il2cpp_method_get_name", "pointer", ['pointer']);
return il2cpp_method_get_name(method);
},
il2cpp_method_get_class: function (method) {
let il2cpp_method_get_class = this.load("il2cpp_method_get_class", "pointer", ['pointer']);
return il2cpp_method_get_class(method);
},
il2cpp_method_get_pointer: function (method) {
//版本兼容有问题
let il2cpp_method_get_pointer = this.load("il2cpp_method_get_pointer", "pointer", ['pointer']);
if (il2cpp_method_get_pointer !== undefined) {
return il2cpp_method_get_pointer(method);
}
return method.readPointer();
},
il2cpp_method_get_param_count: function (method) {
let il2cpp_method_get_param_count = this.load("il2cpp_method_get_param_count", "uint32", ['pointer']);
return il2cpp_method_get_param_count(method);
},
il2cpp_method_get_return_type: function (method) {
let il2cpp_method_get_return_type = this.load("il2cpp_method_get_return_type", "pointer", ['pointer']);
return new Il2CppType_1.Il2CppType(il2cpp_method_get_return_type(method));
},
il2cpp_method_get_param: function (method, index) {
let il2cpp_method_get_param = this.load("il2cpp_method_get_param", "pointer", ['pointer', 'uint32']);
return new Il2CppType_1.Il2CppType(il2cpp_method_get_param(method, index));
},
il2cpp_method_is_generic: function (method) {
let il2cpp_method_is_generic = this.load("il2cpp_method_is_generic", "bool", ['pointer']);
return il2cpp_method_is_generic(method);
},
il2cpp_array_length(arg) {
let il2cpp_array_length = this.load("il2cpp_array_length", "uint32", ['pointer']);
return il2cpp_array_length(arg);
},
il2cpp_method_is_inflated: function (method) {
let il2cpp_method_is_inflated = this.load("il2cpp_method_is_inflated", "bool", ['pointer']);
return il2cpp_method_is_inflated(method);
},
il2cpp_method_get_param_name: function (method, index) {
let il2cpp_method_get_param_name = this.load("il2cpp_method_get_param_name", "pointer", ['pointer', 'uint32']);
return il2cpp_method_get_param_name(method, index);
},
/**
* 使用内存缓存加快dump速度
* @param exportName
* @param reType
* @param argTypes
* @returns {any}
*/
load: function (exportName, reType, argTypes) {
// new NativeFunction(Module.findExportByName(soName, "il2cpp_domain_get"), 'pointer', []);
let cacheFun = nativeFunMap.get(exportName);
if (cacheFun == null) {
let isExist = this.nativeFunNotExistMap.get(exportName);
if (isExist === -1) {
return undefined;
}
let nativePointer = Module.findExportByName(config_1.Il2cppSoName, exportName);
if (nativePointer == null) {
this.nativeFunNotExistMap.set(exportName, -1);
return undefined;
}
else {
cacheFun = new NativeFunction(nativePointer, reType, argTypes);
nativeFunMap.set(exportName, cacheFun);
}
}
return nativeFunMap.get(exportName);
},
};
},{"../config":3,"./struct/Il2CppClass":8,"./struct/Il2CppFieldInfo":9,"./struct/Il2CppImage":13,"./struct/Il2CppPropertyInfo":14,"./struct/Il2CppType":15,"./struct/MethodInfo":16}],8:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppClass = void 0;
const NativeStruct_1 = require("./NativeStruct");
const il2cppApi_1 = require("../il2cppApi");
class Il2CppClass extends NativeStruct_1.NativeStruct {
name() {
return il2cppApi_1.il2cppApi.il2cpp_class_get_name(this).readCString();
}
namespaze() {
return il2cppApi_1.il2cppApi.il2cpp_class_get_namespace(this).readCString();
}
flags() {
return il2cppApi_1.il2cppApi.il2cpp_class_get_flags(this);
}
getFullName() {
let name1 = this.name();
if (name1.indexOf("`") !== -1) {
let split = name1.split("`");
name1 = split[0];
name1 = name1 + this.getGenericName();
}
return name1;
}
valueType() {
return il2cppApi_1.il2cppApi.il2cpp_class_is_valuetype(this);
}
enumType() {
return il2cppApi_1.il2cppApi.il2cpp_class_is_enum(this);
}
isGeneric() {
return il2cppApi_1.il2cppApi.il2cpp_class_is_generic(this);
}
/**
* class_type
*/
getType() {
return il2cppApi_1.il2cppApi.il2cpp_class_get_type(this);
}
getElementClass() {
return il2cppApi_1.il2cppApi.il2cpp_class_get_element_class(this);
}
getDeclaringType() {
return il2cppApi_1.il2cppApi.il2cpp_class_get_declaring_type(this);
}
filedCount() {
return il2cppApi_1.il2cppApi.il2cpp_class_num_fields(this);
}
/**
*
* @returns {Il2CppType}
*/
getEnumBaseType() {
return il2cppApi_1.il2cppApi.il2cpp_class_enum_basetype(this);
}
getFieldsInfo(iter) {
return il2cppApi_1.il2cppApi.il2cpp_class_get_fields(this, iter);
}
getProperties(iter) {
return il2cppApi_1.il2cppApi.il2cpp_class_get_properties(this, iter);
}
getMethods(iter) {
return il2cppApi_1.il2cppApi.il2cpp_class_get_methods(this, iter);
}
/**
* 获取泛型参数名
* @returns {string}
*/
getGenericName() {
let type = this.getType();
let name = this.name();
if (name.indexOf("`") !== -1) {
// log("获取Type:Il2cpp:"+this.name() +" nameSpaze:"+this.namespaze());
let il2cppTypeGetName = type.getName();
if (il2cppTypeGetName == null) {
return name;
}
let split = name.split("`");
name = split[0];
let indexOf = il2cppTypeGetName.indexOf(name);
let s = il2cppTypeGetName.substr(indexOf + name.length, il2cppTypeGetName.length - name.length);
let genericT = "\<System.Object\>";
// log(" genericT:"+genericT);
if (s === genericT) {
return "\<T\>";
}
return s;
}
return name;
}
parent() {
return new Il2CppClass(il2cppApi_1.il2cppApi.il2cpp_class_get_parent(this));
}
getInterfaces(iter) {
return il2cppApi_1.il2cppApi.il2cpp_class_get_interfaces(this, iter);
}
}
exports.Il2CppClass = Il2CppClass;
},{"../il2cppApi":7,"./NativeStruct":17}],9:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppFieldInfo = void 0;
const NativeStruct_1 = require("./NativeStruct");
const il2cppApi_1 = require("../il2cppApi");
const utils_1 = require("./utils");
const Il2CppClass_1 = require("./Il2CppClass");
class Il2CppFieldInfo extends NativeStruct_1.NativeStruct {
getFlags() {
return il2cppApi_1.il2cppApi.il2cpp_field_get_flags(this);
}
/**
* 获取变量参数类型
* @returns {Il2CppType}
*/
getType() {
return il2cppApi_1.il2cppApi.il2cpp_field_get_type(this);
}
/**
* 获取 静态常量
* @param value
*/
getStaticValue() {
let value = Memory.alloc(Process.pointerSize);
il2cppApi_1.il2cppApi.il2cpp_field_static_get_value(this, value);
return utils_1.utils.readTypeEnumValue(value, this.getType().getTypeEnum(), this.getFiledClass());
}
/**
* 获取变量class
* @returns {Il2CppClass}
*/
getFiledClass() {
let type = this.getType();
return il2cppApi_1.il2cppApi.il2cpp_class_from_type(type);
}
getParent() {
let il2CppClass = il2cppApi_1.il2cppApi.il2cpp_field_get_parent(this);
return new Il2CppClass_1.Il2CppClass(il2CppClass);
}
/**
* 获取变量参数的命名
* @returns {string}
*/
getFiledName() {
return il2cppApi_1.il2cppApi.il2cpp_field_get_name(this).readCString();
}
/**
* 获取偏移
* @returns {*}
*/
getOffset() {
return il2cppApi_1.il2cppApi.il2cpp_field_get_offset(this);
}
}
exports.Il2CppFieldInfo = Il2CppFieldInfo;
},{"../il2cppApi":7,"./Il2CppClass":8,"./NativeStruct":17,"./utils":19}],10:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppGenericContext = void 0;
const NativeStruct_1 = require("./NativeStruct");
const Il2CppGenericInst_1 = require("./Il2CppGenericInst");
class Il2CppGenericContext extends NativeStruct_1.NativeStruct {
method_inst() {
return new Il2CppGenericInst_1.Il2CppGenericInst(this.add(0x8));
}
}
exports.Il2CppGenericContext = Il2CppGenericContext;
},{"./Il2CppGenericInst":11,"./NativeStruct":17}],11:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppGenericInst = void 0;
const NativeStruct_1 = require("./NativeStruct");
class Il2CppGenericInst extends NativeStruct_1.NativeStruct {
type_argc() {
return this.readU32();
}
}
exports.Il2CppGenericInst = Il2CppGenericInst;
},{"./NativeStruct":17}],12:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppGenericMethod = void 0;
const NativeStruct_1 = require("./NativeStruct");
const Il2CppGenericContext_1 = require("./Il2CppGenericContext");
class Il2CppGenericMethod extends NativeStruct_1.NativeStruct {
context() {
return new Il2CppGenericContext_1.Il2CppGenericContext(this.add(0x8));
}
}
exports.Il2CppGenericMethod = Il2CppGenericMethod;
},{"./Il2CppGenericContext":10,"./NativeStruct":17}],13:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppImage = void 0;
const NativeStruct_1 = require("./NativeStruct");
const il2cppApi_1 = require("../il2cppApi");
const structItem_1 = require("./structItem");
const config_1 = require("../../config");
let il2CppImage_struct = new Array();
il2CppImage_struct.push(new structItem_1.StructItem("name", Process.pointerSize));
il2CppImage_struct.push(new structItem_1.StructItem("nameNoExt", Process.pointerSize));
il2CppImage_struct.push(new structItem_1.StructItem("assemblyIndex", Process.pointerSize));
il2CppImage_struct.push(new structItem_1.StructItem("typeStart", 4));
il2CppImage_struct.push(new structItem_1.StructItem("typeCount", 4));
il2CppImage_struct.push(new structItem_1.StructItem("exportedTypeStart", 4));
let kMetadataIndexBits = 22;
let kMetadataImageIndexExtraShiftBitsA = 6;
let kMetadataImageIndexExtraShiftBitsB = 4;
let kMetadataImageIndexExtraShiftBitsC = 2;
let kMetadataImageIndexExtraShiftBitsD = 0;
let kInvalidIndex = -1;
let kMetadataIndexMaskA = (1 << (kMetadataIndexBits + kMetadataImageIndexExtraShiftBitsA)) - 1;
class Il2CppImage extends NativeStruct_1.NativeStruct {
name() {
return il2cppApi_1.il2cppApi.il2cpp_image_get_name(this).readCString();
}
token() {
return this.add(0x40).readU32();
}
IsInterpreterImage() {
let index = this.token();
// log("got token "+index);
return index !== kInvalidIndex && (index & ~kMetadataIndexMaskA) !== 0;
}
nameNoExt() {
let name1 = this.name();
return name1.replace(".dll", "");
}
typeStart() {
return this.get("typeStart").readPointer().toInt32();
}
typeCount() {
return il2cppApi_1.il2cppApi.il2cpp_image_get_class_count(this);
// return this.getOffsetTypeCount();
}
getOffsetTypeCount() {
if (config_1.UNITY_VER === config_1.UnityVer.V_2020) {
return this.add(24).readPointer().toInt32();
}
else {
return this.get("typeCount").readPointer().toInt32();
}
}
getClass(index) {
let soAddr = Module.findBaseAddress(config_1.soName);
return il2cppApi_1.il2cppApi.il2cpp_image_get_class(this, index);
}
get(params) {
return this.add((0, structItem_1.getStructOffset)(il2CppImage_struct, params));
}
}
exports.Il2CppImage = Il2CppImage;
},{"../../config":3,"../il2cppApi":7,"./NativeStruct":17,"./structItem":18}],14:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppPropertyInfo = void 0;
const NativeStruct_1 = require("./NativeStruct");
const il2cppApi_1 = require("../il2cppApi");
class Il2CppPropertyInfo extends NativeStruct_1.NativeStruct {
/**
* 获取方法信息
* @returns {MethodInfo}
*/
getMethod() {
return il2cppApi_1.il2cppApi.il2cpp_property_get_get_method(this);
}
setMethod() {
return il2cppApi_1.il2cppApi.il2cpp_property_get_set_method(this);
}
getName() {
return il2cppApi_1.il2cppApi.il2cpp_property_get_name(this).readCString();
}
}
exports.Il2CppPropertyInfo = Il2CppPropertyInfo;
},{"../il2cppApi":7,"./NativeStruct":17}],15:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Il2CppType = void 0;
const NativeStruct_1 = require("./NativeStruct");
const il2cppApi_1 = require("../il2cppApi");
class Il2CppType extends NativeStruct_1.NativeStruct {
getName() {
let il2cppTypeGetName = il2cppApi_1.il2cppApi.il2cpp_type_get_name(this);
if (il2cppTypeGetName == null) {
return null;
}
else {
return il2cppTypeGetName.readCString();
}
}
getTypeEnum() {
return il2cppApi_1.il2cppApi.il2cpp_type_get_type(this);
}
byref() {
return il2cppApi_1.il2cppApi.il2cpp_type_is_byref(this);
}
}
exports.Il2CppType = Il2CppType;
},{"../il2cppApi":7,"./NativeStruct":17}],16:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MethodInfo = void 0;
const NativeStruct_1 = require("./NativeStruct");
const il2cppApi_1 = require("../il2cppApi");
const Il2CppClass_1 = require("./Il2CppClass");
const Il2CppGenericMethod_1 = require("./Il2CppGenericMethod");
const METHOD_INFO_OFFSET_SLOT = 72;
class MethodInfo extends NativeStruct_1.NativeStruct {
getGenericMethod() {
return new Il2CppGenericMethod_1.Il2CppGenericMethod(this.add(0x38));
}
getFlags() {
return il2cppApi_1.il2cppApi.il2cpp_method_get_flags(this, 0);
}
isHybridCLR() {
let class1 = this.getClass();
let il2CppImage = il2cppApi_1.il2cppApi.il2cpp_class_get_image(class1);
return il2CppImage.IsInterpreterImage();
}
getSlot() {
return this.add(METHOD_INFO_OFFSET_SLOT).readU16();
}
getMethodPointer() {
return il2cppApi_1.il2cppApi.il2cpp_method_get_pointer(this);
}
getInvokePointer() {
return this.add(0x8).readPointer();
}
getSlot() {
return this.add(METHOD_INFO_OFFSET_SLOT).readU16();
}
name() {
return il2cppApi_1.il2cppApi.il2cpp_method_get_name(this).readCString();
}
getParamCount() {
return il2cppApi_1.il2cppApi.il2cpp_method_get_param_count(this);
}
getParam(index) {
return il2cppApi_1.il2cppApi.il2cpp_method_get_param(this, index);
}
getParamName(index) {
return il2cppApi_1.il2cppApi.il2cpp_method_get_param_name(this, index).readCString();
}
/**
* 获取返回类型
* @returns {Il2CppType}
*/
getReturnType() {
return il2cppApi_1.il2cppApi.il2cpp_method_get_return_type(this);
}
is_generic() {
return il2cppApi_1.il2cppApi.il2cpp_method_is_generic(this);
}
is_inflated() {
return il2cppApi_1.il2cppApi.il2cpp_method_is_inflated(this);
}
getClass() {
return new Il2CppClass_1.Il2CppClass(il2cppApi_1.il2cppApi.il2cpp_method_get_class(this));
}
invoker_method() {
return this.add(0x8).readPointer();
}
}
exports.MethodInfo = MethodInfo;
},{"../il2cppApi":7,"./Il2CppClass":8,"./Il2CppGenericMethod":12,"./NativeStruct":17}],17:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NativeStruct = void 0;
class NativeStruct extends NativePointer {
constructor(pointer) {
super(pointer);
}
}
exports.NativeStruct = NativeStruct;
},{}],18:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStructOffset = exports.StructItem = void 0;
function StructItem(param, size) {
this.param = param;
this.size = size;
}
exports.StructItem = StructItem;
function getStructOffset(struct, name) {
let all = 0;
for (let i = 0; i < struct.length; i++) {
let item = struct[i];
let param = item.param;
let size = item.size;
if (param === name) {
if (i === 0) {
return 0;
}
else {
return all;
}
}
else {
all = all + size;
}
}
}
exports.getStructOffset = getStructOffset;
},{}],19:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.utils = void 0;
const Il2CppTypeEnum_1 = require("../Il2CppTypeEnum");
const tabledefs_1 = require("../tabledefs");
exports.utils = {
readTypeEnumValue: function (pointer, typeEnum, fieldClass) {
switch (typeEnum) {
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_BOOLEAN:
return !!pointer.readS8();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_I1:
return pointer.readS8();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_I2:
return pointer.readS16();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_U2:
return pointer.readU16();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_I4:
return pointer.readS32();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_U4:
return pointer.readU32();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_CHAR:
return pointer.readU16();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_I8:
return pointer.readS64();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_U8:
return pointer.readU64();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_R4:
return pointer.readFloat();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_R8:
return pointer.readDouble();
case Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_VALUETYPE:
let enumBaseType = fieldClass.getEnumBaseType();
// log("baseType:"+enumBaseType.getTypeEnum()+"pointer:"+pointer.readS32());
if (enumBaseType.getTypeEnum() === Il2CppTypeEnum_1.Il2CppTypeEnum.IL2CPP_TYPE_I4) {
return pointer.readS32();
}
return null;
default:
return null;
}
},
get_method_static: function (flags) {
if (flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_STATIC) {
return true;
}
else {
return false;
}
},
get_method_modifier: function (flags) {
let content;
let access = flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK;
switch (access) {
case tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_PRIVATE:
content = "private ";
break;
case tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_PUBLIC:
content = "public ";
break;
case tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_FAMILY:
content = "protected ";
break;
case tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_ASSEM:
case tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_FAM_AND_ASSEM:
content = "internal ";
break;
case tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_FAM_OR_ASSEM:
content = "protected internal ";
break;
}
if (flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_STATIC) {
content = content + "static ";
}
if (flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_ABSTRACT) {
content = content + "abstract ";
if ((flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_VTABLE_LAYOUT_MASK) === tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_REUSE_SLOT) {
content = content + "override ";
}
}
else if (flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_FINAL) {
if ((flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_VTABLE_LAYOUT_MASK) === tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_REUSE_SLOT) {
content = content + "sealed override ";
}
}
else if (flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_VIRTUAL) {
if ((flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_VTABLE_LAYOUT_MASK) === tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_NEW_SLOT) {
content = content + "virtual ";
}
else {
content = content + "override ";
}
}
if (flags & tabledefs_1.Tabledefs.METHOD_ATTRIBUTE_PINVOKE_IMPL) {
content = content + "extern ";
}
return content;
}
};
},{"../Il2CppTypeEnum":5,"../tabledefs":20}],20:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Tabledefs = void 0;
//---tabledefs
exports.Tabledefs = {
TYPE_ATTRIBUTE_SERIALIZABLE: 0x00002000,
TYPE_ATTRIBUTE_VISIBILITY_MASK: 0x00000007,
TYPE_ATTRIBUTE_NOT_PUBLIC: 0x00000000,
TYPE_ATTRIBUTE_PUBLIC: 0x00000001,
TYPE_ATTRIBUTE_NESTED_PUBLIC: 0x00000002,
TYPE_ATTRIBUTE_NESTED_PRIVATE: 0x00000003,
TYPE_ATTRIBUTE_NESTED_FAMILY: 0x00000004,
TYPE_ATTRIBUTE_NESTED_ASSEMBLY: 0x00000005,
TYPE_ATTRIBUTE_NESTED_FAM_AND_ASSEM: 0x00000006,
TYPE_ATTRIBUTE_NESTED_FAM_OR_ASSEM: 0x00000007,
TYPE_ATTRIBUTE_ABSTRACT: 0x00000080,
TYPE_ATTRIBUTE_SEALED: 0x00000100,
TYPE_ATTRIBUTE_SPECIAL_NAME: 0x00000400,
TYPE_ATTRIBUTE_CLASS_SEMANTIC_MASK: 0x00000020,
TYPE_ATTRIBUTE_CLASS: 0x00000000,
TYPE_ATTRIBUTE_INTERFACE: 0x00000020,
FIELD_ATTRIBUTE_FIELD_ACCESS_MASK: 0x0007,
FIELD_ATTRIBUTE_COMPILER_CONTROLLED: 0x0000,