// // sub_A12AF4 from 0xa12af4 to 0xa12c3c (328 bytes) // // 3 xrefs: // > @ 0xc789bc // > @ 0xc789f0 // > @ 0xc78a24 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:07:47 +0000 // int __fastcall sub_A12AF4(int a1, int a2, const void *a3) { _BOOL4 v3; // r4 _BOOL4 v4; // r7 const void *v5; // r8 int cipher_data; // r0 _DWORD *v10; // r5 int v11; // r0 int v12; // r0 v3 = a3 == nullptr; if ( a2 ) v4 = 0; else v4 = a3 == nullptr; v5 = a3; cipher_data = EVP_CIPHER_CTX_get_cipher_data(a1); if ( v4 ) return 1; v10 = (_DWORD *)cipher_data; if ( a2 ) { v11 = EVP_CIPHER_CTX_key_length(a1); AES_set_encrypt_key(a2, 8 * v11, v10); v12 = EVP_CIPHER_CTX_key_length(a1); AES_set_decrypt_key(a2, 8 * v12, v10 + 62); if ( !CRYPTO_ocb128_init(v10 + 126, v10, v10 + 62, AES_encrypt, AES_decrypt, 0) ) return 0; if ( !v3 || v10[125] && (v5 = (const void *)v10[168]) != nullptr ) { if ( CRYPTO_ocb128_setiv(v10 + 126, v5, v10[183], v10[184]) != 1 ) return 0; v10[125] = 1; } v10[124] = 1; return 1; } else { if ( *(_DWORD *)(cipher_data + 496) ) CRYPTO_ocb128_setiv(cipher_data + 504, v5, *(_DWORD *)(cipher_data + 732), *(_DWORD *)(cipher_data + 736)); else memcpy(*(void **)(cipher_data + 672), v5, *(_DWORD *)(cipher_data + 732)); v10[125] = 1; return 1; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source