[原创]dasctf apr.2023 x su战队2023开局之战 reverse&&blockchain writeup | 宜武汇-ag真人国际厅网站

import ctypes

import binascii

def deal_last_rev(hex_num):

      # hex_num = 0x9ddc359e

 

      byte1 = (hex_num >> 24) & 0xff

      byte2 = (hex_num >> 16) & 0xff

      byte3 = (hex_num >> 8) & 0xff

      byte4 = hex_num & 0xff

 

      byte1 = ctypes.c_uint8(byte1)

      byte1.value ^= 0x0c

      # print(bin(byte1.value))

      byte1.value = ((byte1.value<<5)&0xff)|((byte1.value>>3)&0xff)

      # print(bin(byte1.value))

      byte2 = ctypes.c_uint8(byte2)

      byte2.value ^= 0x0c

      byte2.value = ((byte2.value<<5)&0xff)|((byte2.value>>3)&0xff)

 

      byte3 = ctypes.c_uint8(byte3)

      byte3.value ^= 0x0c

      byte3.value = ((byte3.value<<5)&0xff)|((byte3.value>>3)&0xff)

 

      byte4 = ctypes.c_uint8(byte4)

      byte4.value ^= 0x0c

      byte4.value = ((byte4.value<<5)&0xff)|((byte4.value>>3)&0xff)

 

      result = (byte1.value << 24) | (byte2.value << 16) | (byte3.value << 8) | byte4.value

      return result

 

def rrev(hex_num):

      byte1 = (hex_num >> 24) & 0xff

      byte2 = (hex_num >> 16) & 0xff

      byte3 = (hex_num >> 8) & 0xff

      byte4 = hex_num & 0xff

      result = (byte4 << 24) | (byte3 << 16) | (byte2 << 8) | byte1

      return result

