// // ASN1_INTEGER_set_int64 from 0x8620f8 to 0x86223c (324 bytes) // // 3 xrefs: // > ASN1_INTEGER_set @ 0x862558 // > PKCS5_pbe2_set_scrypt @ 0x8c76d8 // > @ 0x6989c // // 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 // const char *__fastcall ASN1_INTEGER_set_int64(signed int *a1, __int64 a2) { unsigned int v3; // r7 int v4; // r12 __int64 v6; // r4 unsigned int v7; // r3 unsigned int v8; // lr int j; // r1 unsigned int v10; // r2 char *v11; // r1 __int64 v12; // r4 unsigned __int64 v13; // kr00_8 int i; // r2 unsigned int v15; // r1 char *v16; // r2 char v17[12]; // [sp+0h] [bp-Ch] BYREF v3 = HIDWORD(a2); a1[1] = 2; if ( a2 < 0 ) { if ( -a2 >= 256 ) { v12 = -a2; v13 = -a2; for ( i = 0; ; ++i ) { v15 = v12 >> 8; HIDWORD(v12) >>= 8; LODWORD(v12) = v15; v4 = i + 1; if ( !__PAIR64__(HIDWORD(v12), v15) ) break; } v16 = &v17[i]; do { *v16-- = v13; v13 >>= 8; } while ( v16 >= v17 ); } else { v4 = 1; v17[0] = -(char)a2; } a1[1] = 258; } else { if ( a2 >= 256 ) { v6 = a2; v7 = a2; v8 = v3; for ( j = 0; ; ++j ) { v10 = v6 >> 8; HIDWORD(v6) >>= 8; LODWORD(v6) = v10; v4 = j + 1; if ( !__PAIR64__(HIDWORD(v6), v10) ) break; } v11 = &v17[j]; do { *v11-- = v7; v7 = (v7 >> 8) | (v8 << 24); v8 >>= 8; } while ( v11 >= v17 ); } else { v4 = 1; v17[0] = a2; } a1[1] = 2; } if ( v4 ) return ASN1_STRING_set(a1, v17, v4); else return nullptr; }