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
| from ctypes import *
vm_code = [0x000000F6, 0x0000006C, 0x000000F6, 0x00000066, 0x000000F6, 0x00000047, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000D, 0x000000F6, 0x00000066, 0x000000F6, 0x00000005, 0x000000F6, 0x00000066, 0x000000F6, 0x00000013, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000A, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000002, 0x000000F6, 0x00000066, 0x000000F6, 0x00000009, 0x000000F6, 0x00000066, 0x000000F6, 0x00000009, 0x000000F6, 0x00000066, 0x000000F6, 0x00000001, 0x000000F6, 0x00000066, 0x000000F6, 0x0000004A, 0x000000F6, 0x00000066, 0x000000F6, 0x00000015, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x00000012, 0x000000F6, 0x00000066, 0x000000F6, 0x00000013, 0x000000F6, 0x00000066, 0x000000F6, 0x00000008, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000F, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000B, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x00000014, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000E, 0x000000F6, 0x00000066, 0x000000F6, 0x00000012, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000014, 0x000000F6, 0x00000066, 0x000000F6, 0x00000009, 0x000000F6, 0x00000066, 0x000000F6, 0x00000000, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000002, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x00000015, 0x000000F6, 0x00000066, 0x000000F6, 0x00000015, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x00000014, 0x000000F6, 0x00000066, 0x000000F6, 0x00000016, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000002, 0x000000F6, 0x00000066, 0x000000F6, 0x00000014, 0x000000F6, 0x00000066, 0x000000F6, 0x00000007, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000E, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x00000004, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000A, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000A, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000F, 0x000000F6, 0x00000066, 0x000000F6, 0x00000011, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000013, 0x000000F6, 0x00000066, 0x000000F6, 0x00000009, 0x000000F6, 0x00000066, 0x000000F6, 0x0000001F, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x0000004A, 0x000000F6, 0x00000066, 0x000000F6, 0x0000001F, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000A, 0x000000F6, 0x00000066, 0x000000F6, 0x00000012, 0x000000F6, 0x00000066, 0x000000F6, 0x00000005, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x00000014, 0x000000F6, 0x00000066, 0x000000F6, 0x00000014, 0x000000F6, 0x00000066, 0x000000F6, 0x00000009, 0x000000F6, 0x00000066, 0x000000F6, 0x00000005, 0x000000F6, 0x00000066, 0x000000F6, 0x00000008, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000F, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000001, 0x000000F6, 0x00000066, 0x000000F6, 0x00000007, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000A, 0x000000F6, 0x00000066, 0x000000F6, 0x00000000, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x0000000E, 0x000000F6, 0x00000066, 0x000000F6, 0x00000012, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000014, 0x000000F6, 0x00000066, 0x000000F6, 0x00000003, 0x000000F6, 0x00000066, 0x000000F6, 0x00000011, 0x000000F6, 0x00000066, 0x000000F6, 0x00000015, 0x000000F6, 0x00000066, 0x000000F6, 0x00000008, 0x000000F6, 0x00000066, 0x000000F6, 0x00000007, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000013, 0x000000F6, 0x00000066, 0x000000F6, 0x00000009, 0x000000F6, 0x00000066, 0x000000F6, 0x0000001F, 0x000000F6, 0x00000066, 0x000000F6, 0x00000046, 0x000000F6, 0x00000066, 0x000000F6, 0x00000000, 0x000000F6, 0x00000066, 0x000000F6, 0x0000002F, 0x000000F6, 0x00000066, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x000000F7, 0x000000F8, 0x000000F3, 0x00000011, 0x00000010, 0x00000010, 0x000000F8, 0x000000F7, 0x000000F4, 0x694E694D, 0x00000001, 0x74632D4C, 0x000000F4, 0x00000000, 0x000000F3, 0x000000F2, 0x1D2D440F, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x00114514, 0x000000F3, 0x000000F2, 0x74747250, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x00228A28, 0x000000F3, 0x000000F2, 0x00228A4D, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x0033CF3C, 0x000000F3, 0x000000F2, 0x0033CFAA, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x00451450, 0x000000F3, 0x000000F2, 0x004514CB, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x00565964, 0x000000F3, 0x000000F2, 0x00565966, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x00679E78, 0x000000F3, 0x000000F2, 0x00679FBC, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x0078E38C, 0x000000F3, 0x000000F2, 0x0078E4CC, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x008A28A0, 0x000000F3, 0x000000F2, 0x008A2949, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x009B6DB4, 0x000000F3, 0x000000F2, 0x009B6EC8, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x00ACB2C8, 0x000000F3, 0x000000F2, 0x00ACB3E0, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x00BDF7DC, 0x000000F3, 0x000000F2, 0x00BDF8F6, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x00CF3CF0, 0x000000F3, 0x000000F2, 0x00CF3D22, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x00E08204, 0x000000F3, 0x000000F2, 0x00E082EB, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x00F1C718, 0x000000F3, 0x000000F2, 0x00F1C745, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x01030C2C, 0x000000F3, 0x000000F2, 0x01030C9C, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x01145140, 0x000000F3, 0x000000F2, 0x0114518E, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x01259654, 0x000000F3, 0x000000F2, 0x01259634, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x0136DB68, 0x000000F3, 0x000000F2, 0x0136DC9C, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x0148207C, 0x000000F3, 0x000000F2, 0x0148217D, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x01596590, 0x000000F3, 0x000000F2, 0x015965AE, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x016AAAA4, 0x000000F3, 0x000000F2, 0x016AABB8, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x017BEFB8, 0x000000F3, 0x000000F2, 0x017BF02F, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x018D34CC, 0x000000F3, 0x000000F2, 0x018D352A, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x019E79E0, 0x000000F3, 0x000000F2, 0x019E7AE7, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x01AFBEF4, 0x000000F3, 0x000000F2, 0x01AFBF19, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x01C10408, 0x000000F3, 0x000000F2, 0x01C1043C, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x01D2491C, 0x000000F3, 0x000000F2, 0x01D249A4, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x01E38E30, 0x000000F3, 0x000000F2, 0x01E38E3E, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x01F4D344, 0x000000F3, 0x000000F2, 0x01F4D3B0, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x02061858, 0x000000F3, 0x000000F2, 0x02061853, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x02175D6C, 0x000000F3, 0x000000F2, 0x02175E76, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x0228A280, 0x000000F3, 0x000000F2, 0x0228A241, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x0239E794, 0x000000F3, 0x000000F2, 0x0239E866, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x024B2CA8, 0x000000F3, 0x000000F2, 0x024B2D81, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x025C71BC, 0x000000F3, 0x000000F2, 0x025C72F0, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x026DB6D0, 0x000000F3, 0x000000F2, 0x026DB738, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x027EFBE4, 0x000000F3, 0x000000F2, 0x027EFCFC, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x029040F8, 0x000000F3, 0x000000F2, 0x029041F1, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x02A1860C, 0x000000F3, 0x000000F2, 0x02A186E7, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000000B, 0x00000001, 0x00000016, 0x000000F4, 0x02B2CB20, 0x000000F3, 0x000000F2, 0x02B2CBE3, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000016, 0x00000001, 0x00000021, 0x000000F4, 0x02C41034, 0x000000F3, 0x000000F2, 0x02C4105D, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x00000021, 0x00000001, 0x0000002C, 0x000000F4, 0x02D55548, 0x000000F3, 0x000000F2, 0x02D55595, 0x000000FE, 0x00000066, 0x000000F0, 0x00000010, 0x000000F8, 0x000000F4, 0x0000002C, 0x00000001, 0x0000000B, 0x000000F4, 0x02E69A5C, 0x000000F3, 0x000000F2, 0x02E69A7B, 0x000000FE, 0x00000066, 0x000000F0]
input_index = 0 vm_code_index = 0 is_equal = 0 is_smaller = 0 r = [0, 0, 0, 0, 0, 0] input_data = [0 for i in range(200)]
def save_value(value): global input_index input_data[input_index] = value input_index += 1
def get_value(save_to): global input_index input_index -= 1 r[save_to] = input_data[input_index] input_data[input_index] = 0 print('mov r%s, stack[%s]' % (save_to, input_index)) print('mov stack[%s], 0' % input_index)
def case_0(): global vm_code_index r[2] += vm_code[vm_code_index + 1] print('add r2, %s' % vm_code[vm_code_index + 1]) vm_code_index += 2
def case_15(): global vm_code_index global input_index r[5] = 0 r[5] = ord(input('')) save_value(r[5]) print('mov r5, %s' % r[5]) print('mov stack[%s], r5' % (input_index-1)) vm_code_index += 1
def case_16(): global vm_code_index print('print: ', chr(r[1])) vm_code_index += 1
def case_239(): global vm_code_index r[1] = r[2] print('mov r1, r2') vm_code_index += 1
def case_240(): global vm_code_index r[4] = r[2] print('mov r4, r2') vm_code_index += 1
def case_241(): global is_equal global is_smaller global vm_code_index a1 = r[1] a2 = vm_code[vm_code_index + 1] print('cmp r1, %s' % a2) if a1 == a2: print('r1 == %s' % a2) is_equal = 1 is_smaller = 0 elif a1 - a2 < 0: print('Smaller') is_equal = 0 is_smaller = 1 else: print('Bigger') is_equal = 0 is_smaller = 0 vm_code_index += 2
def case_242(): global vm_code_index r[1] ^= r[2] print('xor r1, r2') vm_code_index += 1
def case_243(): global vm_code_index r[1] += vm_code[vm_code_index + 1] print('add r1, %s' % vm_code[vm_code_index + 1]) vm_code_index += 2
def case_244(): global vm_code_index vm_code[vm_code_index + 1] -= vm_code[vm_code_index + 2] print('sub %s, %s' % (vm_code[vm_code_index + 1], vm_code[vm_code_index + 2])) vm_code_index += 3
def case_245(): global vm_code_index save_value(vm_code[vm_code_index + 1]) print('mov stack[%s], %s' % (input_index-1, vm_code[vm_code_index + 1])) vm_code_index += 2
def case_246(): global vm_code_index get_value(1) vm_code_index += 1
def case_247(): global vm_code_index get_value(2) vm_code_index += 1
def case_248(): global vm_code_index get_value(3) vm_code_index += 1
def case_249(): global vm_code_index get_value(4) vm_code_index += 1
def case_253(): global is_equal global vm_code_index if is_equal == 0: print('Wrong') exit() vm_code_index += 2
def case_254(): global vm_code_index global is_equal if is_equal == 1: vm_code_index += vm_code[vm_code_index + 1] print('jmp %s' % vm_code[vm_code_index + 1]) vm_code_index += 2
while vm_code[vm_code_index]: opcode = c_uint8(vm_code[vm_code_index] - 1).value if opcode == 0: case_0() elif opcode == 15: case_15() elif opcode == 16: case_16() elif opcode == 239: case_239() elif opcode == 240: case_240() elif opcode == 241: case_241() elif opcode == 242: case_242() elif opcode == 243: case_243() elif opcode == 244: case_244() elif opcode == 245: case_245() elif opcode == 246: case_246() elif opcode == 247: case_247() elif opcode == 248: case_248() elif opcode == 249: case_249() elif opcode == 253: case_253() elif opcode == 254: case_254() else: print('UNKNOWN OPCODE') exit()
print('Correct')
|