a4 = [0x2fe994e0, 0xc11e954b, 0xf00e449d, 0xda7858a1, 0xcef89b0a, 0xb06f5fd9, 0x32646df2, 0x3d31f55a, 0xe90ec568,

      0xf69c53b7, 0x3f2c9c44, 0x6dd31bc7, 0xf4af32ed, 0x4381f9c7, 0x26eb634f, 0xe5fba3cf, 0xab36b7fb, 0xb295a35b,

      0x732f94d5, 0xeec6c173, 0x572989eb, 0xcb9ddfd9, 0xaf9f559b, 0xfc9a4d99, 0xe14b9327, 0x3a04b794, 0x588c93a9,

      0xb75b93df, 0xfc906662, 0x7043911c, 0x71f1f968, 0xaec02345, 0x642c0a73, 0xe92fd10a, 0xf749be48, 0x02c776f8,

      0x78d847b6, 0xd9d395ea, 0xc091094d, 0x5ed1a899, 0x8535b464, 0xc9b571e4, 0xd5974f29, 0x69bf7ac2, 0x78862ed1,

      0xaea837dd, 0x4d8bf9b9, 0x358766d5, 0x0194484b, 0xb2c46c77, 0xa5b3f500, 0x21b29753, 0xc8be07b5, 0x9b982150,

      0xaab0f261, 0xc54587ba, 0x5fe3f7a2, 0xb94325df, 0x814b1991, 0x05a7cbc5, 0xc01e7032, 0x2d802ed9, 0xf920c022,

      0xdc7aae97, 0x3904a61f, 0x8a725de7, 0x9e49a196, 0xf7ae5df0, 0x19eb724a, 0x03fb7cf7, 0x2f9234af, 0x72006306,

      0x9123b54c, 0xb8164574, 0x69438e25, 0xd56f49d2, 0x681cb159, 0x8cdaddf4, 0xfce82189, 0x50a905d4, 0x9386e52a,

      0xcacc2368, 0x38b3a6a3, 0x3ca0df37, 0xf51d7dd5, 0x24242d86, 0x7f8d441b, 0xd6e5bba6, 0x263cbcd8, 0xe3added7,

      0x6d543f5e, 0x4716d72f, 0x2799b4e3, 0xa80b339e, 0x2a9a3565, 0x812eca54, 0x58a9d96e, 0xcf3acc39, 0x2777dc51,

      0x520f1ef8, 0xf4a2399e, 0x0bb7a943, 0x9bb2287a, 0x074c750b, 0xe89f260c, 0xf39494c9, 0x62154805, 0x2869bb07,

      0x71d3c65f, 0x83f883c6, 0x179a9696, 0xd53e6014, 0x28a45fbb, 0x565c9fd2, 0x4cc74f44, 0x50fd664a, 0x0789a88d,

      0x7454ae55, 0x4ad93102, 0xc4c64c97, 0x146a16c5, 0xa6337621, 0x601474dd, 0xd9ccbfa2, 0xd628928f, 0xec0ef727,

      0x4e728f4c, 0x6d394e22, 0x23252bc3, 0x410db272, 0x60c5467f, 0x28c58c78, 0x45b98e47, 0x2d453756, 0x9fc502fe,

      0x2faaa75c, 0xfecc881c, 0xc98742bd, 0x18fab5a0, 0x96a2691b, 0x265c4abe, 0x22e5221d, 0x79f147b5, 0xa4963a5a,

      0x38a53ce1, 0xc5899bdf, 0xafbede5a, 0xed2ef97d, 0x212a53ac, 0x2e7141d6, 0x2fcf2d57, 0xefb9869f, 0xd4665961,

      0x231bb16a, 0x12ef4976, 0x7daf240e, 0x3b96114a, 0xd27bb394, 0x357215cd, 0xa4aaef55, 0x17e76552, 0x6f57c2dd,

      0x83ed82e0, 0xcaabaea5, 0xe7f5b748, 0xab0e7982, 0x54435c78, 0x366a7f66, 0x7f94d113, 0x0d96ffbb, 0x2a795ff7,

      0x2641ef7a, 0x73c2cb56, 0x701792c4, 0x1ccd9df5, 0x156882b1, 0x888343f4, 0xe22db762, 0x9e4ccb4b, 0x21517a50,

      0x072f9091, 0x3e06a3de, 0x311619dd, 0xa0ab192d, 0x5f0d5cf1, 0xf05fcfea, 0xe36dea48, 0x3fc54006, 0xba8849a7,

      0xb32dc878, 0xc1fef774, 0xe34a6edb, 0x770a2d0d, 0xcdf8d3dc, 0x7ebe066a, 0x603cd5bc, 0x4c6b5e7b, 0x12e80727,

      0xfb69c765, 0x87a42b29, 0xe73a641f, 0xd586ab9b, 0x3bb112b3, 0x59af1110, 0x1f6facfb, 0x52597df3, 0x28ef38d8,

      0xba0432c7, 0x958fdea9, 0x68678326, 0x2161a62b, 0x44c8c4a0, 0xb1d7a078, 0x205ca9e3, 0xd4b8c306, 0x63f9157d,

      0x4aeda561, 0xfb84c9d6, 0xd8988f07, 0xf21a9841, 0xf4e71fb2, 0x63232b2e, 0x6eba9afe, 0x2dafe02c, 0xdcc6655e,

      0xfdb3b0de, 0x044c3ead, 0x10468b3e, 0xda71d948, 0x6baccbe4, 0x9a7844fc, 0xdf7fe345, 0xcb06712c, 0x034ac145,

      0x510e9532, 0x71eafbc2, 0x44433456, 0xcb01159d, 0x4a1957dd, 0x73c8df17, 0xc8db9516, 0x1adb1906, 0x676bcec1,

      0x08dac3c4, 0x3cad32a1, 0xd737d4f3, 0x20acde94, 0xab6d02f3, 0x506e5c37, 0xedf08e37, 0x668c8dd5, 0xea33c67d,

      0x35308ba4, 0x67f0a8ba, 0x166546b5, 0x38d06e3f, 0x68159fec, 0x1cec8fa1, 0x9917e8b9, 0x376c0882, 0x9aadf201,

      0x42dacd9c, 0x37663273, 0x51639640, 0x3ca96c41, 0xfd7e97ce, 0x174cad5d, 0xa7a5f995, 0x2c36eb62, 0x7afcfc30,

      0x23dc7e23, 0xd742da78, 0x03d27cb1, 0x7e9edc0a, 0x6a0fb256, 0x4fcdb0ef, 0x26cab2d4, 0x095ba999, 0x839cb8c4,

      0x288ae59d, 0x1f033326, 0x5e8761cf, 0x0648ed4c, 0x98c49a53, 0xe3c0390d, 0xad642407, 0xbd269591, 0x32a2e629,

      0xe3122457, 0x5d73ed1c, 0x33a26e04, 0x2e67de60, 0x6f2b18e3, 0x4558eadb, 0xdba1d8b3, 0x9cadf7b5, 0x5ffbb4ef,

      0x805ad7d1, 0xff84e641, 0x4d49b28b, 0x2a28ea66, 0x7bc6fa3c, 0x266731fc, 0x3ab4d8da, 0xb43eb68e, 0x9c4d6f43,

      0x1cce439f, 0xb625a0ce, 0x4b78af95, 0xd06a3ff7, 0x5c8a2078, 0xfd9fa69d, 0x7bf98a71, 0xee90b86d, 0xa442a73a,

      0xb5a4a212, 0xa8e481f6, 0x4c6fd0bd, 0xa7706fb4, 0x3569127f, 0x59dfadb6, 0x2ab4fb23, 0x3604808a, 0xf3779794,

      0xaa5a7edf, 0x2ecf97ba, 0x969504a5, 0xcd05b77f, 0x5321db1d, 0xd8baba9c, 0x7a97ef53, 0x37231a53, 0x366bfec5,

      0x9bd96a49, 0x5a6c7f46, 0xe47bd143, 0x13fd722b, 0xf9a52e09, 0x6420a5bc, 0x8a8bb90c, 0x8234235e, 0x215ec40c,

      0x46790597, 0x825ea222, 0xb783d749, 0x24a8815f, 0x2f74a78e, 0xd9e403d4, 0x63e17b10, 0xb6226cef, 0x0e0f4381,

      0xca7d3369, 0x728c9c6b, 0xb14ecc63, 0x991a0f0e, 0xb0422615, 0x4c2fd823, 0x3302908b, 0xbaaf7739, 0x357ef5bc,

      0x4cc6687f, 0xdd2f23b7, 0xa3ac1329, 0xc167b555, 0xe1f9b87b, 0x2b65d3b4, 0x4368817b, 0x03daf56a, 0x9ae59ab9,

      0xf5eac7ee, 0xb36417a7, 0xf8fc224a, 0xa7e519fe, 0x8637329c, 0xb21461fd, 0xaed97750, 0x8744167f, 0x4669e638,

      0x4e1b3b1a, 0xd377b3f7, 0xf514b3b6, 0x707a415c, 0x0ab652f0, 0xbc513a6d, 0x4fce3f92, 0x96cbee70, 0x31351026,

      0xd37a9f73, 0x4dd00f9e, 0x047c1b22, 0x071df745, 0x3a7697be, 0xe24edc03, 0x37233d96, 0x02373dd2, 0x26396c2b,

      0x2229d430, 0x770ce3e3, 0xde942cd0, 0x3f79b030, 0x5149db45, 0x67ffe1c5, 0x78f66a56, 0x0e2313ea, 0xe13fe0c7,

      0xa0c51fc4, 0xc11d9ca7, 0x709a60b2, 0x32ec174f, 0xc8ca5d05, 0x3351393b, 0x57846d6c, 0x22834834, 0x0ffa5dfe,

      0x95db516a, 0xc61e38f0, 0x15a3ee21, 0x4a587f75, 0x5be749d7, 0xbbf167d7, 0x7334e07d, 0x09606180, 0x8bb6560e,

      0xd35ffc0f, 0x34dcfbcc, 0x3e98ba62, 0x8a33c7ef, 0x19763e8b, 0x01fa474d, 0x529a6743, 0xf65d218c, 0xe0d70194,

      0xbc879fcc, 0xe9db6228, 0x07d566b6, 0x4c1b0d84, 0x945abd96, 0xd1196c6e, 0x81ee67cc, 0xad1721ae, 0xc987453f,

      0x063ceb9f, 0xb27f0a73, 0xb5997727, 0x69d5b851, 0x02f7d0a1, 0x074f31cb, 0x53088d46, 0xbf2d83c4, 0x6c75bc86,

      0x3b888596, 0x2ea614fe, 0x9e16dd01, 0xed1f5d7c, 0x9916a175, 0xd610a890, 0x7df08f91, 0x435a4d29, 0xb7b5e450,

      0x76fa8aac, 0x050adb83, 0x9cf8c712, 0xf08e8112, 0x9bac9884, 0x5568ddc3, 0x4be91ffe, 0x5b230aa2, 0x6bfda2e9,

      0xd26e1dfb, 0xf24668c7, 0x5464086a, 0xffbb1cf3, 0x13313b25, 0x04d2d867, 0x5c47617d, 0x33a3150d, 0x007c3a17,

      0x87df6435, 0x8937f0df, 0x3a707415, 0x3b2cfae3, 0xc46c894b, 0xa0be1104, 0xe2becabc, 0xe42fdeed, 0x21913fa9,

      0x1c30a346, 0x12758853, 0x57143736, 0x67e8119a, 0xd49d2036, 0x56ac8659, 0xa2dbb273, 0xfab5912a, 0x75903a11,

      0x9f1cc55a, 0x12554844, 0x658813ad, 0xba08d453, 0x93ad4948, 0xeddc0e10, 0xe25b6fd1, 0x9df9afcc, 0x2e98b6a2,

      0x731a29ab, 0x930f9d67, 0x4771ac8e, 0xdfe58864, 0x4b572200, 0x67c22ce4, 0x1c5cb393, 0x7f18dc62, 0xbafe6e58,

      0x8f157813, 0xedbb60e4, 0x17cc1a84, 0x5f7d0a2e, 0x64091858, 0x7baf9420, 0xe1c89aa7, 0x525df47c, 0x12cde243,

      0x0e25ec45, 0x9b36bc9f, 0x78b1715d, 0x962f9e9f, 0x7c18c853, 0xf1a8e5e3, 0x3c7fa3ee, 0xc119713f, 0x499ebaed,

      0x71e46262, 0x9e42e3ef, 0x46c80691, 0xe4b23574, 0xf5babe2b, 0x5b2c9a33, 0x296dfa2b, 0x9cec6d11, 0x4b8a27bf,

      0xc1c9fae3, 0xfe7dcb7d, 0x58ebcafe, 0xafc4fb8c, 0xc277eb5c, 0x3176f3ac, 0xbc6dd7c1, 0x92e42c52, 0x18381b68,

      0xb6adfc6f, 0x7f477c10, 0xd43ccedc, 0x1fa5633b, 0x3c8e5df4, 0x2b48dcd9, 0x8c326067, 0x567dde4e, 0x135e0f94,

      0x765226d0, 0x5e1e4408, 0xeeae88d4, 0x082c696b, 0x80a41500, 0xf3964793, 0x8589f6ba, 0x52b1e0b9, 0xbda9eed6,

      0x5542f81b, 0xaf48ca37, 0x1d014d51, 0xe38ea0e3, 0x1aa9456c, 0x21f5284a, 0xfb3b912d, 0xfcbce946, 0xd54db4a9,

      0xe0eb8a10, 0x71b621d0, 0x0926496f, 0x79bbecdf, 0xc2e04ab2, 0x5c3b27a9, 0x20521b1e, 0xf644b47a, 0x918ae499,

      0x2a1957e3, 0xa99f9de2, 0x0cb70521, 0xaa2b2092, 0xc9f228ea, 0x6d683f3e, 0xe3f41ae0, 0x464a1769, 0x9c03f898,

      0xde9509f6, 0x732aea1f, 0x146e5313, 0x8721e289, 0xad6c48ef, 0x920b4228, 0x00fb935c, 0x0071d1de, 0x7677932b,

      0xacc60c24, 0x2b2c304c, 0x2e8661ec, 0xc7044b76, 0x64a3e5c6, 0x9684b218, 0x708ee6e2, 0x5dc74ca9, 0xe4bc1927,

      0x22418b42, 0xe8e3d9c2, 0x5466078d, 0xbd66ed30, 0xdde518bc, 0x6a6c32b9, 0x5bd25d34, 0xf7aa086e, 0xb8b683d5,

      0x6edd605b, 0xda373814, 0xc26a335e, 0xa1077db1, 0xee9b3078, 0x2b2a915d, 0xceed5305, 0x78e15f73, 0x1f9cfebc,

      0xf25a97ff, 0xfd36081e, 0xf60ac26d, 0xfe0c1ad0, 0x130ff5e5, 0xe1b8485a, 0x2a6200a2, 0xe71ddbaf, 0x157ee174,

      0x8ac40711, 0xdad02a4f, 0xa6af6f7c, 0x9ab6d314, 0xf51e249c, 0xb18b878b, 0xe0547c50, 0x2202349f, 0x0f007c35,

      0xf96a3ac7, 0x070ec924, 0x8cafd12e, 0x93aad3f8, 0x76cc52d8, 0x9c255ce4, 0x34f401d0, 0x6b479eaf, 0x7d45f765,

      0xebd846db, 0xb4660d11, 0x66675434, 0xee4e8855, 0x3c9898da, 0xccc78b80, 0x49e7f697, 0x8c8c25e1, 0xd8cbdcd6,

      0xee8d2953, 0x3f0f1eaa, 0xb3974db4, 0xeee04672, 0xcf3beb72, 0x7322bcad, 0x2052fee1, 0x02961cc1, 0x5ebf91d2,

      0x84b3b0cd, 0xecd5cc47, 0x6b72e6fd, 0x5fb337cb, 0xdc046235, 0xb3554069, 0x62e8d358, 0x2dbdeb7e, 0x736553ec,

      0x0e465ed1, 0x009754a7, 0x9ad76638, 0x186ae66a, 0x8f34832e, 0xf4c54676, 0x4f5ac24d, 0x83734b08, 0x3e01d7ed,

      0x31f830b6, 0x0b71c039, 0xf062bafc, 0xc19cb1ca, 0x81a94e9b, 0x43f753cc, 0xae467cb1, 0x3a24425d, 0x993840c2,

      0x029e3f23, 0x189cebd6, 0x30ae5f1f, 0x31c18967, 0x33009cd8, 0xf70963cf, 0x71b25c85, 0x9776e649, 0x1dc69634,

      0x67c5f945, 0xdd8c3fc1, 0xa6b267cf, 0x67828f15, 0x258cceaa, 0xde7e40b0, 0x3fe203db, 0x7f841970, 0x6f60ad42,

      0x155e8ed0, 0x36cc984e, 0xb358111d, 0x82c7a44c, 0xf7d1361a, 0x4d0dd4ec, 0x9267c5fa, 0x5e0a7558, 0xcbed3cf6,

      0xe43e5ae1, 0x7c3b1bb5, 0xe635509e, 0xa4b279fc, 0x1bfda0f9, 0x9c3a46f9, 0xbf0a3982, 0x18999ce5, 0xfbb9999b,

      0x5626e83b, 0xec72fc45, 0xcf4eab7e, 0xab05621a, 0xa86466f0, 0x926f02e5, 0x0ea172c2, 0x882777ab, 0x490ae628,

      0xdd8a4da2, 0x2c934f7b, 0x88797186, 0x56d82195, 0x627d7c88, 0x045af90d, 0x655118f9, 0x42f76c99, 0xf2122134,

      0x022396cd, 0x25120833, 0xc6cd6f93, 0xaf7c08df, 0x2da99b63, 0x8ef8cf03, 0xb8098054, 0x4e9b2f5a, 0x022b0aec,

      0x1459055e, 0x02a0033f, 0xed67b9c8, 0x758057a5, 0xc7d8ba2a, 0xd4cc7cc6, 0x5f0b2597, 0x5ab84ffa, 0x496d1ee7,

      0x8550fda1, 0xdbbbdc70, 0x63149847, 0xc7ca2496, 0x96dbdcb7, 0xe2d4954a, 0xb9ec57f9, 0x6c70642c, 0x3d7b39f4,

      0xf6161271, 0xe73a4943, 0x0eaa2fd6, 0xab22a4bf, 0x134902f9, 0x1c4ba4dd, 0x558d617a, 0x8863374e, 0xc2ec82b0,

      0x031a8ade, 0x1741e8b1, 0x8f00a1cc, 0xf452f18f, 0x3a6e18d3, 0x6956dc4d, 0xdfa8ec1f, 0x69c52f20, 0x1ed99e2b,

      0xef7bae7d, 0x7af77378, 0x0b290733, 0x8c274a3e, 0x1f951c6c, 0xa3ddceac, 0x56f44acb, 0x2270ce33, 0x9d874a9c,

      0xf3a0f33e, 0xafd74932, 0x2478581c, 0x551c9d3c, 0xad063aa2, 0x31d17c9c, 0x88f7d6a0, 0x6ddd4f10, 0xda0e114d,

      0x8c2abc96, 0x6fa83a7a, 0xe2452395, 0xa8219761, 0x620d783e, 0xac489654, 0x3c1ace7e, 0xc9c2a9be, 0x7145ae6d,

      0x4ef2addf, 0x53ca37a2, 0xa0a8a218, 0x67fd8f21, 0xbead8745, 0xb7711ad9, 0xd52b427f, 0x67abbf1e, 0x0f66b464,

      0xeb331e94, 0xadaab204, 0x87756c23, 0x67f375bf, 0x54753fd8, 0x33abc12d, 0x8f401ea1, 0x3c88d6fe, 0x615451c9,

      0x87c32614, 0x268d494b, 0xf2ad7423, 0xcb949da5, 0x25b4196e, 0xb2c5df95, 0x8409721f, 0x0f7b5c12, 0x5e25eeea,

      0xc0f401b7, 0xa2daee3e, 0xf3aeae52, 0x2a464f0d, 0x9cfb83ec, 0xf6e0ee51, 0x4774c554, 0x22ddfde9, 0x5b599a74,

      0x80edbde4, 0x2cc61bbd, 0xd824b10e, 0x2d0c3300, 0x99845362, 0xdea64ce6, 0x575771aa, 0x961a3f14, 0x1432bea6,

      0x7d4fff90, 0xf583772a, 0x4ee7c522, 0x07e4dee6, 0x2c128c64, 0xd7d50924, 0x8223f310, 0x40be7e09, 0x74dbc2e0,

      0xbe3cde01, 0x3e608447, 0xbd6a380e, 0xe5961202, 0xd34e32a0, 0x2539b5c0, 0x873a67c2, 0x239775f8, 0x1f9f60e1,

      0xb63d3cf1, 0x30a5af81, 0x8fd564fb, 0xa569dc35, 0x0d615ef8, 0xc49c2e07, 0xfbf7f35c, 0x9edfeff3, 0x148314d8,

      0x8181cdf7, 0x7fa7653c, 0x5f40a6d5, 0xa994db03, 0xbccb55cc, 0x5d52d879, 0x65117bdd, 0x7d7f51d8, 0xb1bc1d10,

      0x1f00f42e, 0x5c9957b7, 0x48c37c3b, 0x6f3d7e80, 0xc5158369, 0xf405690d, 0x49dace68, 0xd2ac0d1d, 0xb399102a,

      0x69f65b83, 0x324344f5, 0xa5d875ee, 0xbf2bd3f3, 0x2bb0cccb, 0x7d6a05cf, 0x21af29eb, 0x6367765b, 0xad469391,

      0xb1bcc75e, 0xc0518872, 0x94c52623, 0x1fb253e8, 0xaa314eb5, 0xcf2f792c, 0x00b08ff5, 0x90575fed, 0x16c1cf89,

      0x2331ee19, 0x52590b8c, 0x06b4b6ec, 0xa46464c8, 0x955218f8, 0x6a75eff8, 0xeef53d04, 0x44650db6, 0x03498691,

      0xff27365f, 0x4bab9f2c, 0x97607df2, 0xf831b2f7, 0x779ee348, 0xcf0d1f54, 0x6ba70606, 0x32c0b10c, 0xf33943ed,

      0x31988090, 0x84b21458, 0x8701cc78, 0x632cf196, 0x0993a1d0, 0x55662bf3, 0x568fbc94, 0x76ae6160, 0x5ff57b9c,

      0xe326f5c6, 0x161b30b8, 0x8132a32a, 0xad3831c3, 0x032ddba5, 0xfb836cdc, 0x2ec6cbf8, 0x6c831855, 0xee8c0010,

      0x5a64b2e3, 0xb3e9ec1b, 0xe6eafbd0, 0xc1f2591a, 0x8e587584, 0x56398f78, 0x92ddb0c1, 0x1f76c224, 0x805fcd53,

      0x74ff5ee9, 0xdc2fceda, 0x3e90d994, 0x15617a80, 0x4f1e077e, 0xb5df16bf, 0x2854c143, 0x694e02c3, 0x4c3588ac,

      0xcc7758a2, 0xa23959c6, 0x612647ff, 0xf2b95082, 0x1031e285, 0x42eff0b4, 0xefbcbd1f, 0x3499362d, 0xad421535,

      0x02911b94, 0x01cb816f, 0x0e274a1a, 0x7edf8280, 0xadbd72ae, 0xdb20bbb3, 0x66cb4b73, 0xde18190c, 0x6feb4ba5,

      0xeb719056, 0xefaa7cfe, 0x100f8a13, 0x4e4afd17, 0xd66df5f1, 0xfb06b85d, 0x445aafc0, 0x3b9f8385, 0x1b5330af,

      0xed70b42d, 0x2f2d81bc, 0x11873849, 0x5e65e5ab, 0xadf9c568, 0xacb45611, 0x59583575, 0xeb1c07f7, 0xb9e9bdf1,

      0x65eb1d3d, 0xfa5fe526, 0x93c100a5, 0x2e414bc7, 0x7b0f062e, 0xce77979b, 0x334965bb, 0x50bd7300, 0xe4273979,

      0xc0eb2c14, 0x6e278874, 0x30523462, 0xf5d59cb2, 0xca284788, 0xb84443bf, 0x1b7bde26]

