// // a2d_ASN1_OBJECT from 0xfe1ae0 to 0xfe238c (2220 bytes) // // 3 xrefs: // > OBJ_txt2obj @ 0x1040d50 // > OBJ_txt2obj @ 0x1040dc4 // > @ 0x674f8 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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 13:15:38 +0000 // __int64 __fastcall a2d_ASN1_OBJECT(__int64 a1, int a2, char *a3, int a4) { __int64 result; // x0 int v7; // s10 int v8; // w27 char *v9; // x21 int v10; // w0 int v11; // s8 int v12; // s13 __int64 v13; // x22 _BYTE *v14; // x24 unsigned __int64 v15; // x0 unsigned __int64 v16; // x19 int v17; // w25 int v18; // w28 int v19; // t1 int v20; // w20 _BYTE *v21; // x0 int v22; // w1 char v23; // w2 signed int v24; // w6 unsigned __int64 v25; // x7 __int64 v26; // x3 char v27; // w2 int v28; // w0 unsigned int v29; // w9 int v30; // w2 char v31; // w2 int v32; // w12 char v33; // w7 char v34; // w7 char v35; // w7 char v36; // w7 char v37; // w7 char v38; // w7 char v39; // w7 char v40; // w7 char v41; // w7 char v42; // w7 char v43; // w7 char v44; // w7 char v45; // w7 int v46; // w11 unsigned int v47; // w7 int v48; // w12 int8x16_t *v49; // x1 int8x16_t *v50; // x3 unsigned int v51; // w8 int8x16_t v52; // q0 int8x16_t v53; // q2 int v54; // w7 int v55; // w3 int v56; // w6 int v57; // w2 int v58; // w19 __int64 v59; // x20 __int64 v60; // x19 __int64 v61; // x0 __int64 v62; // x1 char *v63; // [xsp+A8h] [xbp+A8h] _BYTE v64[24]; // [xsp+B8h] [xbp+B8h] BYREF result = 0; if ( !a4 ) return result; if ( a4 != -1 ) { v7 = (unsigned __int8)*a3 - 48; if ( (unsigned int)v7 <= 2 ) goto LABEL_4; LABEL_87: v13 = 0; ERR_put_error(13, 100, 122, "crypto/asn1/a_object.c", 61); goto LABEL_80; } v63 = a3; a4 = strlen(a3); a3 = v63; v7 = (unsigned __int8)*v63 - 48; if ( (unsigned int)v7 > 2 ) goto LABEL_87; LABEL_4: if ( a4 <= 1 ) { v13 = 0; ERR_put_error(13, 100, 138, "crypto/asn1/a_object.c", 66); goto LABEL_80; } v8 = a4 - 2; v9 = a3 + 2; v10 = (unsigned __int8)a3[1]; if ( a4 == 2 ) { v13 = 0; v11 = 0; goto LABEL_112; } if ( v10 != 32 && v10 != 46 ) { v13 = 0; v14 = v64; goto LABEL_77; } v11 = 0; v12 = 24; v13 = 0; v14 = v64; v15 = (unsigned __int64)"crypto/asn1/a_object.c"; while ( 2 ) { v16 = 0; v17 = 0; while ( 1 ) { v19 = (unsigned __int8)*v9++; v18 = v19; --v8; if ( v19 == 46 || v18 == 32 ) break; v20 = v18 - 48; if ( (unsigned int)(v18 - 48) > 9 ) { ERR_put_error(13, 100, 130, "crypto/asn1/a_object.c", 88); goto LABEL_78; } if ( v16 > 0x1999999999999990LL && !v17 ) { if ( !v13 ) { v13 = BN_new(v15); if ( !v13 ) goto LABEL_78; } if ( !(unsigned int)BN_set_word(v13, v16) ) goto LABEL_78; v17 = 1; goto LABEL_18; } if ( v17 ) { LABEL_18: if ( !(unsigned int)BN_mul_word(v13, 10) ) goto LABEL_78; v15 = BN_add_word(v13, v20); if ( !(_DWORD)v15 ) goto LABEL_78; if ( !v8 ) break; } else { v16 = v20 + 10 * v16; if ( !v8 ) break; } } if ( v11 ) { if ( !v17 ) goto LABEL_25; LABEL_91: v58 = (int)(BN_num_bits(v13) + 6) / 7; if ( v58 <= v12 ) { if ( !v58 ) { v22 = 0; goto LABEL_27; } } else { if ( v14 != v64 ) CRYPTO_free(v14, "crypto/asn1/a_object.c", 124); v12 = v58 + 32; v14 = (_BYTE *)CRYPTO_malloc(v58 + 32, "crypto/asn1/a_object.c", 126); if ( !v14 ) goto LABEL_79; } v59 = 0; v60 = (unsigned int)(v58 - 1) + 1LL; while ( 1 ) { v61 = BN_div_word(v13, 128); v22 = v59 + 1; if ( v61 == -1 ) break; v14[v59++] = v61; if ( v59 == v60 ) goto LABEL_27; } LABEL_78: if ( v14 == v64 ) { LABEL_80: BN_free(v13); return 0; } LABEL_79: CRYPTO_free(v14, "crypto/asn1/a_object.c", 163); goto LABEL_80; } if ( v16 > 0x27 && v7 <= 1 ) { ERR_put_error(13, 100, 147, "crypto/asn1/a_object.c", 108); goto LABEL_78; } v16 += 40LL * v7; if ( v17 ) { if ( !(unsigned int)BN_add_word(v13, 40 * v7) ) goto LABEL_78; goto LABEL_91; } LABEL_25: v21 = v14; v22 = 0; do { v23 = v16 & 0x7F; v16 >>= 7; *v21++ = v23; ++v22; } while ( v16 ); LABEL_27: v15 = (unsigned int)(v11 + v22); if ( !a1 ) { v11 += v22; goto LABEL_72; } if ( (int)v15 > a2 ) { ERR_put_error(13, 100, 107, "crypto/asn1/a_object.c", 148); goto LABEL_78; } v24 = v22 - 1; v15 = (unsigned int)v11; if ( v22 - 1 > 0 ) { v25 = a1 + v11; if ( ((unsigned __int64)&v14[v22 - (unsigned __int64)(unsigned int)v24] >= a1 + (unsigned __int64)(unsigned int)v24 + v11 || v25 >= (unsigned __int64)&v14[v22]) && (unsigned int)v24 > 0x14 ) { if ( v24 > (((_BYTE)v14 + (_BYTE)v22 - 16) & 0xFu) ) v26 = ((_BYTE)v14 + (_BYTE)v22 - 16) & 0xF; else v26 = (unsigned int)(v22 - 1); if ( !(_DWORD)v26 ) { v30 = v11; v29 = v22 - 2; v28 = v11 + 1; goto LABEL_51; } v27 = v14[v24]; v28 = v11 + 1; v24 = v22 - 2; *(_BYTE *)(a1 + v11) = v27 | 0x80; v29 = v22 - 2; v30 = v11 + 1; if ( (_DWORD)v26 != 1 ) { v31 = v14[v24]; v32 = v11 + 2; v24 = v22 - 3; *(_BYTE *)(a1 + v28) = v31 | 0x80; if ( (_DWORD)v26 == 2 ) goto LABEL_101; v33 = v14[v24]; v30 = v11 + 3; v24 = v22 - 4; *(_BYTE *)(a1 + v32) = v33 | 0x80; if ( (_DWORD)v26 != 3 ) { v34 = v14[v24]; v32 = v11 + 4; v24 = v22 - 5; *(_BYTE *)(a1 + v30) = v34 | 0x80; if ( (_DWORD)v26 == 4 ) goto LABEL_101; v35 = v14[v24]; v30 = v11 + 5; v24 = v22 - 6; *(_BYTE *)(a1 + v32) = v35 | 0x80; if ( (_DWORD)v26 != 5 ) { v36 = v14[v24]; v32 = v11 + 6; v24 = v22 - 7; *(_BYTE *)(a1 + v30) = v36 | 0x80; if ( (_DWORD)v26 == 6 ) goto LABEL_101; v37 = v14[v24]; v30 = v11 + 7; v24 = v22 - 8; *(_BYTE *)(a1 + v32) = v37 | 0x80; if ( (_DWORD)v26 != 7 ) { v38 = v14[v24]; v32 = v11 + 8; v24 = v22 - 9; *(_BYTE *)(a1 + v30) = v38 | 0x80; if ( (_DWORD)v26 == 8 ) goto LABEL_101; v39 = v14[v24]; v30 = v11 + 9; v24 = v22 - 10; *(_BYTE *)(a1 + v32) = v39 | 0x80; if ( (_DWORD)v26 != 9 ) { v40 = v14[v24]; v32 = v11 + 10; v24 = v22 - 11; *(_BYTE *)(a1 + v30) = v40 | 0x80; if ( (_DWORD)v26 == 10 ) goto LABEL_101; v41 = v14[v24]; v30 = v11 + 11; v24 = v22 - 12; *(_BYTE *)(a1 + v32) = v41 | 0x80; if ( (_DWORD)v26 != 11 ) { v42 = v14[v24]; v32 = v11 + 12; v24 = v22 - 13; *(_BYTE *)(a1 + v30) = v42 | 0x80; if ( (_DWORD)v26 == 12 ) goto LABEL_101; v43 = v14[v24]; v30 = v11 + 13; v24 = v22 - 14; *(_BYTE *)(a1 + v32) = v43 | 0x80; if ( (_DWORD)v26 != 13 ) { v44 = v14[v24]; v32 = v11 + 14; v24 = v22 - 15; *(_BYTE *)(a1 + v30) = v44 | 0x80; if ( (_DWORD)v26 == 15 ) { v45 = v14[v24]; v30 = v11 + 15; v24 = v22 - 16; *(_BYTE *)(a1 + v32) = v45 | 0x80; goto LABEL_51; } LABEL_101: v30 = v32; } } } } } } } LABEL_51: v46 = v22 - 1 - v26; v47 = ((unsigned int)(v46 - 16) >> 4) + 1; v48 = 16 * v47; if ( v29 - (unsigned int)v26 <= 0xE ) goto LABEL_119; v49 = (int8x16_t *)&v14[v22 - 16LL - v26]; v50 = (int8x16_t *)(a1 + v26 + v11); v51 = 0; do { v52 = *v49; v53.n128_u64[0] = 0x8080808080808080LL; v53.n128_u64[1] = 0x8080808080808080LL; ++v51; --v49; *v50++ = vorrq_s8(vqtbl1q_s8(v52, (int8x16_t)xmmword_FE2390), v53); } while ( v51 < v47 ); v30 += v48; v24 -= v48; if ( v46 != v48 ) { LABEL_119: *(_BYTE *)(a1 + v30) = v14[v24] | 0x80; if ( v24 - 1 > 0 ) { *(_BYTE *)(a1 + v30 + 1) = v14[v24 - 1] | 0x80; if ( v24 != 2 ) { *(_BYTE *)(a1 + v30 + 2) = v14[v24 - 2] | 0x80; if ( v24 != 3 ) { *(_BYTE *)(a1 + v30 + 3) = v14[v24 - 3] | 0x80; if ( v24 != 4 ) { *(_BYTE *)(a1 + v30 + 4) = v14[v24 - 4] | 0x80; if ( v24 != 5 ) { *(_BYTE *)(a1 + v30 + 5) = v14[v24 - 5] | 0x80; if ( v24 != 6 ) { *(_BYTE *)(a1 + v30 + 6) = v14[v24 - 6] | 0x80; if ( v24 != 7 ) { *(_BYTE *)(a1 + v30 + 7) = v14[v24 - 7] | 0x80; if ( v24 != 8 ) { *(_BYTE *)(a1 + v30 + 8) = v14[v24 - 8] | 0x80; if ( v24 != 9 ) { *(_BYTE *)(a1 + v30 + 9) = v14[v24 - 9] | 0x80; if ( v24 != 10 ) { *(_BYTE *)(a1 + v30 + 10) = v14[v24 - 10] | 0x80; if ( v24 != 11 ) { *(_BYTE *)(a1 + v30 + 11) = v14[v24 - 11] | 0x80; if ( v24 != 12 ) { v54 = v24 - 13; v55 = v30 + 13; *(_BYTE *)(a1 + v30 + 12) = v14[v24 - 12] | 0x80; if ( v24 != 13 ) { v56 = v24 - 14; v57 = v30 + 14; *(_BYTE *)(a1 + v55) = v14[v54] | 0x80; if ( v56 ) *(_BYTE *)(a1 + v57) = v14[v56] | 0x80; } } } } } } } } } } } } } } } else { v29 = v22 - 2; v62 = 0; do { *(_BYTE *)(v25 + v62) = v14[v24 - v62] | 0x80; ++v62; } while ( v62 != v29 + 1LL ); v28 = v11 + 1; } v15 = v28 + v29; } *(_BYTE *)(a1 + (int)v15) = *v14; v11 = v15 + 1; LABEL_72: if ( v8 ) { if ( v18 != 32 && v18 != 46 ) { LABEL_77: ERR_put_error(13, 100, 131, "crypto/asn1/a_object.c", 75); goto LABEL_78; } continue; } break; } if ( v14 != v64 ) CRYPTO_free(v14, "crypto/asn1/a_object.c", 158); LABEL_112: BN_free(v13); return (unsigned int)v11; }
GD Web Decomp Icon

GD Web Decomp

Raw Source