{"type": "func", "start": 8137368, "end": 8137580, "name": "ASN1_STRING_set", "pseudocode": "// \n// ASN1_STRING_set from 0x7c2a98 to 0x7c2b6c (212 bytes)\n// \n// 33 xrefs:\n// > ASN1_TIME_to_generalizedtime @ 0x7c115c\n// > ASN1_TIME_to_generalizedtime @ 0x7c11d0\n// > ASN1_UTCTIME_set_string @ 0x7c16a0\n// > ASN1_STRING_copy @ 0x7c2b9c\n// > sub_7C46C4 @ 0x7c4ee4\n// > OCSP_crlID_new @ 0x81e5e4\n// > OCSP_url_svcloc_new @ 0x81e800\n// > X509_ATTRIBUTE_set1_data @ 0x83e0ec\n// > X509_NAME_ENTRY_set_data @ 0x847a8c\n// > X509_alias_set1 @ 0x84b174\n// > X509_keyid_set1 @ 0x84b23c\n// > a2i_GENERAL_NAME @ 0x850df0\n// > sub_854B10 @ 0x854d64\n// > sub_854B10 @ 0x854ea0\n// > sub_854B10 @ 0x854fc4\n// > ASN1_BIT_STRING_set @ 0x85faf4\n// > ASN1_GENERALIZEDTIME_set_string @ 0x860f3c\n// > c2i_ASN1_INTEGER @ 0x86193c\n// > c2i_ASN1_INTEGER @ 0x861b20\n// > ASN1_INTEGER_set_int64 @ 0x862148\n// > ASN1_INTEGER_set_uint64 @ 0x8624e4\n// > BN_to_ASN1_INTEGER @ 0x862604\n// > ASN1_ENUMERATED_set_int64 @ 0x862aa0\n// > BN_to_ASN1_ENUMERATED @ 0x862c70\n// > ASN1_mbstring_ncopy @ 0x8633cc\n// > ASN1_OCTET_STRING_set @ 0x863a0c\n// > sub_864F7C @ 0x865410\n// > sub_864F7C @ 0x86572c\n// > PKCS7_add1_attrib_digest @ 0x8bc01c\n// > s2i_ASN1_IA5STRING @ 0x8c4700\n// > PKCS5_pbe2_set_scrypt @ 0x8c75e0\n// > cms_DigestedData_do_final @ 0x8cf400\n// > <???> @ 0x5e47c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nconst char *__fastcall ASN1_STRING_set(signed int *a1, const char *a2, int a3)\n{\n  signed int v3; // r5\n  void *v6; // r7\n  const char *result; // r0\n  int v8; // r0\n\n  v3 = a3;\n  if ( a3 < 0 )\n  {\n    result = a2;\n    if ( !a2 )\n      return result;\n    v3 = strlen(a2);\n  }\n  v6 = (void *)a1[2];\n  if ( v3 >= *a1 || !v6 )\n  {\n    v8 = CRYPTO_realloc(a1[2], v3 + 1, \"crypto/asn1/asn1_lib.c\", 277);\n    a1[2] = v8;\n    if ( !v8 )\n    {\n      ERR_put_error(13, 186, 65, \"crypto/asn1/asn1_lib.c\", 279);\n      a1[2] = (signed int)v6;\n      return nullptr;\n    }\n    v6 = (void *)v8;\n  }\n  *a1 = v3;\n  if ( !a2 )\n    return (_BYTE *)(&dword_0 + 1);\n  memcpy(v6, a2, v3);\n  result = (_BYTE *)(&dword_0 + 1);\n  *(_BYTE *)(a1[2] + v3) = 0;\n  return result;\n}", "assembly": "; \n; ASN1_STRING_set from 0x7c2a98 to 0x7c2b6c (212 bytes)\n; \n; 33 xrefs:\n; > ASN1_TIME_to_generalizedtime @ 0x7c115c\n; > ASN1_TIME_to_generalizedtime @ 0x7c11d0\n; > ASN1_UTCTIME_set_string @ 0x7c16a0\n; > ASN1_STRING_copy @ 0x7c2b9c\n; > sub_7C46C4 @ 0x7c4ee4\n; > OCSP_crlID_new @ 0x81e5e4\n; > OCSP_url_svcloc_new @ 0x81e800\n; > X509_ATTRIBUTE_set1_data @ 0x83e0ec\n; > X509_NAME_ENTRY_set_data @ 0x847a8c\n; > X509_alias_set1 @ 0x84b174\n; > X509_keyid_set1 @ 0x84b23c\n; > a2i_GENERAL_NAME @ 0x850df0\n; > sub_854B10 @ 0x854d64\n; > sub_854B10 @ 0x854ea0\n; > sub_854B10 @ 0x854fc4\n; > ASN1_BIT_STRING_set @ 0x85faf4\n; > ASN1_GENERALIZEDTIME_set_string @ 0x860f3c\n; > c2i_ASN1_INTEGER @ 0x86193c\n; > c2i_ASN1_INTEGER @ 0x861b20\n; > ASN1_INTEGER_set_int64 @ 0x862148\n; > ASN1_INTEGER_set_uint64 @ 0x8624e4\n; > BN_to_ASN1_INTEGER @ 0x862604\n; > ASN1_ENUMERATED_set_int64 @ 0x862aa0\n; > BN_to_ASN1_ENUMERATED @ 0x862c70\n; > ASN1_mbstring_ncopy @ 0x8633cc\n; > ASN1_OCTET_STRING_set @ 0x863a0c\n; > sub_864F7C @ 0x865410\n; > sub_864F7C @ 0x86572c\n; > PKCS7_add1_attrib_digest @ 0x8bc01c\n; > s2i_ASN1_IA5STRING @ 0x8c4700\n; > PKCS5_pbe2_set_scrypt @ 0x8c75e0\n; > cms_DigestedData_do_final @ 0x8cf400\n; > <???> @ 0x5e47c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R4-R9,LR}                                             ; +0x0, 0x7c2a98\nSUBS            R5, R2, #0                                             ; +0x4, 0x7c2a9c\nSUB             SP, SP, #0xC                                           ; +0x8, 0x7c2aa0\nMOV             R6, R0                                                 ; +0xc, 0x7c2aa4\nMOV             R4, R1                                                 ; +0x10, 0x7c2aa8\nBLT             loc_7C2B58                                             ; +0x14, 0x7c2aac\nLDR             R3, [R6]                                               ; +0x18, 0x7c2ab0\nLDR             R7, [R6,#8]                                            ; +0x1c, 0x7c2ab4\nCMP             R5, R3                                                 ; +0x20, 0x7c2ab8\nBGE             loc_7C2B00                                             ; +0x24, 0x7c2abc\nCMP             R7, #0                                                 ; +0x28, 0x7c2ac0\nBEQ             loc_7C2B00                                             ; +0x2c, 0x7c2ac4\nCMP             R4, #0                                                 ; +0x30, 0x7c2ac8\nSTR             R5, [R6]                                               ; +0x34, 0x7c2acc\nMOVEQ           R0, #1                                                 ; +0x38, 0x7c2ad0\nBEQ             loc_7C2AF8                                             ; +0x3c, 0x7c2ad4\nMOV             R2, R5; size_t                                         ; +0x40, 0x7c2ad8\nMOV             R0, R7; void *                                         ; +0x44, 0x7c2adc\nMOV             R1, R4; void *                                         ; +0x48, 0x7c2ae0\nBL              memcpy                                                 ; +0x4c, 0x7c2ae4\nLDR             R3, [R6,#8]                                            ; +0x50, 0x7c2ae8\nMOV             R2, #0                                                 ; +0x54, 0x7c2aec\nMOV             R0, #1                                                 ; +0x58, 0x7c2af0\nSTRB            R2, [R3,R5]                                            ; +0x5c, 0x7c2af4\nADD             SP, SP, #0xC                                           ; +0x60, 0x7c2af8\nPOP             {R4-R9,PC}                                             ; +0x64, 0x7c2afc\nLDR             R9, =(aCryptoAsn1Asn1 - 0x7C2B10); \"crypto/asn1/asn1_lib.c\" ; +0x68, 0x7c2b00\nMOV             R0, R7                                                 ; +0x6c, 0x7c2b04\nADD             R9, PC, R9; \"crypto/asn1/asn1_lib.c\"                   ; +0x70, 0x7c2b08\nMOV             R2, R9                                                 ; +0x74, 0x7c2b0c\nADD             R1, R5, #1                                             ; +0x78, 0x7c2b10\nLDR             R3, =0x115                                             ; +0x7c, 0x7c2b14\nBL              CRYPTO_realloc                                         ; +0x80, 0x7c2b18\nCMP             R0, #0                                                 ; +0x84, 0x7c2b1c\nMOV             R8, R0                                                 ; +0x88, 0x7c2b20\nSTR             R0, [R6,#8]                                            ; +0x8c, 0x7c2b24\nMOVNE           R7, R0                                                 ; +0x90, 0x7c2b28\nBNE             loc_7C2AC8                                             ; +0x94, 0x7c2b2c\nLDR             R2, =0x117                                             ; +0x98, 0x7c2b30\nSTR             R2, [SP,#0xC+var_C]                                    ; +0x9c, 0x7c2b34\nMOV             R0, #0xD                                               ; +0xa0, 0x7c2b38\nMOV             R3, R9                                                 ; +0xa4, 0x7c2b3c\nMOV             R1, #0xBA                                              ; +0xa8, 0x7c2b40\nMOV             R2, #0x41 ; 'A'                                        ; +0xac, 0x7c2b44\nBL              ERR_put_error                                          ; +0xb0, 0x7c2b48\nSTR             R7, [R6,#8]                                            ; +0xb4, 0x7c2b4c\nMOV             R0, R8                                                 ; +0xb8, 0x7c2b50\nB               loc_7C2AF8                                             ; +0xbc, 0x7c2b54\nSUBS            R0, R1, #0; char *                                     ; +0xc0, 0x7c2b58\nBEQ             loc_7C2AF8                                             ; +0xc4, 0x7c2b5c\nBL              strlen                                                 ; +0xc8, 0x7c2b60\nMOV             R5, R0                                                 ; +0xcc, 0x7c2b64\nB               loc_7C2AB0                                             ; +0xd0, 0x7c2b68", "xrefs": ["ASN1_TIME_to_generalizedtime @ 0x7c115c", "ASN1_TIME_to_generalizedtime @ 0x7c11d0", "ASN1_UTCTIME_set_string @ 0x7c16a0", "ASN1_STRING_copy @ 0x7c2b9c", "sub_7C46C4 @ 0x7c4ee4", "OCSP_crlID_new @ 0x81e5e4", "OCSP_url_svcloc_new @ 0x81e800", "X509_ATTRIBUTE_set1_data @ 0x83e0ec", "X509_NAME_ENTRY_set_data @ 0x847a8c", "X509_alias_set1 @ 0x84b174", "X509_keyid_set1 @ 0x84b23c", "a2i_GENERAL_NAME @ 0x850df0", "sub_854B10 @ 0x854d64", "sub_854B10 @ 0x854ea0", "sub_854B10 @ 0x854fc4", "ASN1_BIT_STRING_set @ 0x85faf4", "ASN1_GENERALIZEDTIME_set_string @ 0x860f3c", "c2i_ASN1_INTEGER @ 0x86193c", "c2i_ASN1_INTEGER @ 0x861b20", "ASN1_INTEGER_set_int64 @ 0x862148", "ASN1_INTEGER_set_uint64 @ 0x8624e4", "BN_to_ASN1_INTEGER @ 0x862604", "ASN1_ENUMERATED_set_int64 @ 0x862aa0", "BN_to_ASN1_ENUMERATED @ 0x862c70", "ASN1_mbstring_ncopy @ 0x8633cc", "ASN1_OCTET_STRING_set @ 0x863a0c", "sub_864F7C @ 0x865410", "sub_864F7C @ 0x86572c", "PKCS7_add1_attrib_digest @ 0x8bc01c", "s2i_ASN1_IA5STRING @ 0x8c4700", "PKCS5_pbe2_set_scrypt @ 0x8c75e0", "cms_DigestedData_do_final @ 0x8cf400", "<???> @ 0x5e47c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}