{"type": "func", "start": 16845880, "end": 16846044, "name": "EC_ec_pre_comp_free", "pseudocode": "// \n// EC_ec_pre_comp_free from 0x1010c38 to 0x1010cdc (164 bytes)\n// \n// 7 xrefs:\n// > EC_pre_comp_free @ 0x100f414\n// > ec_wNAF_precompute_mult @ 0x1011bfc\n// > ec_wNAF_precompute_mult @ 0x1011d2c\n// > ec_wNAF_precompute_mult @ 0x1011e9c\n// > ec_wNAF_precompute_mult @ 0x1011f78\n// > ec_wNAF_precompute_mult @ 0x101201c\n// > <???> @ 0x71458\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 13:16:02 +0000\n// \n\n__int64 __fastcall EC_ec_pre_comp_free(__int64 result)\n{\n  __int64 v1; // x19\n  __int64 *v2; // x20\n  __int64 v3; // x0\n  __int64 v4; // t1\n  __int64 v5; // x0\n  int v6; // [xsp+2Ch] [xbp+2Ch] BYREF\n\n  if ( result )\n  {\n    v1 = result;\n    CRYPTO_atomic_add(result + 48, 0xFFFFFFFFLL, &v6, *(_QWORD *)(result + 56));\n    result = (unsigned int)v6;\n    if ( v6 <= 0 )\n    {\n      v2 = *(__int64 **)(v1 + 32);\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 = *(_QWORD *)(v1 + 32);\n        }\n        else\n        {\n          v5 = *(_QWORD *)(v1 + 32);\n        }\n        CRYPTO_free(v5, \"crypto/ec/ec_mult.c\", 98);\n      }\n      CRYPTO_THREAD_lock_free(*(_QWORD *)(v1 + 56));\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 0x1010c38 to 0x1010cdc (164 bytes)\n; \n; 7 xrefs:\n; > EC_pre_comp_free @ 0x100f414\n; > ec_wNAF_precompute_mult @ 0x1011bfc\n; > ec_wNAF_precompute_mult @ 0x1011d2c\n; > ec_wNAF_precompute_mult @ 0x1011e9c\n; > ec_wNAF_precompute_mult @ 0x1011f78\n; > ec_wNAF_precompute_mult @ 0x101201c\n; > <???> @ 0x71458\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 13:16:02 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x1010c38\nMOV             X29, SP                                                ; +0x4, 0x1010c3c\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x1010c40\nCBZ             X0, loc_1010C6C                                        ; +0xc, 0x1010c44\nLDR             X3, [X0,#0x38]                                         ; +0x10, 0x1010c48\nMOV             X19, X0                                                ; +0x14, 0x1010c4c\nMOV             W1, #0xFFFFFFFF                                        ; +0x18, 0x1010c50\nADD             X0, X0, #0x30 ; '0'                                    ; +0x1c, 0x1010c54\nADD             X2, X29, #0x30+var_4                                   ; +0x20, 0x1010c58\nBL              CRYPTO_atomic_add                                      ; +0x24, 0x1010c5c\nLDR             W0, [X29,#0x30+var_4]                                  ; +0x28, 0x1010c60\nCMP             W0, WZR                                                ; +0x2c, 0x1010c64\nB.LE            loc_1010C78                                            ; +0x30, 0x1010c68\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x34, 0x1010c6c\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x38, 0x1010c70\nRET                                                                    ; +0x3c, 0x1010c74\nLDR             X20, [X19,#0x20]                                       ; +0x40, 0x1010c78\nCBZ             X20, loc_1010CCC                                       ; +0x44, 0x1010c7c\nLDR             X0, [X20]                                              ; +0x48, 0x1010c80\nCBZ             X0, loc_1010CD4                                        ; +0x4c, 0x1010c84\nBL              EC_POINT_free                                          ; +0x50, 0x1010c88\nLDR             X0, [X20,#8]!                                          ; +0x54, 0x1010c8c\nCBNZ            X0, loc_1010C88                                        ; +0x58, 0x1010c90\nLDR             X0, [X19,#0x20]                                        ; +0x5c, 0x1010c94\nADRP            X20, #aCryptoEcEcMult@PAGE; \"crypto/ec/ec_mult.c\"      ; +0x60, 0x1010c98\nMOV             W2, #0x62 ; 'b'                                        ; +0x64, 0x1010c9c\nADD             X1, X20, #aCryptoEcEcMult@PAGEOFF; \"crypto/ec/ec_mult.c\" ; +0x68, 0x1010ca0\nBL              CRYPTO_free                                            ; +0x6c, 0x1010ca4\nLDR             X0, [X19,#0x38]                                        ; +0x70, 0x1010ca8\nBL              CRYPTO_THREAD_lock_free                                ; +0x74, 0x1010cac\nMOV             X0, X19                                                ; +0x78, 0x1010cb0\nADD             X1, X20, #aCryptoEcEcMult@PAGEOFF; \"crypto/ec/ec_mult.c\" ; +0x7c, 0x1010cb4\nMOV             W2, #0x65 ; 'e'                                        ; +0x80, 0x1010cb8\nBL              CRYPTO_free                                            ; +0x84, 0x1010cbc\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x88, 0x1010cc0\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x8c, 0x1010cc4\nRET                                                                    ; +0x90, 0x1010cc8\nADRP            X20, #aCryptoEcEcMult@PAGE; \"crypto/ec/ec_mult.c\"      ; +0x94, 0x1010ccc\nB               loc_1010CA8                                            ; +0x98, 0x1010cd0\nMOV             X0, X20                                                ; +0x9c, 0x1010cd4\nB               loc_1010C98                                            ; +0xa0, 0x1010cd8", "xrefs": ["EC_pre_comp_free @ 0x100f414", "ec_wNAF_precompute_mult @ 0x1011bfc", "ec_wNAF_precompute_mult @ 0x1011d2c", "ec_wNAF_precompute_mult @ 0x1011e9c", "ec_wNAF_precompute_mult @ 0x1011f78", "ec_wNAF_precompute_mult @ 0x101201c", "<???> @ 0x71458"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}