// // sub_1022194 from 0x1022194 to 0x1022314 (384 bytes) // // 3 xrefs: // > @ 0x14015d8 // > @ 0x1401630 // > @ 0x1401688 // // 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:16:11 +0000 // __int64 __fastcall sub_1022194(__int64 a1, int a2, signed int a3, void *a4) { _DWORD *cipher_data; // x0 _DWORD *v9; // x19 __int64 v11; // x0 __int64 v12; // x0 cipher_data = (_DWORD *)EVP_CIPHER_CTX_get_cipher_data(a1); v9 = cipher_data; switch ( a2 ) { case 0: cipher_data[124] = 0; cipher_data[125] = 0; cipher_data[190] = EVP_CIPHER_CTX_iv_length(a1); v11 = EVP_CIPHER_CTX_iv_noconst(a1); v9[188] = 0; *((_QWORD *)v9 + 87) = v11; v9[189] = 0; v9[191] = 16; return 1; case 8: v12 = EVP_CIPHER_CTX_get_cipher_data(a4); return CRYPTO_ocb128_copy_ctx(v12 + 504, v9 + 126, v12, v12 + 248); case 9: if ( (unsigned int)(a3 - 1) > 0xE ) return 0; cipher_data[190] = a3; return 1; case 16: if ( cipher_data[191] != a3 || !(unsigned int)EVP_CIPHER_CTX_encrypting(a1) ) return 0; memcpy(a4, v9 + 176, a3); return 1; case 17: if ( a4 ) { if ( cipher_data[191] == a3 && !(unsigned int)EVP_CIPHER_CTX_encrypting(a1) ) { memcpy(v9 + 176, a4, a3); return 1; } return 0; } if ( (unsigned int)a3 > 0x10 ) return 0; cipher_data[191] = a3; return 1; default: return 0xFFFFFFFFLL; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source