// // BN_lebin2bn from 0x7d511c to 0x7d5220 (260 bytes) // // 1 xrefs: // > @ 0x5fcbc // // 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_lebin2bn(int a1, int a2, int *a3) { int *v3; // r8 int v6; // r10 int v7; // r4 int v8; // r3 int v10; // r7 int v11; // r5 int v12; // r9 int v13; // r2 int v14; // r6 int v15; // r3 bool v16; // zf int v17; // r12 int v18; // t1 int v20; // r0 v3 = a3; if ( a3 ) { v6 = 0; } else { v20 = BN_new(); v6 = v20; if ( !v20 ) return nullptr; v3 = (int *)v20; } v7 = a1 + a2; if ( a2 > 0 && !*(_BYTE *)(v7 - 1) ) { v8 = v7 - 1; while ( 1 ) { --a2; v7 = v8; if ( !a2 ) goto LABEL_21; if ( *(_BYTE *)--v8 ) goto LABEL_9; } } if ( !a2 ) { LABEL_21: v12 = (int)v3; v3[1] = 0; return (int *)v12; } LABEL_9: v10 = ((unsigned int)(a2 - 1) >> 2) + 1; v11 = ((_BYTE)a2 - 1) & 3; v12 = bn_wexpand((int)v3, v10); if ( !v12 ) { BN_free(v6); return (int *)v12; } v13 = 0; v14 = v7 - a2; v15 = 0; v3[1] = v10; v3[3] = 0; do { v16 = v11 == 0; v18 = *(unsigned __int8 *)--v7; v17 = v18; if ( !v11 ) v13 = *v3; v15 = v17 | (v15 << 8); if ( v11 ) { --v11; } else { --v10; *(_DWORD *)(v13 + 4 * v10) = v15; } if ( v16 ) { v15 = v11; v11 = 3; } } while ( v7 != v14 ); bn_correct_top(v3); return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source