// // BN_div_word from 0xffd754 to 0xffd850 (252 bytes) // // 4 xrefs: // > a2d_ASN1_OBJECT @ 0xfe2238 // > BN_bn2dec @ 0xffc164 // > BN_mod_word @ 0xffd8f0 // > @ 0xade78 // // 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:15:52 +0000 // __int64 __fastcall BN_div_word(__int64 a1, __int64 a2) { unsigned __int64 v2; // x20 int v6; // w25 int v7; // w0 int v8; // w24 __int64 v9; // x3 __int64 v10; // x19 __int64 v11; // x21 unsigned __int64 v12; // x24 __int64 v13; // x23 __int64 v14; // x0 if ( !a2 ) return -1; v2 = 0; if ( !*(_DWORD *)(a1 + 8) ) return v2; v6 = 64 - BN_num_bits_word(a2); if ( !(unsigned int)BN_lshift(a1, (__int64 *)a1, v6) ) return -1; v7 = *(_DWORD *)(a1 + 8); v8 = v7 - 1; if ( v7 - 1 >= 0 ) { v9 = *(_QWORD *)a1; v10 = a2 << v6; v11 = 8LL * v8; v12 = 8 * (v8 - (unsigned __int64)(unsigned int)v8) - 8; do { v13 = *(_QWORD *)(v9 + v11); v14 = bn_div_words(v2, v13, v10); v9 = *(_QWORD *)a1; v2 = v13 - v14 * v10; *(_QWORD *)(*(_QWORD *)a1 + v11) = v14; v11 -= 8; } while ( v11 != v12 ); v7 = *(_DWORD *)(a1 + 8); v2 >>= v6; } if ( v7 > 0 && !*(_QWORD *)(*(_QWORD *)a1 + 8LL * v7 - 8) ) *(_DWORD *)(a1 + 8) = v7 - 1; return v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source