// // RC2_encrypt from 0x82a464 to 0x82a59c (312 bytes) // // 7 xrefs: // > RC2_cbc_encrypt @ 0x82a7e8 // > RC2_cbc_encrypt @ 0x82ac1c // > RC2_ecb_encrypt @ 0x82ad9c // > RC2_cfb64_encrypt @ 0x82b020 // > RC2_cfb64_encrypt @ 0x82b11c // > RC2_ofb64_encrypt @ 0x82b254 // > @ 0x660cc // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // int *__fastcall RC2_encrypt(int *result, _DWORD *a2) { unsigned int v2; // r8 int v3; // lr unsigned int v4; // r4 unsigned int v5; // r3 int v6; // r12 _DWORD *v7; // r5 int v8; // r7 int v9; // r6 int v10; // t1 unsigned int v11; // lr unsigned int v12; // r4 unsigned int v13; // r3 v2 = (unsigned __int16)result[1]; v3 = (unsigned __int16)*result; v4 = HIWORD(*result); v5 = HIWORD(result[1]); v6 = *a2; v7 = a2; v8 = 3; v9 = 5; while ( 1 ) { v11 = ((v4 & ~v5) + (v5 & v2) + v3 + v6) << 16; v3 = (v11 >> 15) | (v11 >> 31); v12 = (v4 + v7[1] + (v3 & v5) + (v2 & ~v3)) << 16; v4 = (v12 >> 14) | (v12 >> 30); v2 = (8 * (v2 + v7[2] + (v4 & v3) + (v5 & ~v4))) & 0x7FFFF | ((v2 + v7[2] + (v4 & v3) + (v5 & ~v4)) << 16 >> 29); v13 = (v5 + v7[3] + (v2 & v4) + (v3 & ~v2)) << 16; v5 = (v13 >> 11) | (v13 >> 27); if ( --v9 ) goto LABEL_7; if ( !--v8 ) break; v3 += a2[v5 & 0x3F]; if ( v8 == 2 ) v9 = 6; v4 += a2[v3 & 0x3F]; if ( v8 != 2 ) v9 = 5; v2 += a2[v4 & 0x3F]; v5 += a2[v2 & 0x3F]; LABEL_7: v10 = v7[4]; v7 += 4; v6 = v10; } *result = (unsigned __int16)v3 | (v4 << 16); result[1] = (unsigned __int16)v2 | (v5 << 16); return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source