{"type": "func", "start": 8409980, "end": 8410268, "name": "EVP_PKEY_set_type_str", "pseudocode": "// \n// EVP_PKEY_set_type_str from 0x80537c to 0x80549c (288 bytes)\n// \n// 2 xrefs:\n// > PEM_read_bio_Parameters @ 0x8237c4\n// > <???> @ 0x63adc\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\nint __fastcall EVP_PKEY_set_type_str(_DWORD *a1, char *a2, size_t a3)\n{\n  int v6; // r3\n  void (*v7)(void); // r3\n  int *str; // r5\n  int v9; // r1\n  int v10; // r2\n  int v12[2]; // [sp+Ch] [bp-8h] BYREF\n\n  v12[0] = 0;\n  if ( a1 )\n  {\n    if ( a1[5] )\n    {\n      v6 = a1[3];\n      if ( v6 )\n      {\n        v7 = *(void (**)(void))(v6 + 88);\n        if ( v7 )\n        {\n          v7();\n          a1[5] = 0;\n        }\n      }\n      ENGINE_finish(a1[4]);\n      a1[4] = 0;\n    }\n    if ( !a1[1] && a1[3] )\n      return 1;\n    ENGINE_finish(a1[4]);\n    a1[4] = 0;\n  }\n  if ( a2 )\n    str = (int *)EVP_PKEY_asn1_find_str(v12, a2, a3);\n  else\n    str = (int *)EVP_PKEY_asn1_find(v12, 0);\n  if ( a1 )\n  {\n    if ( str )\n    {\n      v9 = *str;\n      v10 = v12[0];\n      a1[3] = str;\n      *a1 = v9;\n      a1[4] = v10;\n      a1[1] = 0;\n      return 1;\n    }\n  }\n  else\n  {\n    ENGINE_finish(v12[0]);\n    if ( str )\n      return 1;\n  }\n  ERR_put_error(6, 158, 156, (int)\"crypto/evp/p_lib.c\", 204);\n  return 0;\n}", "assembly": "; \n; EVP_PKEY_set_type_str from 0x80537c to 0x80549c (288 bytes)\n; \n; 2 xrefs:\n; > PEM_read_bio_Parameters @ 0x8237c4\n; > <???> @ 0x63adc\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-R7,LR}                                             ; +0x0, 0x80537c\nMOV             R5, #0                                                 ; +0x4, 0x805380\nSUB             SP, SP, #0x14                                          ; +0x8, 0x805384\nSUBS            R4, R0, #0                                             ; +0xc, 0x805388\nMOV             R6, R1                                                 ; +0x10, 0x80538c\nMOV             R7, R2                                                 ; +0x14, 0x805390\nSTR             R5, [SP,#0x14+var_8]                                   ; +0x18, 0x805394\nBEQ             loc_8053F4                                             ; +0x1c, 0x805398\nLDR             R3, [R4,#0x14]                                         ; +0x20, 0x80539c\nCMP             R3, R5                                                 ; +0x24, 0x8053a0\nBEQ             loc_8053D8                                             ; +0x28, 0x8053a4\nLDR             R3, [R4,#0xC]                                          ; +0x2c, 0x8053a8\nCMP             R3, R5                                                 ; +0x30, 0x8053ac\nBEQ             loc_8053C8                                             ; +0x34, 0x8053b0\nLDR             R3, [R3,#0x58]                                         ; +0x38, 0x8053b4\nCMP             R3, R5                                                 ; +0x3c, 0x8053b8\nBEQ             loc_8053C8                                             ; +0x40, 0x8053bc\nBLX             R3                                                     ; +0x44, 0x8053c0\nSTR             R5, [R4,#0x14]                                         ; +0x48, 0x8053c4\nLDR             R0, [R4,#0x10]                                         ; +0x4c, 0x8053c8\nBL              ENGINE_finish                                          ; +0x50, 0x8053cc\nMOV             R3, #0                                                 ; +0x54, 0x8053d0\nSTR             R3, [R4,#0x10]                                         ; +0x58, 0x8053d4\nLDR             R3, [R4,#4]                                            ; +0x5c, 0x8053d8\nCMP             R3, #0                                                 ; +0x60, 0x8053dc\nBEQ             loc_805444                                             ; +0x64, 0x8053e0\nLDR             R0, [R4,#0x10]                                         ; +0x68, 0x8053e4\nBL              ENGINE_finish                                          ; +0x6c, 0x8053e8\nMOV             R3, #0                                                 ; +0x70, 0x8053ec\nSTR             R3, [R4,#0x10]                                         ; +0x74, 0x8053f0\nSUBS            R1, R6, #0; char *                                     ; +0x78, 0x8053f4\nBEQ             loc_805454                                             ; +0x7c, 0x8053f8\nMOV             R2, R7                                                 ; +0x80, 0x8053fc\nADD             R0, SP, #0x14+var_8; int                               ; +0x84, 0x805400\nBL              EVP_PKEY_asn1_find_str                                 ; +0x88, 0x805404\nMOV             R5, R0                                                 ; +0x8c, 0x805408\nCMP             R4, #0                                                 ; +0x90, 0x80540c\nBEQ             loc_805464                                             ; +0x94, 0x805410\nCMP             R5, #0                                                 ; +0x98, 0x805414\nBEQ             loc_805474                                             ; +0x9c, 0x805418\nLDR             R1, [R5]                                               ; +0xa0, 0x80541c\nLDR             R2, [SP,#0x14+var_8]                                   ; +0xa4, 0x805420\nMOV             R3, #0                                                 ; +0xa8, 0x805424\nSTR             R5, [R4,#0xC]                                          ; +0xac, 0x805428\nSTR             R1, [R4]                                               ; +0xb0, 0x80542c\nSTR             R2, [R4,#0x10]                                         ; +0xb4, 0x805430\nSTR             R3, [R4,#4]                                            ; +0xb8, 0x805434\nMOV             R0, #1                                                 ; +0xbc, 0x805438\nADD             SP, SP, #0x14                                          ; +0xc0, 0x80543c\nPOP             {R4-R7,PC}                                             ; +0xc4, 0x805440\nLDR             R3, [R4,#0xC]                                          ; +0xc8, 0x805444\nCMP             R3, #0                                                 ; +0xcc, 0x805448\nBNE             loc_805438                                             ; +0xd0, 0x80544c\nB               loc_8053E4                                             ; +0xd4, 0x805450\nADD             R0, SP, #0x14+var_8                                    ; +0xd8, 0x805454\nBL              EVP_PKEY_asn1_find                                     ; +0xdc, 0x805458\nMOV             R5, R0                                                 ; +0xe0, 0x80545c\nB               loc_80540C                                             ; +0xe4, 0x805460\nLDR             R0, [SP,#0x14+var_8]                                   ; +0xe8, 0x805464\nBL              ENGINE_finish                                          ; +0xec, 0x805468\nCMP             R5, #0                                                 ; +0xf0, 0x80546c\nBNE             loc_805438                                             ; +0xf4, 0x805470\nMOV             R3, #0xCC                                              ; +0xf8, 0x805474\nSTR             R3, [SP,#0x14+var_14]                                  ; +0xfc, 0x805478\nLDR             R3, =(aCryptoEvpPLibC - 0x805494); \"crypto/evp/p_lib.c\" ; +0x100, 0x80547c\nMOV             R0, #6                                                 ; +0x104, 0x805480\nMOV             R1, #0x9E                                              ; +0x108, 0x805484\nMOV             R2, #0x9C                                              ; +0x10c, 0x805488\nADD             R3, PC, R3; \"crypto/evp/p_lib.c\"                       ; +0x110, 0x80548c\nBL              ERR_put_error                                          ; +0x114, 0x805490\nMOV             R0, #0                                                 ; +0x118, 0x805494\nB               loc_80543C                                             ; +0x11c, 0x805498", "xrefs": ["PEM_read_bio_Parameters @ 0x8237c4", "<???> @ 0x63adc"], "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"}