// // ASN1_item_ex_i2d from 0x9dc6ec to 0x9dcb1c (1072 bytes) // // 17 xrefs: // > ASN1_item_ndef_i2d @ 0x9dcb58 // > ASN1_item_ndef_i2d @ 0x9dcb78 // > ASN1_item_ndef_i2d @ 0x9dcbbc // > sub_9DCBD0 @ 0x9dccc4 // > sub_9DCBD0 @ 0x9dcd04 // > sub_9DCBD0 @ 0x9dcd64 // > sub_9DCBD0 @ 0x9dce34 // > sub_9DCBD0 @ 0x9dced4 // > sub_9DCBD0 @ 0x9dd014 // > ASN1_item_i2d @ 0x9dd194 // > ASN1_item_i2d @ 0x9dd1b4 // > ASN1_item_i2d @ 0x9dd1f8 // > sub_A5E470 @ 0xa5e7d8 // > sub_A5E470 @ 0xa5e86c // > sub_A5E8C8 @ 0xa5e9d0 // > sub_A5E8C8 @ 0xa5ea0c // > @ 0x7854c // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:07:17 +0000 // int __fastcall ASN1_item_ex_i2d(size_t **a1, int *a2, unsigned __int8 *a3, int a4, int a5) { int v6; // r2 int v10; // r3 int (__fastcall *v11)(int, size_t **, unsigned __int8 *, _DWORD); // r6 int result; // r0 int choice_selector; // r0 int v14; // r3 int v15; // r0 int v16; // r5 int v17; // r7 int v18; // r0 bool v19; // cc int v20; // r0 int v21; // r3 int v22; // r0 int field_ptr; // r0 int v24; // r1 int v25; // r0 bool v26; // zf int v27; // r7 int v28; // r5 int v29; // r9 int v30; // r0 int v31; // r0 int v32; // [sp+Ch] [bp-18h] int v33; // [sp+10h] [bp-14h] int v34; // [sp+1Ch] [bp-8h] BYREF v6 = *a3; v10 = *((_DWORD *)a3 + 4); if ( !v6 ) { if ( !v10 || *(_DWORD *)(v10 + 16) ) { LABEL_8: if ( *((_DWORD *)a3 + 2) ) return sub_9DCBD0(a1); else return sub_9DC2B4(a1, a2, a3, a4, a5); } goto LABEL_14; } if ( !*a1 ) return 0; if ( !v10 || (v11 = *(int (__fastcall **)(int, size_t **, unsigned __int8 *, _DWORD))(v10 + 16)) == nullptr ) { LABEL_14: switch ( v6 ) { case 0: goto LABEL_8; case 1: v11 = nullptr; v33 = 1; goto LABEL_21; case 2: choice_selector = asn1_get_choice_selector(a1, a3); if ( choice_selector < 0 || choice_selector >= *((_DWORD *)a3 + 3) ) return 0; LABEL_44: field_ptr = asn1_get_field_ptr(a1, *((_DWORD *)a3 + 2) + 20 * choice_selector); return sub_9DCBD0(field_ptr); case 4: return (*(int (__fastcall **)(size_t **, int *, unsigned __int8 *, int, int))(v10 + 20))(a1, a2, a3, a4, a5); case 5: return sub_9DC2B4(a1, a2, a3, -1, a5); case 6: v11 = nullptr; LABEL_17: if ( (a5 & 0x800) != 0 ) v14 = 2; else v14 = 1; v33 = v14; LABEL_21: v15 = asn1_enc_restore(&v34, a2, a1, a3); v32 = v15; if ( v15 < 0 ) return 0; if ( v15 ) return v34; v34 = 0; if ( a4 == -1 ) { a4 = 16; LOBYTE(a5) = a5 & 0x3F; } if ( v11 && !v11(6, a1, a3, 0) ) return 0; v16 = *((_DWORD *)a3 + 2); if ( *((int *)a3 + 3) <= 0 ) { v24 = v34; } else { v17 = v32; do { v22 = asn1_do_adb(a1, v16, 1); ++v17; v16 += 20; if ( !v22 ) return 0; v18 = asn1_get_field_ptr(a1, v22); result = sub_9DCBD0(v18); if ( result == -1 ) return result; v19 = result <= 0x7FFFFFFF - v34; v20 = result + v34; if ( !v19 ) return -1; v21 = *((_DWORD *)a3 + 3); v34 = v20; } while ( v21 > v17 ); v24 = v20; } v25 = ASN1_object_size(v33, v24, a4); v26 = v25 == -1; if ( v25 != -1 ) v26 = a2 == nullptr; v27 = v25; if ( v26 ) return v27; ASN1_put_object((_BYTE **)a2, v33, v34, a4, a5); v28 = *((_DWORD *)a3 + 2); if ( *((int *)a3 + 3) <= 0 ) goto LABEL_56; v29 = v32; break; default: return 0; } while ( 1 ) { v31 = asn1_do_adb(a1, v28, 1); ++v29; v28 += 20; if ( !v31 ) break; v30 = asn1_get_field_ptr(a1, v31); sub_9DCBD0(v30); if ( *((_DWORD *)a3 + 3) <= v29 ) { LABEL_56: if ( v33 == 2 ) ASN1_put_eoc(a2); if ( !v11 || v11(7, a1, a3, 0) ) return v27; return 0; } } return 0; } switch ( v6 ) { case 1: v33 = 1; goto LABEL_21; case 2: if ( !v11(6, a1, a3, 0) ) return 0; choice_selector = asn1_get_choice_selector(a1, a3); if ( choice_selector >= 0 && choice_selector < *((_DWORD *)a3 + 3) ) goto LABEL_44; v11(7, a1, a3, 0); result = 0; break; case 4: return (*(int (__fastcall **)(size_t **, int *, unsigned __int8 *, int, int))(v10 + 20))(a1, a2, a3, a4, a5); case 5: return sub_9DC2B4(a1, a2, a3, -1, a5); case 6: goto LABEL_17; default: return 0; } return result; }