{"type": "func", "start": 8265320, "end": 8265504, "name": "DSA_free", "pseudocode": "// \n// DSA_free from 0x7e1e68 to 0x7e1f20 (184 bytes)\n// \n// 12 xrefs:\n// > sub_7E0CE0 @ 0x7e0ce4\n// > sub_7E11C4 @ 0x7e1270\n// > sub_7E1588 @ 0x7e1680\n// > sub_7E1A70 @ 0x7e1aac\n// > DSA_new_method @ 0x7e1fd8\n// > PEM_read_bio_DSAPrivateKey @ 0x820aec\n// > PEM_read_DSAPrivateKey @ 0x820d08\n// > d2i_DSA_PUBKEY @ 0x84aa00\n// > sub_87FC88 @ 0x87fd44\n// > sub_87FC88 @ 0x87fe88\n// > sub_881B14 @ 0x881bb0\n// > <???> @ 0x60cac\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 DSA_free(int result)\n{\n  int v1; // r4\n  void (__fastcall *v2)(int); // r3\n  int v3; // [sp+4h] [bp-Ch] BYREF\n\n  if ( result )\n  {\n    v1 = result;\n    result = CRYPTO_atomic_add(result + 36, -1, &v3, *(_DWORD *)(result + 52));\n    if ( v3 <= 0 )\n    {\n      v2 = *(void (__fastcall **)(int))(*(_DWORD *)(v1 + 44) + 28);\n      if ( v2 )\n        v2(v1);\n      ENGINE_finish(*(_DWORD *)(v1 + 48));\n      CRYPTO_free_ex_data(7, v1, v1 + 40);\n      CRYPTO_THREAD_lock_free(*(_DWORD *)(v1 + 52));\n      BN_clear_free(*(_BYTE **)(v1 + 8));\n      BN_clear_free(*(_BYTE **)(v1 + 12));\n      BN_clear_free(*(_BYTE **)(v1 + 16));\n      BN_clear_free(*(_BYTE **)(v1 + 20));\n      BN_clear_free(*(_BYTE **)(v1 + 24));\n      return CRYPTO_free(v1, \"crypto/dsa/dsa_lib.c\", 144);\n    }\n  }\n  return result;\n}", "assembly": "; \n; DSA_free from 0x7e1e68 to 0x7e1f20 (184 bytes)\n; \n; 12 xrefs:\n; > sub_7E0CE0 @ 0x7e0ce4\n; > sub_7E11C4 @ 0x7e1270\n; > sub_7E1588 @ 0x7e1680\n; > sub_7E1A70 @ 0x7e1aac\n; > DSA_new_method @ 0x7e1fd8\n; > PEM_read_bio_DSAPrivateKey @ 0x820aec\n; > PEM_read_DSAPrivateKey @ 0x820d08\n; > d2i_DSA_PUBKEY @ 0x84aa00\n; > sub_87FC88 @ 0x87fd44\n; > sub_87FC88 @ 0x87fe88\n; > sub_881B14 @ 0x881bb0\n; > <???> @ 0x60cac\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\nCMP             R0, #0                                                 ; +0x0, 0x7e1e68\nBXEQ            LR                                                     ; +0x4, 0x7e1e6c\nPUSH            {R4,LR}                                                ; +0x8, 0x7e1e70\nMOV             R4, R0                                                 ; +0xc, 0x7e1e74\nSUB             SP, SP, #8                                             ; +0x10, 0x7e1e78\nLDR             R3, [R4,#0x34]                                         ; +0x14, 0x7e1e7c\nADD             R0, R0, #0x24 ; '$'                                    ; +0x18, 0x7e1e80\nMOV             R1, #0xFFFFFFFF                                        ; +0x1c, 0x7e1e84\nADD             R2, SP, #0x10+var_C                                    ; +0x20, 0x7e1e88\nBL              CRYPTO_atomic_add                                      ; +0x24, 0x7e1e8c\nLDR             R3, [SP,#0x10+var_C]                                   ; +0x28, 0x7e1e90\nCMP             R3, #0                                                 ; +0x2c, 0x7e1e94\nBLE             loc_7E1EA4                                             ; +0x30, 0x7e1e98\nADD             SP, SP, #8                                             ; +0x34, 0x7e1e9c\nPOP             {R4,PC}                                                ; +0x38, 0x7e1ea0\nLDR             R3, [R4,#0x2C]                                         ; +0x3c, 0x7e1ea4\nLDR             R3, [R3,#0x1C]                                         ; +0x40, 0x7e1ea8\nCMP             R3, #0                                                 ; +0x44, 0x7e1eac\nBEQ             loc_7E1EBC                                             ; +0x48, 0x7e1eb0\nMOV             R0, R4                                                 ; +0x4c, 0x7e1eb4\nBLX             R3                                                     ; +0x50, 0x7e1eb8\nLDR             R0, [R4,#0x30]                                         ; +0x54, 0x7e1ebc\nBL              ENGINE_finish                                          ; +0x58, 0x7e1ec0\nMOV             R1, R4                                                 ; +0x5c, 0x7e1ec4\nADD             R2, R4, #0x28 ; '('                                    ; +0x60, 0x7e1ec8\nMOV             R0, #7                                                 ; +0x64, 0x7e1ecc\nBL              CRYPTO_free_ex_data                                    ; +0x68, 0x7e1ed0\nLDR             R0, [R4,#0x34]                                         ; +0x6c, 0x7e1ed4\nBL              CRYPTO_THREAD_lock_free                                ; +0x70, 0x7e1ed8\nLDR             R0, [R4,#8]                                            ; +0x74, 0x7e1edc\nBL              BN_clear_free                                          ; +0x78, 0x7e1ee0\nLDR             R0, [R4,#0xC]                                          ; +0x7c, 0x7e1ee4\nBL              BN_clear_free                                          ; +0x80, 0x7e1ee8\nLDR             R0, [R4,#0x10]                                         ; +0x84, 0x7e1eec\nBL              BN_clear_free                                          ; +0x88, 0x7e1ef0\nLDR             R0, [R4,#0x14]                                         ; +0x8c, 0x7e1ef4\nBL              BN_clear_free                                          ; +0x90, 0x7e1ef8\nLDR             R0, [R4,#0x18]                                         ; +0x94, 0x7e1efc\nBL              BN_clear_free                                          ; +0x98, 0x7e1f00\nLDR             R1, =(aCryptoDsaDsaLi - 0x7E1F14); \"crypto/dsa/dsa_lib.c\" ; +0x9c, 0x7e1f04\nMOV             R0, R4                                                 ; +0xa0, 0x7e1f08\nADD             R1, PC, R1; \"crypto/dsa/dsa_lib.c\"                     ; +0xa4, 0x7e1f0c\nMOV             R2, #0x90                                              ; +0xa8, 0x7e1f10\nBL              CRYPTO_free                                            ; +0xac, 0x7e1f14\nADD             SP, SP, #8                                             ; +0xb0, 0x7e1f18\nPOP             {R4,PC}                                                ; +0xb4, 0x7e1f1c", "xrefs": ["sub_7E0CE0 @ 0x7e0ce4", "sub_7E11C4 @ 0x7e1270", "sub_7E1588 @ 0x7e1680", "sub_7E1A70 @ 0x7e1aac", "DSA_new_method @ 0x7e1fd8", "PEM_read_bio_DSAPrivateKey @ 0x820aec", "PEM_read_DSAPrivateKey @ 0x820d08", "d2i_DSA_PUBKEY @ 0x84aa00", "sub_87FC88 @ 0x87fd44", "sub_87FC88 @ 0x87fe88", "sub_881B14 @ 0x881bb0", "<???> @ 0x60cac"], "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"}