// // DSA_generate_key from 0x10faaa0 to 0x10fabf0 (336 bytes) // // 2 xrefs: // > sub_10AA220 @ 0x10aa280 // > @ 0xafcf0 // // 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:14 +0000 // __int64 __fastcall DSA_generate_key(__int64 *a1) { __int64 (*v1)(void); // x1 int32x2_t *v4; // x23 __int64 *v5; // x19 __int64 v6; // x22 unsigned int v7; // w21 __int64 v8; // x0 __int64 v9; // x21 __int64 v10; // x0 __int64 v11; // x0 v1 = *(__int64 (**)(void))(a1[11] + 88); if ( v1 ) return v1(); v4 = (int32x2_t *)BN_CTX_new(); if ( !v4 || (v5 = (__int64 *)a1[6]) == nullptr && (v10 = BN_secure_new(), (v5 = (__int64 *)v10) == nullptr) ) { v5 = nullptr; v6 = 0; goto LABEL_9; } do { if ( !BN_rand_range(v5, a1[3]) ) { v6 = 0; goto LABEL_9; } } while ( BN_is_zero((__int64)v5) ); v6 = a1[5]; if ( !v6 ) { v6 = BN_new(); if ( !v6 ) goto LABEL_9; } v8 = BN_new(); v9 = v8; if ( !v8 ) goto LABEL_9; BN_with_flags(v8, v5, 4); if ( !(unsigned int)BN_mod_exp(v6, a1[4], v9, a1[2], v4) ) { BN_free(v9); LABEL_9: if ( a1[5] != v6 ) BN_free(v6); v7 = 0; if ( v5 != (__int64 *)a1[6] ) BN_free((__int64)v5); goto LABEL_13; } v11 = v9; v7 = 1; BN_free(v11); a1[6] = (__int64)v5; a1[5] = v6; LABEL_13: BN_CTX_free((void **)v4); return v7; }
GD Web Decomp Icon

GD Web Decomp

Raw Source