-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMacGryver.j
1729 lines (1724 loc) · 24.3 KB
/
MacGryver.j
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
.class public class0
.super javacard/framework/Applet
.field static public static_field0 [B
.field public field0 [B
.field public field1 [B
.field public field2 [B
.field public field3 [B
.field public field4 S
.field public field5 S
.field public field6 B
.field public field7 S
.field public field8 B
.method Method0()V
LMethod00:
aload_0
LMethod01:
invokespecial javacard/framework/Applet/<init>()V
LMethod04:
aload_0
LMethod05:
sipush 256
LMethod08:
newarray byte
LMethod010:
putfield class0/field0 [B
LMethod012:
aload_0
LMethod013:
sipush 6000
LMethod016:
newarray byte
LMethod018:
putfield class0/field1 [B
LMethod020:
aload_0
LMethod021:
bipush 20
LMethod023:
newarray byte
LMethod025:
putfield class0/field2 [B
LMethod027:
aload_0
LMethod028:
sipush 6000
LMethod031:
newarray byte
LMethod033:
putfield class0/field3 [B
LMethod035:
aload_0
LMethod036:
invokevirtual javacard/framework/Applet/register()V
LMethod039:
aload_0
LMethod040:
iconst_0
LMethod041:
putfield class0/field4 [B
LMethod043:
aload_0
LMethod044:
iconst_0
LMethod045:
putfield class0/field5 [B
LMethod047:
aload_0
LMethod048:
iconst_0
LMethod049:
putfield class0/field6 [B
LMethod051:
return
.end method
.method Method1([B)V
LMethod10:
return
.end method
.method Method2([BSB)V
LMethod20:
new class0
LMethod23:
dup
LMethod24:
invokespecial class0/Method0()V
LMethod27:
pop
LMethod28:
return
.end method
.method Method3(Ljavacard/framework/ISO7816)V
LMethod30:
aload_1
LMethod31:
invokevirtual javacard/framework/APDU/getBuffer()[B
LMethod34:
astore_2
LMethod35:
aload_1
LMethod36:
invokevirtual javacard/framework/APDU/setIncomingAndReceive()S
LMethod39:
istore 4
LMethod311:
iconst_0
LMethod312:
istore 5
LMethod314:
iconst_0
LMethod315:
istore 6
LMethod317:
getfield class0/field0 [B
LMethod320:
iconst_0
LMethod320:
iconst_0
LMethod321:
bastore
LMethod322:
getfield class0/field0 [B
LMethod325:
iconst_1
LMethod325:
iconst_0
LMethod326:
bastore
LMethod327:
getfield class0/field0 [B
LMethod330:
iconst_2
LMethod330:
iconst_0
LMethod331:
bastore
LMethod332:
getfield class0/field0 [B
LMethod335:
iconst_3
LMethod335:
iconst_0
LMethod336:
bastore
LMethod337:
getfield class0/field0 [B
LMethod340:
iconst_4
LMethod340:
iconst_0
LMethod341:
bastore
LMethod342:
getfield class0/field0 [B
LMethod345:
iconst_5
LMethod345:
iconst_0
LMethod346:
bastore
LMethod347:
getfield class0/field0 [B
LMethod350:
bipush 6
LMethod351:
iconst_0
LMethod352:
bastore
LMethod353:
getfield class0/field0 [B
LMethod356:
bipush 7
LMethod357:
iconst_0
LMethod358:
bastore
LMethod359:
aload_2
LMethod360:
iconst_0
LMethod361:
baload
LMethod362:
istore 7
LMethod364:
aload_2
LMethod365:
iconst_1
LMethod366:
baload
LMethod367:
istore 8
LMethod369:
aload_2
LMethod370:
iconst_2
LMethod371:
baload
LMethod372:
istore 9
LMethod374:
aload_2
LMethod375:
iconst_3
LMethod376:
baload
LMethod377:
istore 10
LMethod379:
iconst_2
LMethod380:
newarray byte
LMethod382:
astore_3
LMethod383:
iconst_0
LMethod384:
istore 6
LMethod386:
aload_0
LMethod387:
dup
LMethod388:
getfield class0/field6 S
LMethod390:
iconst_1
LMethod391:
iadd
LMethod392:
i2b
LMethod393:
putfield class0/field6 [B
LMethod395:
iconst_0
LMethod396:
istore 16
LMethod398:
goto LMethod3126
LMethod3100:
aload_2
LMethod3101:
iconst_5
LMethod3102:
getfield class0/field0 [B
LMethod3105:
iload 5
LMethod3106:
iload 4
LMethod3108:
invokestatic javacard/framework/Util/arrayCopyNonAtomic([BS[BSS)S
LMethod3111:
pop
LMethod3112:
iload 5
LMethod3114:
iload 4
LMethod3116:
iadd
LMethod3117:
istore 5
LMethod3119:
aload_1
LMethod3120:
iconst_5
LMethod3121:
invokevirtual javacard/framework/APDU/receiveBytes(S)S
LMethod3124:
istore 4
LMethod3126:
iload 4
LMethod3128:
ifgt LMethod3100
LMethod3130:
iload 7
LMethod3132:
ifne LMethod3202
LMethod3134:
iload 8
LMethod3136:
sipush 164
LMethod3138:
if_icmpne LMethod3202
LMethod3140:
iload 9
LMethod3142:
iconst_4
LMethod3143:
if_icmpne LMethod3202
LMethod3145:
iload 10
LMethod3147:
ifne LMethod3202
LMethod3149:
getfield class0/field0 [B
LMethod3152:
iconst_0
LMethod3152:
baload
LMethod3153:
bipush 49
LMethod3155:
if_icmpne LMethod3185
LMethod3157:
getfield class0/field0 [B
LMethod3160:
iconst_1
LMethod3160:
baload
LMethod3161:
bipush 80
LMethod3163:
if_icmpne LMethod3185
LMethod3165:
getfield class0/field0 [B
LMethod3168:
iconst_2
LMethod3168:
baload
LMethod3169:
bipush 65
LMethod3171:
if_icmpne LMethod3185
LMethod3173:
getfield class0/field0 [B
LMethod3176:
iconst_3
LMethod3176:
baload
LMethod3177:
bipush 89
LMethod3179:
if_icmpne LMethod3185
LMethod3181:
aload_0
LMethod3182:
iconst_0
LMethod3183:
putfield class0/field6 [B
LMethod3185:
getfield class0/field0 [B
LMethod3188:
iconst_0
LMethod3188:
getfield class0/field2 [B
LMethod3191:
iconst_0
LMethod3191:
iload 5
LMethod3193:
invokestatic javacard/framework/Util/arrayCopyNonAtomic([BS[BSS)S
LMethod3196:
pop
LMethod3197:
aload_0
LMethod3198:
iload 5
LMethod3200:
putfield class0/field7 [B
LMethod3202:
iload 7
LMethod3204:
ifne LMethod3232
LMethod3206:
iload 8
LMethod3208:
sipush 164
LMethod3210:
if_icmpne LMethod3232
LMethod3212:
iload 9
LMethod3214:
iconst_1
LMethod3215:
if_icmpne LMethod3232
LMethod3217:
iload 10
LMethod3219:
iconst_1
LMethod3220:
if_icmpne LMethod3232
LMethod3222:
aload_0
LMethod3223:
iconst_0
LMethod3224:
putfield class0/field8 [B
LMethod3226:
iconst_1
LMethod3227:
istore 16
LMethod3229:
goto_w LMethod31076
LMethod3232:
iload 7
LMethod3234:
ifne LMethod3386
LMethod3237:
iload 8
LMethod3239:
sipush 164
LMethod3241:
if_icmpne LMethod3386
LMethod3244:
iload 9
LMethod3246:
iconst_1
LMethod3247:
if_icmpne LMethod3386
LMethod3250:
iload 10
LMethod3252:
iconst_2
LMethod3253:
if_icmpne LMethod3386
LMethod3256:
getfield class0/field0 [B
LMethod3259:
iconst_1
LMethod3259:
baload
LMethod3260:
ifne LMethod3318
LMethod3262:
getfield class0/field0 [B
LMethod3265:
iconst_2
LMethod3265:
baload
LMethod3266:
sipush 164
LMethod3268:
if_icmpne LMethod3318
LMethod3270:
getfield class0/field0 [B
LMethod3273:
iconst_3
LMethod3273:
baload
LMethod3274:
iconst_4
LMethod3275:
if_icmpne LMethod3318
LMethod3277:
getfield class0/field0 [B
LMethod3280:
iconst_4
LMethod3280:
baload
LMethod3281:
ifne LMethod3318
LMethod3283:
aload_0
LMethod3284:
getfield class0/field0 [B
LMethod3287:
iconst_5
LMethod3287:
baload
LMethod3288:
putfield class0/field7 [B
LMethod3290:
getfield class0/field0 [B
LMethod3293:
bipush 6
LMethod3294:
getfield class0/field2 [B
LMethod3297:
iconst_0
LMethod3297:
getfield class0/field5 S
LMethod3300:
invokestatic javacard/framework/Util/arrayCopyNonAtomic([BS[BSS)S
LMethod3302:
pop
LMethod3303:
getfield class0/field0 [B
LMethod3306:
iconst_0
LMethod3306:
getfield class0/field1 [B
LMethod3309:
getfield class0/field4 [B
LMethod3311:
iload 5
LMethod3312:
invokestatic javacard/framework/Util/arrayCopyNonAtomic([BS[BSS)S
LMethod3315:
pop
LMethod3316:
goto LMethod3371
LMethod3318:
getfield class0/field1 [B
LMethod3321:
getfield class0/field4 [B
LMethod3323:
getfield class0/field5 S
LMethod3325:
iconst_1
LMethod3325:
iadd
LMethod3326:
i2b
LMethod3327:
bastore
LMethod3328:
aload_0
LMethod3329:
dup
LMethod3330:
getfield class0/field4 [B
LMethod3332:
iconst_1
LMethod3333:
iadd
LMethod3334:
putfield class0/field8 [B
LMethod3336:
getfield class0/field2 [B
LMethod3339:
iconst_0
LMethod3339:
getfield class0/field1 [B
LMethod3342:
getfield class0/field4 [B
LMethod3344:
getfield class0/field5 S
LMethod3346:
invokestatic javacard/framework/Util/arrayCopyNonAtomic([BS[BSS)S
LMethod3348:
pop
LMethod3349:
aload_0
LMethod3350:
dup
LMethod3351:
getfield class0/field4 [B
LMethod3353:
getfield class0/field5 S
LMethod3356:
iadd
LMethod3356:
putfield class0/field8 [B
LMethod3358:
getfield class0/field0 [B
LMethod3361:
iconst_0
LMethod3361:
getfield class0/field1 [B
LMethod3364:
getfield class0/field4 [B
LMethod3366:
iload 5
LMethod3367:
invokestatic javacard/framework/Util/arrayCopyNonAtomic([BS[BSS)S
LMethod3370:
pop
LMethod3371:
aload_0
LMethod3372:
dup
LMethod3373:
getfield class0/field4 [B
LMethod3375:
iload 5
LMethod3377:
iadd
LMethod3378:
putfield class0/field8 [B
LMethod3380:
iconst_1
LMethod3381:
istore 16
LMethod3383:
goto_w LMethod31076
LMethod3386:
iload 7
LMethod3388:
ifne LMethod3429
LMethod3390:
iload 8
LMethod3392:
sipush 164
LMethod3394:
if_icmpne LMethod3429
LMethod3396:
iload 9
LMethod3398:
iconst_1
LMethod3399:
if_icmpne LMethod3429
LMethod3401:
iload 10
LMethod3403:
iconst_3
LMethod3404:
if_icmpne LMethod3429
LMethod3406:
getfield class0/field4 [B
LMethod3409:
newarray byte
LMethod3410:
astore_3
LMethod3411:
getfield class0/field1 [B
LMethod3414:
iconst_0
LMethod3414:
aload_3
LMethod3415:
iconst_0
LMethod3416:
getfield class0/field4 [B
LMethod3419:
invokestatic javacard/framework/Util/arrayCopyNonAtomic([BS[BSS)S
LMethod3421:
pop
LMethod3422:
getfield class0/field4 [B
LMethod3425:
istore 6
LMethod3426:
goto_w LMethod31076
LMethod3429:
iload 7
LMethod3431:
ifne LMethod3527
LMethod3433:
iload 8
LMethod3435:
sipush 164
LMethod3437:
if_icmpne LMethod3527
LMethod3439:
iload 9
LMethod3441:
iconst_1
LMethod3442:
if_icmpne LMethod3527
LMethod3444:
iload 10
LMethod3446:
iconst_4
LMethod3447:
if_icmpne LMethod3527
LMethod3449:
getfield class0/field0 [B
LMethod3452:
iconst_0
LMethod3452:
baload
LMethod3453:
istore 12
LMethod3455:
iload 12
LMethod3457:
sipush 255
LMethod3460:
imul
LMethod3461:
istore 11
LMethod3463:
getfield class0/field7 B
LMethod3466:
iload 11
LMethod3467:
if_icmple LMethod3521
LMethod3469:
getfield class0/field7 B
LMethod3472:
iload 11
LMethod3473:
sipush 255
LMethod3476:
iadd
LMethod3477:
if_icmple LMethod3486
LMethod3479:
sipush 255
LMethod3482:
istore 6
LMethod3484:
goto LMethod3497
LMethod3486:
getfield class0/field7 B
LMethod3489:
iload 12
LMethod3490:
sipush 255
LMethod3493:
imul
LMethod3494:
isub
LMethod3495:
istore 6
LMethod3497:
iload 6
LMethod3499:
newarray byte
LMethod3501:
astore_3
LMethod3502:
getfield class0/field3 [B
LMethod3505:
iload 12
LMethod3506:
sipush 255
LMethod3509:
imul
LMethod3510:
aload_3
LMethod3511:
iconst_0
LMethod3512:
iload 6
LMethod3514:
invokestatic javacard/framework/Util/arrayCopyNonAtomic([BS[BSS)S
LMethod3517:
pop
LMethod3518:
goto_w LMethod31076
LMethod3521:
iconst_1
LMethod3522:
istore 16
LMethod3524:
goto_w LMethod31076
LMethod3527:
iload 7
LMethod3529:
ifne LMethod3561
LMethod3531:
iload 8
LMethod3533:
sipush 164
LMethod3535:
if_icmpne LMethod3561
LMethod3537:
iload 9
LMethod3539:
iconst_1
LMethod3540:
if_icmpne LMethod3561
LMethod3542:
iload 10
LMethod3544:
iconst_5
LMethod3545:
if_icmpne LMethod3561
LMethod3547:
iconst_1
LMethod3548:
istore 16
LMethod3550:
aload_0
LMethod3551:
iconst_0
LMethod3552:
putfield class0/field4 [B
LMethod3554:
aload_0
LMethod3555:
iconst_0
LMethod3556:
putfield class0/field6 [B
LMethod3558:
goto_w LMethod31076
LMethod3561:
iload 7
LMethod3563:
ifne LMethod3595
LMethod3565:
iload 8
LMethod3567:
sipush 164
LMethod3569:
if_icmpne LMethod3595
LMethod3571:
iload 9
LMethod3573:
iconst_1
LMethod3574:
if_icmpne LMethod3595
LMethod3576:
iload 10
LMethod3578:
bipush 6
LMethod3580:
if_icmpne LMethod3595
LMethod3582:
iconst_1
LMethod3583:
istore 16
LMethod3585:
aload_0
LMethod3586:
getfield class0/field0 [B
LMethod3589:
iconst_0
LMethod3589:
baload
LMethod3590:
putfield class0/field5 [B
LMethod3592:
goto_w LMethod31076
LMethod3595:
iload 7
LMethod3597:
ifne LMethod3634
LMethod3599:
iload 8
LMethod3601:
sipush 164
LMethod3603:
if_icmpne LMethod3634
LMethod3605:
iload 9
LMethod3607:
iconst_1
LMethod3608:
if_icmpne LMethod3634
LMethod3610:
iload 10
LMethod3612:
bipush 7
LMethod3614:
if_icmpne LMethod3634
LMethod3616:
iconst_2
LMethod3617:
istore 6
LMethod3619:
iconst_2
LMethod3620:
newarray byte
LMethod3622:
astore_3
LMethod3623:
aload_3
LMethod3624:
iconst_0
LMethod3625:
iconst_1
LMethod3626:
bastore
LMethod3627:
aload_3
LMethod3628:
iconst_1
LMethod3629:
iconst_0
LMethod3630:
bastore
LMethod3631:
goto_w LMethod31076
LMethod3634:
iconst_0
LMethod3635:
istore 11
LMethod3637:
goto_w LMethod31069
LMethod3640:
iconst_1
LMethod3641:
istore 15
LMethod3643:
iload 7
LMethod3645:
ifne LMethod3662
LMethod3647:
iload 8
LMethod3649:
sipush 164
LMethod3651:
if_icmpne LMethod3662
LMethod3653:
iload 9
LMethod3655:
iconst_4
LMethod3656:
if_icmpne LMethod3662
LMethod3658:
iload 10
LMethod3660:
ifeq LMethod3729
LMethod3662:
iconst_0
LMethod3663:
istore 13
LMethod3665:
goto LMethod3690
LMethod3667:
getfield class0/field2 [B
LMethod3670:
iload 13
LMethod3671:
baload
LMethod3672:
getfield class0/field1 [B
LMethod3675:
iload 11
LMethod3676:
iload 13
LMethod3678:
iadd
LMethod3679:
iconst_1
LMethod3680:
iadd
LMethod3681:
baload
LMethod3682:
if_icmpeq LMethod3687
LMethod3684:
iconst_0
LMethod3685:
istore 15
LMethod3687:
iinc 13 1
LMethod3690:
iload 13
LMethod3692:
getfield class0/field5 S
LMethod3695:
if_icmplt LMethod3667
LMethod3696:
iload 15
LMethod3698:
iconst_1
LMethod3699:
if_icmpne LMethod3729
LMethod3701:
getfield class0/field1 [B
LMethod3704:
iload 11
LMethod3705:
baload
LMethod3706:
istore 12
LMethod3708:
iload 12
LMethod3710:
ifge LMethod3722
LMethod3712:
iload 12
LMethod3714:
sipush 255
LMethod3717:
iadd
LMethod3718:
iconst_1
LMethod3719:
iadd
LMethod3720:
istore 12
LMethod3722:
iload 11
LMethod3724:
iload 12
LMethod3726:
iadd
LMethod3727:
istore 11
LMethod3729:
iload 15
LMethod3731:
iconst_1
LMethod3732:
if_icmpne LMethod31041
LMethod3735:
iload 7
LMethod3737:
getfield class0/field1 [B
LMethod3740:
iload 11
LMethod3741:
iconst_1
LMethod3742:
iadd
LMethod3743:
baload
LMethod3744:
if_icmpne LMethod31011
LMethod3747:
iload 8
LMethod3749:
getfield class0/field1 [B
LMethod3752:
iload 11
LMethod3753:
iconst_2
LMethod3754:
iadd
LMethod3755:
baload
LMethod3756:
if_icmpne LMethod31011