{"type": "func", "start": 10487480, "end": 10487644, "name": "EC_ec_pre_comp_free", "pseudocode": "// \n// EC_ec_pre_comp_free from 0xa006b8 to 0xa0075c (164 bytes)\n// \n// 6 xrefs:\n// > EC_pre_comp_free @ 0x9fed7c\n// > ec_wNAF_precompute_mult @ 0xa01840\n// > ec_wNAF_precompute_mult @ 0xa01958\n// > ec_wNAF_precompute_mult @ 0xa01b00\n// > ec_wNAF_precompute_mult @ 0xa01c84\n// > <???> @ 0x7b48c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:07:38 +0000\n// \n\nint __fastcall EC_ec_pre_comp_free(int result)\n{\n  int v1; // r4\n  int *v2; // r5\n  int v3; // r0\n  int v4; // t1\n  int v5; // r0\n  int v6; // [sp+4h] [bp-14h] BYREF\n\n  if ( result )\n  {\n    v1 = result;\n    result = CRYPTO_atomic_add(result + 24, -1, &v6, *(_DWORD *)(result + 28));\n    if ( v6 <= 0 )\n    {\n      v2 = *(int **)(v1 + 16);\n      if ( v2 )\n      {\n        v3 = *v2;\n        if ( *v2 )\n        {\n          do\n          {\n            EC_POINT_free(v3);\n            v4 = v2[1];\n            ++v2;\n            v3 = v4;\n          }\n          while ( v4 );\n          v5 = *(_DWORD *)(v1 + 16);\n        }\n        else\n        {\n          v5 = *(_DWORD *)(v1 + 16);\n        }\n        CRYPTO_free(v5, \"crypto/ec/ec_mult.c\", 98);\n      }\n      CRYPTO_THREAD_lock_free(*(_DWORD *)(v1 + 28));\n      return CRYPTO_free(v1, \"crypto/ec/ec_mult.c\", 101);\n    }\n  }\n  return result;\n}", "assembly": "; \n; EC_ec_pre_comp_free from 0xa006b8 to 0xa0075c (164 bytes)\n; \n; 6 xrefs:\n; > EC_pre_comp_free @ 0x9fed7c\n; > ec_wNAF_precompute_mult @ 0xa01840\n; > ec_wNAF_precompute_mult @ 0xa01958\n; > ec_wNAF_precompute_mult @ 0xa01b00\n; > ec_wNAF_precompute_mult @ 0xa01c84\n; > <???> @ 0x7b48c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:07:38 +0000\n; \nCMP             R0, #0                                                 ; +0x0, 0xa006b8\nBXEQ            LR                                                     ; +0x4, 0xa006bc\nPUSH            {R4,R5,LR}                                             ; +0x8, 0xa006c0\nMOV             R4, R0                                                 ; +0xc, 0xa006c4\nSUB             SP, SP, #0xC                                           ; +0x10, 0xa006c8\nLDR             R3, [R4,#0x1C]                                         ; +0x14, 0xa006cc\nADD             R0, R0, #0x18                                          ; +0x18, 0xa006d0\nMOV             R1, #0xFFFFFFFF                                        ; +0x1c, 0xa006d4\nADD             R2, SP, #0x18+var_14                                   ; +0x20, 0xa006d8\nBL              CRYPTO_atomic_add                                      ; +0x24, 0xa006dc\nLDR             R3, [SP,#0x18+var_14]                                  ; +0x28, 0xa006e0\nCMP             R3, #0                                                 ; +0x2c, 0xa006e4\nBLE             loc_A006F4                                             ; +0x30, 0xa006e8\nADD             SP, SP, #0xC                                           ; +0x34, 0xa006ec\nPOP             {R4,R5,PC}                                             ; +0x38, 0xa006f0\nLDR             R5, [R4,#0x10]                                         ; +0x3c, 0xa006f4\nCMP             R5, #0                                                 ; +0x40, 0xa006f8\nBEQ             loc_A00730                                             ; +0x44, 0xa006fc\nLDR             R0, [R5]                                               ; +0x48, 0xa00700\nCMP             R0, #0                                                 ; +0x4c, 0xa00704\nBEQ             loc_A00754                                             ; +0x50, 0xa00708\nBL              EC_POINT_free                                          ; +0x54, 0xa0070c\nLDR             R0, [R5,#4]!                                           ; +0x58, 0xa00710\nCMP             R0, #0                                                 ; +0x5c, 0xa00714\nBNE             loc_A0070C                                             ; +0x60, 0xa00718\nLDR             R0, [R4,#0x10]                                         ; +0x64, 0xa0071c\nLDR             R1, =(aCryptoEcEcMult - 0xA00730); \"crypto/ec/ec_mult.c\" ; +0x68, 0xa00720\nMOV             R2, #0x62 ; 'b'                                        ; +0x6c, 0xa00724\nADD             R1, PC, R1; \"crypto/ec/ec_mult.c\"                      ; +0x70, 0xa00728\nBL              CRYPTO_free                                            ; +0x74, 0xa0072c\nLDR             R0, [R4,#0x1C]                                         ; +0x78, 0xa00730\nBL              CRYPTO_THREAD_lock_free                                ; +0x7c, 0xa00734\nLDR             R1, =(aCryptoEcEcMult - 0xA00748); \"crypto/ec/ec_mult.c\" ; +0x80, 0xa00738\nMOV             R0, R4                                                 ; +0x84, 0xa0073c\nADD             R1, PC, R1; \"crypto/ec/ec_mult.c\"                      ; +0x88, 0xa00740\nMOV             R2, #0x65 ; 'e'                                        ; +0x8c, 0xa00744\nBL              CRYPTO_free                                            ; +0x90, 0xa00748\nADD             SP, SP, #0xC                                           ; +0x94, 0xa0074c\nPOP             {R4,R5,PC}                                             ; +0x98, 0xa00750\nMOV             R0, R5                                                 ; +0x9c, 0xa00754\nB               loc_A00720                                             ; +0xa0, 0xa00758", "xrefs": ["EC_pre_comp_free @ 0x9fed7c", "ec_wNAF_precompute_mult @ 0xa01840", "ec_wNAF_precompute_mult @ 0xa01958", "ec_wNAF_precompute_mult @ 0xa01b00", "ec_wNAF_precompute_mult @ 0xa01c84", "<???> @ 0x7b48c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}