// // CMAC_Update from 0xd8089c to 0xd809bc (288 bytes) // // 2 xrefs: // > sub_E1D248 @ 0xe1d268 // > @ 0x310c8 // // 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 // __int64 __fastcall CMAC_Update(_QWORD *a1, char *a2, size_t a3) { size_t v5; // x19 size_t v7; // x22 int v8; // w0 size_t v9; // x24 char *v10; // x0 char *v11; // x2 v5 = a3; if ( *((_DWORD *)a1 + 34) != -1 ) { if ( !a3 ) return 1; v7 = (int)EVP_CIPHER_CTX_block_size(*a1); v8 = *((_DWORD *)a1 + 34); if ( v8 <= 0 ) goto LABEL_9; v9 = v7 - v8; v10 = (char *)a1 + v8 + 104; if ( v9 > v5 ) v9 = v5; memcpy(v10, a2, v9); v5 -= v9; *((_DWORD *)a1 + 34) += v9; if ( !v5 ) return 1; a2 += v9; if ( (unsigned int)EVP_Cipher(*a1, a1 + 9, a1 + 13, (unsigned int)v7) ) { LABEL_9: if ( v7 >= v5 ) { LABEL_14: memcpy(a1 + 13, a2, v5); *((_DWORD *)a1 + 34) = v5; return 1; } while ( 1 ) { v11 = a2; v5 -= v7; a2 += v7; if ( !(unsigned int)EVP_Cipher(*a1, a1 + 9, v11, (unsigned int)v7) ) break; if ( v7 >= v5 ) goto LABEL_14; } } } return 0; }