// // BN_kronecker from 0x86ff58 to 0x8701d0 (632 bytes) // // 3 xrefs: // > ec_GFp_simple_set_compressed_coordinates @ 0x7f2430 // > BN_mod_sqrt @ 0x87185c // > @ 0x620bc // // 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 // int __fastcall BN_kronecker(int a1, int a2, int ***a3) { int **v6; // r6 int **v7; // r8 int i; // r5 int v10; // r3 int j; // r5 int *v12; // r2 int *v13; // r3 int v14; // r3 int v15; // r3 int **v16; // r3 int is_word; // r7 int savedregs; // [sp+0h] [bp+0h] BN_CTX_start((int)a3); v6 = BN_CTX_get(a3); v7 = BN_CTX_get(a3); if ( !v7 ) { is_word = -2; goto LABEL_40; } if ( !BN_copy((int)v6, a1) || !BN_copy((int)v7, a2) ) goto LABEL_3; if ( !BN_is_zero((int)v7) ) { if ( !BN_is_odd((int)v6) && !BN_is_odd((int)v7) ) { LABEL_45: is_word = 0; goto LABEL_40; } for ( i = 0; !BN_is_bit_set(v7, i); ++i ) ; if ( BN_rshift((int)v7, (int *)v7, i) ) { if ( (i & 1) != 0 ) { v10 = (int)v6[1]; if ( v10 ) v10 = **v6 & 7; is_word = dword_A18E9C[v10]; } else { is_word = 1; } if ( v7[3] ) { v7[3] = nullptr; is_word = (-(v6[3] != nullptr) ^ is_word) + (v6[3] != nullptr); } while ( !BN_is_zero((int)v6) ) { for ( j = 0; !BN_is_bit_set(v6, j); ++j ) ; if ( !BN_rshift((int)v6, (int *)v6, j) ) goto LABEL_3; v12 = v7[1]; if ( (j & 1) != 0 ) { if ( v12 ) v13 = *v7; else v13 = nullptr; if ( v12 ) v13 = (int *)(*v13 & 7); is_word *= dword_A18E9C[(_DWORD)v13]; } v14 = (int)v6[1]; if ( v6[3] ) { if ( v14 ) v14 = ~**v6; else LOBYTE(v14) = -1; } else if ( v14 ) { v14 = **v6; } if ( v12 ) { v15 = (*(_BYTE *)*v7 & 2 & (unsigned __int8)v14) != 0; is_word = (-v15 ^ is_word) + v15; } if ( !BN_nnmod(v7, v7, v6, a3, savedregs) ) goto LABEL_3; v16 = v6; v6[3] = nullptr; v6 = v7; v7 = v16; } if ( BN_is_one((int)v7) ) goto LABEL_40; goto LABEL_45; } LABEL_3: BN_CTX_end(a3); return -2; } is_word = BN_abs_is_word((int)v6, 1); LABEL_40: BN_CTX_end(a3); return is_word; }
GD Web Decomp Icon

GD Web Decomp

Raw Source