{"type": "func", "start": 8351312, "end": 8351596, "name": "ENGINE_set_default", "pseudocode": "// \n// ENGINE_set_default from 0x7f6e50 to 0x7f6f6c (284 bytes)\n// \n// 3 xrefs:\n// > sub_644A2C @ 0x644a3e\n// > ENGINE_set_default_string @ 0x7f6fb4\n// > <???> @ 0x5550c\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\nbool __fastcall ENGINE_set_default(int a1, __int16 a2)\n{\n  if ( (a2 & 0x40) != 0 )\n  {\n    if ( !ENGINE_set_default_ciphers() )\n      return 0;\n    if ( (a2 & 0x80) == 0 )\n    {\nLABEL_3:\n      if ( (a2 & 1) == 0 )\n        goto LABEL_4;\n      goto LABEL_17;\n    }\n  }\n  else if ( (a2 & 0x80) == 0 )\n  {\n    goto LABEL_3;\n  }\n  if ( !ENGINE_set_default_digests(a1) )\n    return 0;\n  if ( (a2 & 1) != 0 )\n  {\nLABEL_17:\n    if ( !ENGINE_set_default_RSA(a1) )\n      return 0;\n  }\nLABEL_4:\n  if ( (a2 & 2) != 0 && !ENGINE_set_default_DSA(a1) )\n    return 0;\n  if ( (a2 & 4) != 0 )\n  {\n    if ( ENGINE_set_default_DH(a1) )\n    {\n      if ( (a2 & 0x800) == 0 )\n        goto LABEL_7;\n      goto LABEL_21;\n    }\n    return 0;\n  }\n  if ( (a2 & 0x800) == 0 )\n    goto LABEL_7;\nLABEL_21:\n  if ( !ENGINE_set_default_EC(a1) )\n    return 0;\nLABEL_7:\n  if ( (a2 & 8) != 0 && !ENGINE_set_default_RAND(a1) || (a2 & 0x200) != 0 && !ENGINE_set_default_pkey_meths(a1) )\n    return 0;\n  return (a2 & 0x400) == 0 || ENGINE_set_default_pkey_asn1_meths(a1) != 0;\n}", "assembly": "; \n; ENGINE_set_default from 0x7f6e50 to 0x7f6f6c (284 bytes)\n; \n; 3 xrefs:\n; > sub_644A2C @ 0x644a3e\n; > ENGINE_set_default_string @ 0x7f6fb4\n; > <???> @ 0x5550c\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\nTST             R1, #0x40                                              ; +0x0, 0x7f6e50\nPUSH            {R3-R5,LR}                                             ; +0x4, 0x7f6e54\nMOV             R4, R1                                                 ; +0x8, 0x7f6e58\nMOV             R5, R0                                                 ; +0xc, 0x7f6e5c\nBNE             loc_7F6EC4                                             ; +0x10, 0x7f6e60\nTST             R4, #0x80                                              ; +0x14, 0x7f6e64\nBNE             loc_7F6ED8                                             ; +0x18, 0x7f6e68\nTST             R4, #1                                                 ; +0x1c, 0x7f6e6c\nBNE             loc_7F6EF0                                             ; +0x20, 0x7f6e70\nTST             R4, #2                                                 ; +0x24, 0x7f6e74\nBNE             loc_7F6EAC                                             ; +0x28, 0x7f6e78\nTST             R4, #4                                                 ; +0x2c, 0x7f6e7c\nBNE             loc_7F6F04                                             ; +0x30, 0x7f6e80\nTST             R4, #0x800                                             ; +0x34, 0x7f6e84\nBNE             loc_7F6F1C                                             ; +0x38, 0x7f6e88\nTST             R4, #8                                                 ; +0x3c, 0x7f6e8c\nBNE             loc_7F6F44                                             ; +0x40, 0x7f6e90\nTST             R4, #0x200                                             ; +0x44, 0x7f6e94\nBNE             loc_7F6F58                                             ; +0x48, 0x7f6e98\nTST             R4, #0x400                                             ; +0x4c, 0x7f6e9c\nBNE             loc_7F6F30                                             ; +0x50, 0x7f6ea0\nMOV             R0, #1                                                 ; +0x54, 0x7f6ea4\nPOP             {R3-R5,PC}                                             ; +0x58, 0x7f6ea8\nMOV             R0, R5                                                 ; +0x5c, 0x7f6eac\nBL              ENGINE_set_default_DSA                                 ; +0x60, 0x7f6eb0\nCMP             R0, #0                                                 ; +0x64, 0x7f6eb4\nBNE             loc_7F6E7C                                             ; +0x68, 0x7f6eb8\nMOV             R0, #0                                                 ; +0x6c, 0x7f6ebc\nPOP             {R3-R5,PC}                                             ; +0x70, 0x7f6ec0\nBL              ENGINE_set_default_ciphers                             ; +0x74, 0x7f6ec4\nCMP             R0, #0                                                 ; +0x78, 0x7f6ec8\nBEQ             loc_7F6EBC                                             ; +0x7c, 0x7f6ecc\nTST             R4, #0x80                                              ; +0x80, 0x7f6ed0\nBEQ             loc_7F6E6C                                             ; +0x84, 0x7f6ed4\nMOV             R0, R5                                                 ; +0x88, 0x7f6ed8\nBL              ENGINE_set_default_digests                             ; +0x8c, 0x7f6edc\nCMP             R0, #0                                                 ; +0x90, 0x7f6ee0\nBEQ             loc_7F6EBC                                             ; +0x94, 0x7f6ee4\nTST             R4, #1                                                 ; +0x98, 0x7f6ee8\nBEQ             loc_7F6E74                                             ; +0x9c, 0x7f6eec\nMOV             R0, R5                                                 ; +0xa0, 0x7f6ef0\nBL              ENGINE_set_default_RSA                                 ; +0xa4, 0x7f6ef4\nCMP             R0, #0                                                 ; +0xa8, 0x7f6ef8\nBNE             loc_7F6E74                                             ; +0xac, 0x7f6efc\nB               loc_7F6EBC                                             ; +0xb0, 0x7f6f00\nMOV             R0, R5                                                 ; +0xb4, 0x7f6f04\nBL              ENGINE_set_default_DH                                  ; +0xb8, 0x7f6f08\nCMP             R0, #0                                                 ; +0xbc, 0x7f6f0c\nBEQ             loc_7F6EBC                                             ; +0xc0, 0x7f6f10\nTST             R4, #0x800                                             ; +0xc4, 0x7f6f14\nBEQ             loc_7F6E8C                                             ; +0xc8, 0x7f6f18\nMOV             R0, R5                                                 ; +0xcc, 0x7f6f1c\nBL              ENGINE_set_default_EC                                  ; +0xd0, 0x7f6f20\nCMP             R0, #0                                                 ; +0xd4, 0x7f6f24\nBNE             loc_7F6E8C                                             ; +0xd8, 0x7f6f28\nB               loc_7F6EBC                                             ; +0xdc, 0x7f6f2c\nMOV             R0, R5                                                 ; +0xe0, 0x7f6f30\nBL              ENGINE_set_default_pkey_asn1_meths                     ; +0xe4, 0x7f6f34\nMOVS            R0, R0                                                 ; +0xe8, 0x7f6f38\nMOVNE           R0, #1                                                 ; +0xec, 0x7f6f3c\nPOP             {R3-R5,PC}                                             ; +0xf0, 0x7f6f40\nMOV             R0, R5                                                 ; +0xf4, 0x7f6f44\nBL              ENGINE_set_default_RAND                                ; +0xf8, 0x7f6f48\nCMP             R0, #0                                                 ; +0xfc, 0x7f6f4c\nBNE             loc_7F6E94                                             ; +0x100, 0x7f6f50\nB               loc_7F6EBC                                             ; +0x104, 0x7f6f54\nMOV             R0, R5                                                 ; +0x108, 0x7f6f58\nBL              ENGINE_set_default_pkey_meths                          ; +0x10c, 0x7f6f5c\nCMP             R0, #0                                                 ; +0x110, 0x7f6f60\nBNE             loc_7F6E9C                                             ; +0x114, 0x7f6f64\nB               loc_7F6EBC                                             ; +0x118, 0x7f6f68", "xrefs": ["sub_644A2C @ 0x644a3e", "ENGINE_set_default_string @ 0x7f6fb4", "<???> @ 0x5550c"], "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"}