// // ASN1_item_print from 0xe10d80 to 0xe11520 (1952 bytes) // // 3 xrefs: // > PKCS7_print_ctx @ 0xdcc144 // > CMS_ContentInfo_print_ctx @ 0xe1f814 // > @ 0x5afd8 // // 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 // __int64 __fastcall ASN1_item_print(__int64 a1, unsigned int *a2, unsigned int a3, unsigned __int8 *a4, __int64 *a5) { __int64 *v5; // x19 __int64 v9; // x0 const char *v10; // x24 __int64 v11; // x22 __int64 (__fastcall *v12)(__int64, unsigned int **, unsigned __int8 *, __int64 *); // x25 __int64 *v13; // x3 unsigned int (__fastcall *v15)(__int64, unsigned int **, unsigned __int8 *, _QWORD, __int64 *); // x5 int v16; // w0 _QWORD *v17; // x22 __int64 v18; // x24 unsigned int **v19; // x0 bool v20; // cc __int64 *v21; // x0 __int64 v22; // x0 __int64 (__fastcall *v23)(__int64, unsigned int **, _QWORD, char *, __int64 *); // x5 int v24; // w0 int choice_selector; // w2 __int64 v26; // x22 unsigned int *v27; // x24 __int64 *v28; // x25 unsigned __int64 v29; // x22 int v30; // w19 unsigned int **field_ptr; // x0 unsigned int *v32; // x25 unsigned int v33; // w0 signed int v34; // t1 const char *v35; // x0 __int64 v36; // x0 const char *v37; // x1 unsigned int v38; // w0 char *v39; // x20 _BYTE *v40; // x0 _BYTE *v41; // x19 void *v42; // x0 __int64 *v43; // [xsp+60h] [xbp+60h] __int64 *v44; // [xsp+60h] [xbp+60h] __int64 v45; // [xsp+60h] [xbp+60h] unsigned int *v46[2]; // [xsp+68h] [xbp+68h] BYREF __int64 v47; // [xsp+78h] [xbp+78h] BYREF unsigned int v48; // [xsp+80h] [xbp+80h] __int64 *v49; // [xsp+88h] [xbp+88h] char v50[80]; // [xsp+90h] [xbp+90h] BYREF v5 = a5; v46[0] = a2; if ( !a5 ) v5 = (__int64 *)&unk_12397D8; v9 = *v5; v10 = nullptr; if ( (*v5 & 0x100) == 0 ) v10 = *((const char **)a4 + 6); v11 = *((_QWORD *)a4 + 4); if ( v11 ) { v12 = *(__int64 (__fastcall **)(__int64, unsigned int **, unsigned __int8 *, __int64 *))(v11 + 24); if ( v12 ) { v47 = a1; v48 = a3; v49 = v5; } } else { v12 = nullptr; } if ( *a4 ) { if ( v46[0] ) { switch ( *a4 ) { case 1u: case 6u: if ( !(unsigned int)sub_E0FCD4(a1, a3, 0, v10, v5) ) return 0; if ( !v10 ) goto LABEL_25; if ( (*v5 & 2) != 0 ) { if ( (int)BIO_puts(a1, (__int64)" {\n") <= 0 ) return 0; } else if ( (int)BIO_puts(a1, (__int64)&byte_F1AB78) <= 0 ) { return 0; } LABEL_25: if ( v12 ) { v16 = v12(8, v46, a4, &v47); if ( !v16 ) return 0; if ( v16 == 2 ) return 1; } v17 = *((_QWORD **)a4 + 2); if ( *((__int64 *)a4 + 3) <= 0 ) goto LABEL_70; v18 = 1; break; case 2u: choice_selector = asn1_get_choice_selector(v46, (__int64)a4); if ( choice_selector < 0 || choice_selector >= *((_QWORD *)a4 + 3) ) return (int)BIO_printf(a1, "ERROR: selector [%d] invalid\n", choice_selector) > 0; v44 = (__int64 *)(*((_QWORD *)a4 + 2) + 40LL * choice_selector); field_ptr = (unsigned int **)asn1_get_field_ptr(v46, (__int64)v44); return (unsigned int)sub_E0FE14(a1, field_ptr, a3, v44, v5) != 0; case 4u: if ( !(unsigned int)sub_E0FCD4(a1, a3, 0, v10, v5) ) return 0; v22 = *((_QWORD *)a4 + 4); if ( v22 ) { v23 = *(__int64 (__fastcall **)(__int64, unsigned int **, _QWORD, char *, __int64 *))(v22 + 48); if ( v23 ) { v24 = v23(a1, v46, a3, &byte_F288A0, v5); if ( !v24 ) return 0; if ( v24 == 2 ) return (int)BIO_puts(a1, (__int64)&byte_F1AB78) > 0; return 1; } } if ( !v10 ) return 1; return (int)BIO_printf(a1, ":EXTERNAL TYPE %s\n", v10) > 0; case 5u: goto LABEL_17; default: BIO_printf(a1, "Unprocessed type %d\n", *a4); return 0; } while ( 1 ) { v21 = asn1_do_adb(v46, v17, 1); if ( !v21 ) break; v43 = v21; v19 = (unsigned int **)asn1_get_field_ptr(v46, (__int64)v21); if ( !(unsigned int)sub_E0FE14(a1, v19, a3 + 2, v43, v5) ) break; v17 += 5; v20 = v18++ < *((_QWORD *)a4 + 3); if ( !v20 ) { LABEL_70: if ( (*v5 & 2) != 0 && (BIO_printf(a1, "%*s}\n", a3, &byte_F288A0) & 0x80000000) != 0 ) return 0; if ( !v12 ) return 1; return (unsigned int)v12(9, v46, a4, &v47) != 0; } } return 0; } goto LABEL_45; } if ( *((_QWORD *)a4 + 1) != 1 && !v46[0] ) { LABEL_45: if ( (v9 & 1) == 0 ) return 1; if ( (unsigned int)sub_E0FCD4(a1, a3, 0, v10, v5) ) return (int)BIO_puts(a1, (__int64)"\n") > 0; return 0; } v13 = *((__int64 **)a4 + 2); if ( v13 ) return (unsigned int)sub_E0FE14(a1, v46, a3, v13, v5) != 0; LABEL_17: if ( !(unsigned int)sub_E0FCD4(a1, a3, 0, v10, v5) ) return 0; if ( v11 ) { v15 = *(unsigned int (__fastcall **)(__int64, unsigned int **, unsigned __int8 *, _QWORD, __int64 *))(v11 + 56); if ( v15 ) return v15(a1, v46, a4, a3, v5) != 0; } if ( *a4 == 5 ) { v27 = v46[0]; v26 = (int)(v46[0][1] & 0xFFFFFEFF); } else { v26 = *((_QWORD *)a4 + 1); if ( v26 == 1 ) { if ( (*v5 & 8) == 0 ) { v28 = (__int64 *)v46; LABEL_86: LODWORD(v36) = *(_DWORD *)v28; if ( *(_DWORD *)v28 != -1 || (v36 = *((_QWORD *)a4 + 5), v37 = "BOOL ABSENT", (_DWORD)v36 != -1) ) { if ( (_DWORD)v36 ) v37 = "TRUE"; else v37 = "FALSE"; } if ( (int)BIO_puts(a1, (__int64)v37) > 0 ) return (int)BIO_puts(a1, (__int64)&byte_F1AB78) > 0; return 0; } v33 = 1; v27 = nullptr; v28 = (__int64 *)v46; goto LABEL_76; } v27 = v46[0]; } if ( v26 != -4 ) { v28 = (__int64 *)v46; if ( (*v5 & 8) == 0 ) goto LABEL_58; v33 = v26; v28 = (__int64 *)v46; LABEL_76: v35 = ASN1_tag2str(v33); if ( v26 != 5 ) { if ( v35 ) { if ( (int)BIO_puts(a1, (__int64)v35) <= 0 ) return 0; if ( (int)BIO_puts(a1, (__int64)":") <= 0 ) return 0; } goto LABEL_59; } return (int)BIO_puts(a1, (__int64)"NULL\n") > 0; } v32 = v27; v27 = *((unsigned int **)v27 + 1); v34 = *v32; v28 = (__int64 *)(v32 + 2); v33 = v34; v26 = v34; if ( (*v5 & 0x10) == 0 ) goto LABEL_76; LABEL_58: if ( v26 == 5 ) return (int)BIO_puts(a1, (__int64)"NULL\n") > 0; LABEL_59: v29 = v26 + 3; if ( v29 <= 0x1B ) { switch ( (int)v29 ) { case 0: case 19: case 20: return (int)BIO_puts(a1, (__int64)&byte_F1AB78) > 0 && (int)ASN1_parse_dump(a1, *((char **)v27 + 1), (int)*v27, a3, 0) > 0; case 4: goto LABEL_86; case 5: case 13: v40 = i2s_ASN1_INTEGER(0, v27); v41 = v40; if ( !v40 ) return 0; v20 = (int)BIO_puts(a1, (__int64)v40) <= 0; v42 = v41; v30 = !v20; CRYPTO_free(v42, (__int64)"crypto/asn1/tasn_prn.c", 401); goto LABEL_61; case 6: case 7: if ( v27[1] == 3 ) { if ( (int)BIO_printf(a1, " (%ld unused bits)\n", *((_QWORD *)v27 + 2) & 7LL) <= 0 ) return 0; } else if ( (int)BIO_puts(a1, (__int64)&byte_F1AB78) <= 0 ) { return 0; } return (int)*v27 <= 0 || (int)BIO_dump_indent(a1, *((unsigned __int8 **)v27 + 1), *v27, a3 + 2) > 0; case 9: v45 = *v28; v38 = OBJ_obj2nid(*v28); v39 = OBJ_nid2ln(v38); if ( !v39 ) v39 = &byte_F288A0; OBJ_obj2txt(v50, 80, v45, 1); v30 = (int)BIO_printf(a1, "%s (%s)", v39, v50) > 0; goto LABEL_61; case 26: v30 = ASN1_UTCTIME_print(a1, (__int64)v27); goto LABEL_61; case 27: v30 = ASN1_GENERALIZEDTIME_print(a1, (__int64)v27); goto LABEL_61; default: break; } } v30 = ASN1_STRING_print_ex(a1, (int *)v27, v5[4]); LABEL_61: if ( v30 ) return (int)BIO_puts(a1, (__int64)&byte_F1AB78) > 0; return 0; }