// // BF_set_key from 0x10f2674 to 0x10f279c (296 bytes) // // 2 xrefs: // > sub_10DE278 @ 0x10de2a8 // > @ 0xc91a8 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:18:08 +0000 // int *__fastcall BF_set_key(_DWORD *a1, int a2, unsigned __int8 *a3) { _DWORD *v5; // x23 _DWORD *v7; // x19 _DWORD *v8; // x2 unsigned __int8 *v9; // x0 int v10; // w5 unsigned __int64 v11; // x5 unsigned __int8 *v12; // x1 int v13; // w4 unsigned __int8 *v14; // x0 int v15; // w3 unsigned __int8 *v16; // x1 int v17; // w4 int v18; // w3 int v19; // w4 int *result; // x0 int v21; // [xsp+48h] [xbp+48h] BYREF int v22; // [xsp+4Ch] [xbp+4Ch] v5 = a1 + 18; v7 = a1; memcpy(a1, &unk_1226200, 0x1048u); v8 = a1; v9 = a3; if ( a2 > 72 ) v10 = 72; else v10 = a2; v11 = (unsigned __int64)&a3[v10]; do { v12 = v9 + 1; v13 = *v9; if ( v11 <= (unsigned __int64)(v9 + 1) ) v12 = a3; v14 = v12 + 1; if ( v11 <= (unsigned __int64)(v12 + 1) ) v14 = a3; v15 = *v12; v16 = v14 + 1; v17 = v15 | (v13 << 8); if ( v11 <= (unsigned __int64)(v14 + 1) ) v16 = a3; v18 = *v14; v9 = v16 + 1; v19 = v18 | (v17 << 8); if ( v11 <= (unsigned __int64)(v16 + 1) ) v9 = a3; *v8++ ^= *v16 | (v19 << 8); } while ( v8 != v5 ); v21 = 0; v22 = 0; do { v7 += 2; BF_encrypt(&v21, a1); *(v7 - 2) = v21; *(v7 - 1) = v22; } while ( v7 != v5 ); do { v7 += 2; result = BF_encrypt(&v21, a1); *(v7 - 2) = v21; *(v7 - 1) = v22; } while ( v7 != a1 + 1042 ); return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source