final = [0x9ddc359e, 0xf8288abf, 0x9e1989ca, 0x59224adb, 0xefdef866, 0xfc0bb7eb, 0x02d5c68a, 0xb3ac36f3, 0xdfbdac75,

         0x5f414df0]

result = [0,0]

for n in range(5):

    result[0] = deal_last_rev(final[2 * n])

    result[1] = deal_last_rev(final[2 * n 1])

 

 

    result[0], result[1] = result[1], result[0]

    result[0] ^= a4[16]

    result[1] ^= a4[17]

    for i in range(15, -1, -1):

        v12, v11 = result[0], result[1]

        result[0] = v11 ^ a4[i]

        result[1] =v12  ^ ctypes.c_uint(a4[(v11 & 0xff) 786] (

                a4[((v11 >> 8) & 0xff) 530] ^ (a4[((v11 >> 24) & 0xff) 18] a4[((v11 >> 16) & 0xff) 274]))).value

 

 

    print(str(binascii.a2b_hex(hex(rrev(result[0]))[2::]),encoding='utf-8'),end='')

    print(str(binascii.a2b_hex(hex(rrev(result[1]))[2::]), encoding='utf-8'), end='')

# flag{w3lc0me_t0_th3_mu1lt1_un1v3rs3!!!!}

原文链接:https://bbs.kanxue.com/thread-276962.htm

网络摘文,本文作者:15h,如若转载,请注明出处:https://www.15cov.cn/2023/08/27/原创dasctf-apr-2023-x-su战队2023开局之战-reverseblockchain-writeup/

发表评论

邮箱地址不会被公开。 必填项已用*标注

网站地图