// // ASN1_item_ex_free from 0x7c913c to 0x7c9458 (796 bytes) // // 7 xrefs: // > sub_7C5148 @ 0x7c5220 // > sub_7C626C @ 0x7c6a8c // > ASN1_item_ex_d2i @ 0x7c6d28 // > ASN1_item_ex_d2i @ 0x7c7490 // > sub_7C96C0 @ 0x7c9874 // > ASN1_item_ex_new @ 0x7c9cb8 // > @ 0x5ea1c // // 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 ASN1_item_ex_free(_DWORD *result, int a2) { int v2; // r2 _DWORD *v3; // r5 int (__fastcall *v5)(int, _DWORD *, int); // r7 int (__fastcall *v6)(_DWORD *, int); // r3 int v7; // r0 int v8; // r6 bool v9; // cc int v10; // r6 int v11; // r8 int *v12; // r9 int field_ptr; // r0 int choice_selector; // r0 int *v15; // r4 int v16; // r0 int v17; // r6 int *v18; // r6 int v19; // r0 v2 = *(_DWORD *)(a2 + 16); if ( !result ) return result; v3 = result; if ( *(_BYTE *)a2 ) { if ( !*result ) return result; if ( v2 ) goto LABEL_4; switch ( *(_BYTE *)a2 ) { case 1: case 6: v5 = nullptr; LABEL_36: result = (_DWORD *)asn1_do_lock(result, -1, a2); if ( !result ) { asn1_enc_free(v3, a2); v17 = *(_DWORD *)(a2 + 12); v9 = v17 <= 0; v10 = *(_DWORD *)(a2 + 8) + 20 * v17; if ( !v9 ) { LABEL_24: v11 = 0; do { v10 -= 20; ++v11; v12 = (int *)asn1_do_adb(v3, v10, 0); if ( v12 ) { field_ptr = asn1_get_field_ptr(v3, v12); asn1_template_free(field_ptr, v12); } } while ( v11 < *(_DWORD *)(a2 + 12) ); if ( v5 ) LABEL_29: ((void (__fastcall *)(int, _DWORD *, int, _DWORD))v5)(3, v3, a2, 0); } result = (_DWORD *)CRYPTO_free(*v3, "crypto/asn1/tasn_fre.c", 119); *v3 = 0; } break; case 2: LABEL_31: choice_selector = asn1_get_choice_selector(result, a2); if ( choice_selector >= 0 && choice_selector < *(_DWORD *)(a2 + 12) ) { v15 = (int *)(*(_DWORD *)(a2 + 8) + 20 * choice_selector); v16 = asn1_get_field_ptr(v3, v15); asn1_template_free(v16, v15); } LABEL_20: result = (_DWORD *)CRYPTO_free(*v3, "crypto/asn1/tasn_fre.c", 79); *v3 = 0; break; case 5: return asn1_primitive_free(result, a2, 0); default: return result; } } else { if ( v2 ) { LABEL_4: v5 = *(int (__fastcall **)(int, _DWORD *, int))(v2 + 16); if ( v5 ) { switch ( *(_BYTE *)a2 ) { case 0: goto LABEL_11; case 1: case 6: result = (_DWORD *)asn1_do_lock(result, -1, a2); if ( result ) return result; result = (_DWORD *)v5(2, v3, a2); if ( result == (int *)((char *)&dword_0 + 2) ) return result; asn1_enc_free(v3, a2); v8 = *(_DWORD *)(a2 + 12); v9 = v8 <= 0; v10 = *(_DWORD *)(a2 + 8) + 20 * v8; if ( !v9 ) goto LABEL_24; goto LABEL_29; case 2: result = (_DWORD *)((int (__fastcall *)(int, _DWORD *, int, _DWORD))v5)(2, result, a2, 0); if ( result == (int *)((char *)&dword_0 + 2) ) return result; v7 = asn1_get_choice_selector(v3, a2); if ( v7 >= 0 && v7 < *(_DWORD *)(a2 + 12) ) { v18 = (int *)(*(_DWORD *)(a2 + 8) + 20 * v7); v19 = asn1_get_field_ptr(v3, v18); asn1_template_free(v19, v18); } ((void (__fastcall *)(int, _DWORD *, int, _DWORD))v5)(3, v3, a2, 0); goto LABEL_20; case 4: goto LABEL_13; case 5: return asn1_primitive_free(result, a2, 0); default: return result; } } switch ( *(_BYTE *)a2 ) { case 0: goto LABEL_11; case 1: case 6: goto LABEL_36; case 2: goto LABEL_31; case 4: LABEL_13: v6 = *(int (__fastcall **)(_DWORD *, int))(v2 + 8); if ( v6 ) result = (_DWORD *)v6(result, a2); break; case 5: return asn1_primitive_free(result, a2, 0); default: return result; } return result; } LABEL_11: if ( *(_DWORD *)(a2 + 8) ) return (_DWORD *)asn1_template_free((int)result, *(int **)(a2 + 8)); else return asn1_primitive_free(result, a2, 0); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source