// // BN_kronecker from 0x1097778 to 0x10979e8 (624 bytes) // // 3 xrefs: // > ec_GFp_simple_set_compressed_coordinates @ 0x1016af4 // > BN_mod_sqrt @ 0x1099230 // > @ 0x5aa60 // // 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:17:24 +0000 // __int64 __fastcall BN_kronecker(__int64 a1, __int64 a2, int32x2_t *a3) { unsigned __int64 *v6; // x21 __int64 v7; // x22 unsigned int is_word; // w23 int i; // w19 __int64 v11; // x1 int j; // w19 int v13; // w0 int v14; // w2 __int64 v15; // x1 int v16; // w1 unsigned __int64 *v17; // x0 __int64 v18; // x1 BN_CTX_start((unsigned __int64)a3); v6 = (unsigned __int64 *)BN_CTX_get(a3); v7 = BN_CTX_get(a3); if ( !v7 ) { is_word = -2; goto LABEL_8; } if ( !BN_copy(v6, a1) || !BN_copy((unsigned __int64 *)v7, a2) ) { LABEL_3: BN_CTX_end((__int64)a3); return 4294967294LL; } if ( !BN_is_zero(v7) ) { if ( !(unsigned int)BN_is_odd((__int64)v6) && !(unsigned int)BN_is_odd(v7) ) { is_word = 0; goto LABEL_8; } for ( i = 0; !(unsigned int)BN_is_bit_set(v7, i); ++i ) ; if ( (unsigned int)BN_rshift(v7, v7, i) ) { is_word = 1; if ( (i & 1) != 0 ) { v11 = 0; if ( *((_DWORD *)v6 + 2) ) v11 = *(_QWORD *)*v6 & 7LL; is_word = dword_1215A00[v11]; } if ( *(_DWORD *)(v7 + 16) ) { *(_DWORD *)(v7 + 16) = 0; is_word = (is_word ^ -(*((_DWORD *)v6 + 4) != 0)) + (*((_DWORD *)v6 + 4) != 0); } while ( !BN_is_zero((__int64)v6) ) { for ( j = 0; !(unsigned int)BN_is_bit_set((__int64)v6, j); ++j ) ; if ( !(unsigned int)BN_rshift((__int64)v6, (__int64)v6, j) ) goto LABEL_3; if ( (j & 1) != 0 ) { v13 = *(_DWORD *)(v7 + 8); v18 = 0; if ( v13 ) v18 = **(_QWORD **)v7 & 7LL; is_word *= dword_1215A00[v18]; } else { v13 = *(_DWORD *)(v7 + 8); } v14 = *((_DWORD *)v6 + 2); if ( *((_DWORD *)v6 + 4) ) { LOBYTE(v15) = -1; if ( v14 ) v15 = ~*(_QWORD *)*v6; } else { LOBYTE(v15) = 0; if ( v14 ) v15 = *(_QWORD *)*v6; } if ( v13 ) { v16 = (**(_BYTE **)v7 & 2 & (unsigned __int8)v15) != 0; is_word = (-v16 ^ is_word) + v16; } if ( !(unsigned int)BN_nnmod(v7, v7, v6, a3) ) goto LABEL_3; v17 = v6; *((_DWORD *)v6 + 4) = 0; v6 = (unsigned __int64 *)v7; v7 = (__int64)v17; } if ( !(unsigned int)BN_is_one(v7) ) is_word = 0; goto LABEL_8; } goto LABEL_3; } is_word = BN_abs_is_word((__int64)v6, 1); LABEL_8: BN_CTX_end((__int64)a3); return is_word; }