// // c2i_ASN1_OBJECT from 0x7bdaa8 to 0x7bdce4 (572 bytes) // // 3 xrefs: // > d2i_ASN1_OBJECT @ 0x7bdd50 // > sub_7C46C4 @ 0x7c4ba4 // > @ 0x5e20c // // 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 // _DWORD *__fastcall c2i_ASN1_OBJECT(int *a1, char **a2, signed int a3) { bool v3; // cc char *v4; // r4 int v8; // r3 char *v9; // r12 int v10; // t1 _DWORD *result; // r0 _DWORD *v12; // r4 void *v13; // r12 char *v14; // r8 void *v15; // r0 char *v16; // r5 int v17; // r4 char v18[8]; // [sp+8h] [bp-1Ch] BYREF int v19; // [sp+10h] [bp-14h] signed int v20; // [sp+14h] [bp-10h] char *v21; // [sp+18h] [bp-Ch] int v22; // [sp+1Ch] [bp-8h] v3 = (int)a2 <= 0; if ( a2 ) v3 = a3 <= 0; if ( v3 || (v4 = *a2) == nullptr || v4[a3 - 1] < 0 ) { ERR_put_error(13, 196, 216, "crypto/asn1/a_object.c", 241); return nullptr; } v19 = 0; v22 = 0; v21 = v4; v20 = a3; v8 = OBJ_obj2nid(v18); if ( v8 ) { v17 = OBJ_nid2obj(); if ( a1 ) { ASN1_OBJECT_free((_DWORD *)*a1); *a1 = v17; } *a2 += a3; return (_DWORD *)v17; } else { v9 = v4 - 1; do { v10 = (unsigned __int8)*++v9; if ( v10 == 128 && (!v8 || *(v9 - 1) >= 0) ) { ERR_put_error(13, 196, 216, "crypto/asn1/a_object.c", 271); return nullptr; } ++v8; } while ( a3 > v8 ); if ( !a1 || (v12 = (_DWORD *)*a1) == nullptr || (v12[5] & 1) == 0 ) { v12 = (_DWORD *)ASN1_OBJECT_new(); if ( !v12 ) return nullptr; } v13 = (void *)v12[4]; v14 = *a2; v12[4] = 0; if ( !v13 || a3 > v12[3] ) { v12[3] = 0; CRYPTO_free(v13, "crypto/asn1/a_object.c", 294); v13 = (void *)CRYPTO_malloc(a3, "crypto/asn1/a_object.c", 295); if ( !v13 ) { ERR_put_error(13, 196, 65, "crypto/asn1/a_object.c", 316); if ( !a1 || (_DWORD *)*a1 != v12 ) ASN1_OBJECT_free(v12); return nullptr; } v12[5] |= 8u; } v15 = memcpy(v13, v14, a3); v12[3] = a3; v16 = &v14[a3]; *v12 = 0; v12[1] = 0; v12[4] = v15; result = v12; if ( a1 ) *a1 = (int)v12; *a2 = v16; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source