{"type": "func", "start": 14198788, "end": 14199124, "name": "DSO_free", "pseudocode": "// \n// DSO_free from 0xd8a804 to 0xd8a954 (336 bytes)\n// \n// 12 xrefs:\n// > CONF_modules_load @ 0xd820b0\n// > CONF_modules_unload @ 0xd82468\n// > CONF_modules_unload @ 0xd824d8\n// > DSO_new @ 0xd8a9f4\n// > DSO_load @ 0xd8af34\n// > DSO_load @ 0xd8afb4\n// > sub_E5D020 @ 0xe5d040\n// > sub_E5D098 @ 0xe5d3d0\n// > sub_E5D098 @ 0xe5d6e4\n// > sub_E5D098 @ 0xe5d728\n// > sub_E5D098 @ 0xe5d7e8\n// > <???> @ 0xb80c8\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\n__int64 __fastcall DSO_free(__int64 *a1)\n{\n  unsigned int v2; // w20\n  __int64 v4; // x0\n  __int64 (__fastcall *v5)(__int64 *); // x1\n  __int64 (__fastcall *v6)(__int64 *); // x1\n  int v7; // [xsp+3Ch] [xbp+3Ch] BYREF\n\n  if ( !a1 )\n    return 1;\n  if ( (int)CRYPTO_atomic_add(a1 + 2, 0xFFFFFFFFLL, &v7, a1[8]) <= 0 )\n    return 0;\n  if ( v7 > 0 )\n    return 1;\n  if ( (*((_DWORD *)a1 + 5) & 4) != 0 )\n    goto LABEL_7;\n  v4 = *a1;\n  v6 = *(__int64 (__fastcall **)(__int64 *))(*a1 + 16);\n  if ( v6 )\n  {\n    v2 = v6(a1);\n    if ( !v2 )\n    {\n      ERR_put_error(37, 111, 107, \"crypto/dso/dso_lib.c\", 78);\n      return v2;\n    }\nLABEL_7:\n    v4 = *a1;\n  }\n  v5 = *(__int64 (__fastcall **)(__int64 *))(v4 + 64);\n  if ( v5 )\n  {\n    v2 = v5(a1);\n    if ( !v2 )\n    {\n      ERR_put_error(37, 111, 102, \"crypto/dso/dso_lib.c\", 84);\n      return v2;\n    }\n  }\n  OPENSSL_sk_free(a1[1]);\n  CRYPTO_free(a1[6], \"crypto/dso/dso_lib.c\", 89);\n  CRYPTO_free(a1[7], \"crypto/dso/dso_lib.c\", 90);\n  CRYPTO_THREAD_lock_free(a1[8]);\n  CRYPTO_free(a1, \"crypto/dso/dso_lib.c\", 92);\n  return 1;\n}", "assembly": "; \n; DSO_free from 0xd8a804 to 0xd8a954 (336 bytes)\n; \n; 12 xrefs:\n; > CONF_modules_load @ 0xd820b0\n; > CONF_modules_unload @ 0xd82468\n; > CONF_modules_unload @ 0xd824d8\n; > DSO_new @ 0xd8a9f4\n; > DSO_load @ 0xd8af34\n; > DSO_load @ 0xd8afb4\n; > sub_E5D020 @ 0xe5d040\n; > sub_E5D098 @ 0xe5d3d0\n; > sub_E5D098 @ 0xe5d6e4\n; > sub_E5D098 @ 0xe5d728\n; > sub_E5D098 @ 0xe5d7e8\n; > <???> @ 0xb80c8\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\nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0xd8a804\nMOV             X29, SP                                                ; +0x4, 0xd8a808\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0xd8a80c\nSTR             X21, [SP,#0x40+var_20]                                 ; +0xc, 0xd8a810\nCBZ             X0, loc_D8A844                                         ; +0x10, 0xd8a814\nLDR             X3, [X0,#0x40]                                         ; +0x14, 0xd8a818\nMOV             X19, X0                                                ; +0x18, 0xd8a81c\nMOV             W1, #0xFFFFFFFF                                        ; +0x1c, 0xd8a820\nADD             X0, X0, #0x10                                          ; +0x20, 0xd8a824\nADD             X2, X29, #0x40+var_4                                   ; +0x24, 0xd8a828\nBL              CRYPTO_atomic_add                                      ; +0x28, 0xd8a82c\nCMP             W0, WZR                                                ; +0x2c, 0xd8a830\nB.LE            loc_D8A91C                                             ; +0x30, 0xd8a834\nLDR             W0, [X29,#0x40+var_4]                                  ; +0x34, 0xd8a838\nCMP             W0, WZR                                                ; +0x38, 0xd8a83c\nB.LE            loc_D8A85C                                             ; +0x3c, 0xd8a840\nMOV             W20, #1                                                ; +0x40, 0xd8a844\nMOV             W0, W20                                                ; +0x44, 0xd8a848\nLDR             X21, [SP,#0x40+var_20]                                 ; +0x48, 0xd8a84c\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x4c, 0xd8a850\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x50, 0xd8a854\nRET                                                                    ; +0x54, 0xd8a858\nLDR             W0, [X19,#0x14]                                        ; +0x58, 0xd8a85c\nTBZ             W0, #2, loc_D8A8E0                                     ; +0x5c, 0xd8a860\nLDR             X0, [X19]                                              ; +0x60, 0xd8a864\nLDR             X1, [X0,#0x40]                                         ; +0x64, 0xd8a868\nCBZ             X1, loc_D8A880                                         ; +0x68, 0xd8a86c\nMOV             X0, X19                                                ; +0x6c, 0xd8a870\nBLR             X1                                                     ; +0x70, 0xd8a874\nMOV             W20, W0                                                ; +0x74, 0xd8a878\nCBZ             W0, loc_D8A934                                         ; +0x78, 0xd8a87c\nLDR             X0, [X19,#8]                                           ; +0x7c, 0xd8a880\nADRL            X21, aCryptoDsoDsoLi; \"crypto/dso/dso_lib.c\"           ; +0x80, 0xd8a884\nMOV             W20, #1                                                ; +0x88, 0xd8a88c\nBL              OPENSSL_sk_free                                        ; +0x8c, 0xd8a890\nLDR             X0, [X19,#0x30]                                        ; +0x90, 0xd8a894\nMOV             X1, X21                                                ; +0x94, 0xd8a898\nMOV             W2, #0x59 ; 'Y'                                        ; +0x98, 0xd8a89c\nBL              CRYPTO_free                                            ; +0x9c, 0xd8a8a0\nLDR             X0, [X19,#0x38]                                        ; +0xa0, 0xd8a8a4\nMOV             X1, X21                                                ; +0xa4, 0xd8a8a8\nMOV             W2, #0x5A ; 'Z'                                        ; +0xa8, 0xd8a8ac\nBL              CRYPTO_free                                            ; +0xac, 0xd8a8b0\nLDR             X0, [X19,#0x40]                                        ; +0xb0, 0xd8a8b4\nBL              CRYPTO_THREAD_lock_free                                ; +0xb4, 0xd8a8b8\nMOV             X0, X19                                                ; +0xb8, 0xd8a8bc\nMOV             X1, X21                                                ; +0xbc, 0xd8a8c0\nMOV             W2, #0x5C ; '\\'                                        ; +0xc0, 0xd8a8c4\nBL              CRYPTO_free                                            ; +0xc4, 0xd8a8c8\nLDR             X21, [SP,#0x40+var_20]                                 ; +0xc8, 0xd8a8cc\nMOV             W0, W20                                                ; +0xcc, 0xd8a8d0\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xd0, 0xd8a8d4\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xd4, 0xd8a8d8\nRET                                                                    ; +0xd8, 0xd8a8dc\nLDR             X0, [X19]                                              ; +0xdc, 0xd8a8e0\nLDR             X1, [X0,#0x10]                                         ; +0xe0, 0xd8a8e4\nCBZ             X1, loc_D8A868                                         ; +0xe4, 0xd8a8e8\nMOV             X0, X19                                                ; +0xe8, 0xd8a8ec\nBLR             X1                                                     ; +0xec, 0xd8a8f0\nMOV             W20, W0                                                ; +0xf0, 0xd8a8f4\nCBNZ            W0, loc_D8A864                                         ; +0xf4, 0xd8a8f8\nADRP            X3, #aCryptoDsoDsoLi@PAGE; \"crypto/dso/dso_lib.c\"      ; +0xf8, 0xd8a8fc\nMOV             W0, #0x25 ; '%'                                        ; +0xfc, 0xd8a900\nMOV             W1, #0x6F ; 'o'                                        ; +0x100, 0xd8a904\nMOV             W2, #0x6B ; 'k'                                        ; +0x104, 0xd8a908\nADD             X3, X3, #aCryptoDsoDsoLi@PAGEOFF; \"crypto/dso/dso_lib.c\" ; +0x108, 0xd8a90c\nMOV             W4, #0x4E ; 'N'                                        ; +0x10c, 0xd8a910\nBL              ERR_put_error                                          ; +0x110, 0xd8a914\nB               loc_D8A848                                             ; +0x114, 0xd8a918\nMOV             W20, #0                                                ; +0x118, 0xd8a91c\nLDR             X21, [SP,#0x40+var_20]                                 ; +0x11c, 0xd8a920\nMOV             W0, W20                                                ; +0x120, 0xd8a924\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x124, 0xd8a928\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x128, 0xd8a92c\nRET                                                                    ; +0x12c, 0xd8a930\nADRP            X3, #aCryptoDsoDsoLi@PAGE; \"crypto/dso/dso_lib.c\"      ; +0x130, 0xd8a934\nMOV             W0, #0x25 ; '%'                                        ; +0x134, 0xd8a938\nMOV             W1, #0x6F ; 'o'                                        ; +0x138, 0xd8a93c\nMOV             W2, #0x66 ; 'f'                                        ; +0x13c, 0xd8a940\nADD             X3, X3, #aCryptoDsoDsoLi@PAGEOFF; \"crypto/dso/dso_lib.c\" ; +0x140, 0xd8a944\nMOV             W4, #0x54 ; 'T'                                        ; +0x144, 0xd8a948\nBL              ERR_put_error                                          ; +0x148, 0xd8a94c\nB               loc_D8A848                                             ; +0x14c, 0xd8a950", "xrefs": ["CONF_modules_load @ 0xd820b0", "CONF_modules_unload @ 0xd82468", "CONF_modules_unload @ 0xd824d8", "DSO_new @ 0xd8a9f4", "DSO_load @ 0xd8af34", "DSO_load @ 0xd8afb4", "sub_E5D020 @ 0xe5d040", "sub_E5D098 @ 0xe5d3d0", "sub_E5D098 @ 0xe5d6e4", "sub_E5D098 @ 0xe5d728", "sub_E5D098 @ 0xe5d7e8", "<???> @ 0xb80c8"], "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"}