// // BN_exp from 0x86cbe8 to 0x86cd74 (396 bytes) // // 1 xrefs: // > @ 0x69cfc // // 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_exp(int a1, int a2, _DWORD *a3, int ***a4) { bool v8; // zf int **v9; // r9 int **v10; // r0 bool v11; // zf int **v12; // r7 int v13; // r4 int v15; // r10 int v16; // r4 int v17; // r0 int v18; // r1 if ( !BN_get_flags((int)a3, 4) ) { BN_CTX_start((int)a4); v8 = a1 == a2; if ( a1 != a2 ) v8 = a1 == (_DWORD)a3; if ( v8 ) v9 = BN_CTX_get(a4); else v9 = (int **)a1; v10 = BN_CTX_get(a4); v11 = v9 == nullptr; if ( v9 ) v11 = v10 == nullptr; v12 = v10; if ( v11 || !BN_copy((int)v10, a2) ) goto LABEL_11; v15 = BN_num_bits(a3); if ( BN_is_odd((int)a3) ) { if ( !BN_copy((int)v9, a2) ) goto LABEL_11; } else if ( !BN_set_word(v9, 1) ) { goto LABEL_11; } if ( v15 <= 1 ) { LABEL_27: if ( (int **)a1 != v9 ) BN_copy(a1, (int)v9); v13 = 1; goto LABEL_12; } v16 = 1; while ( 1 ) { v17 = BN_sqr((int)v12, v12, (int)a4); v18 = v16++; if ( !v17 || BN_is_bit_set(a3, v18) && !BN_mul(v9, v9, v12, (int)a4) ) break; if ( v16 == v15 ) goto LABEL_27; } LABEL_11: v13 = 0; LABEL_12: BN_CTX_end(a4); return v13; } ERR_put_error(3, 123, 66, (int)"crypto/bn/bn_exp.c", 48); return 0; }