{"type": "func", "start": 17353992, "end": 17354136, "name": "ASN1_TYPE_get_octetstring", "pseudocode": "// \n// ASN1_TYPE_get_octetstring from 0x108cd08 to 0x108cd98 (144 bytes)\n// \n// 2 xrefs:\n// > EVP_CIPHER_get_asn1_iv @ 0x1028820\n// > <???> @ 0x9aa38\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:17:16 +0000\n// \n\n__int64 __fastcall ASN1_TYPE_get_octetstring(__int64 a1, void *a2, int a3)\n{\n  __int64 v5; // x0\n  unsigned int v6; // w19\n  unsigned int v7; // w2\n  void *v10; // [xsp+28h] [xbp+28h]\n\n  if ( *(_DWORD *)a1 == 4 && (v5 = *(_QWORD *)(a1 + 8)) != 0 )\n  {\n    v10 = (void *)ASN1_STRING_get0_data(v5);\n    v6 = ASN1_STRING_length(*(unsigned int **)(a1 + 8));\n    v7 = a3;\n    if ( (int)v6 <= a3 )\n      v7 = v6;\n    memcpy(a2, v10, (int)v7);\n    return v6;\n  }\n  else\n  {\n    ERR_put_error(13, 135, 109, (__int64)\"crypto/asn1/evp_asn1.c\", 36);\n    return 0xFFFFFFFFLL;\n  }\n}", "assembly": "; \n; ASN1_TYPE_get_octetstring from 0x108cd08 to 0x108cd98 (144 bytes)\n; \n; 2 xrefs:\n; > EVP_CIPHER_get_asn1_iv @ 0x1028820\n; > <???> @ 0x9aa38\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:17:16 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x108cd08\nMOV             X29, SP                                                ; +0x4, 0x108cd0c\nLDR             W3, [X0]                                               ; +0x8, 0x108cd10\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0xc, 0x108cd14\nCMP             W3, #4                                                 ; +0x10, 0x108cd18\nMOV             X19, X0                                                ; +0x14, 0x108cd1c\nMOV             X20, X1                                                ; +0x18, 0x108cd20\nB.NE            loc_108CD74                                            ; +0x1c, 0x108cd24\nLDR             X0, [X0,#8]                                            ; +0x20, 0x108cd28\nCBZ             X0, loc_108CD74                                        ; +0x24, 0x108cd2c\nSTR             X2, [X29,#0x30+var_10]                                 ; +0x28, 0x108cd30\nBL              ASN1_STRING_get0_data                                  ; +0x2c, 0x108cd34\nSTR             X0, [X29,#0x30+var_8]                                  ; +0x30, 0x108cd38\nLDR             X0, [X19,#8]                                           ; +0x34, 0x108cd3c\nBL              ASN1_STRING_length                                     ; +0x38, 0x108cd40\nMOV             W19, W0                                                ; +0x3c, 0x108cd44\nLDR             X2, [X29,#0x30+var_10]                                 ; +0x40, 0x108cd48\nLDR             X1, [X29,#0x30+var_8]; void *                          ; +0x44, 0x108cd4c\nCMP             W0, W2                                                 ; +0x48, 0x108cd50\nMOV             X0, X20; void *                                        ; +0x4c, 0x108cd54\nCSEL            W2, W19, W2, LE                                        ; +0x50, 0x108cd58\nSXTW            X2, W2; size_t                                         ; +0x54, 0x108cd5c\nBL              .memcpy                                                ; +0x58, 0x108cd60\nMOV             W0, W19                                                ; +0x5c, 0x108cd64\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x60, 0x108cd68\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x64, 0x108cd6c\nRET                                                                    ; +0x68, 0x108cd70\nADRP            X3, #aCryptoAsn1EvpA@PAGE; \"crypto/asn1/evp_asn1.c\"    ; +0x6c, 0x108cd74\nMOV             W0, #0xD                                               ; +0x70, 0x108cd78\nMOV             W1, #0x87                                              ; +0x74, 0x108cd7c\nMOV             W2, #0x6D ; 'm'                                        ; +0x78, 0x108cd80\nADD             X3, X3, #aCryptoAsn1EvpA@PAGEOFF; \"crypto/asn1/evp_asn1.c\" ; +0x7c, 0x108cd84\nMOV             W4, #0x24 ; '$'                                        ; +0x80, 0x108cd88\nBL              ERR_put_error                                          ; +0x84, 0x108cd8c\nMOV             W0, #0xFFFFFFFF                                        ; +0x88, 0x108cd90\nB               loc_108CD68                                            ; +0x8c, 0x108cd94", "xrefs": ["EVP_CIPHER_get_asn1_iv @ 0x1028820", "<???> @ 0x9aa38"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}