{"type": "func", "start": 17778792, "end": 17779008, "name": "BN_GF2m_mod_sqr", "pseudocode": "// \n// BN_GF2m_mod_sqr from 0x10f4868 to 0x10f4940 (216 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0xfdb88\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:18:09 +0000\n// \n\nbool __fastcall BN_GF2m_mod_sqr(__int64 a1, __int64 a2, __int64 a3, int32x2_t *a4)\n{\n  int v8; // w21\n  int *v9; // x19\n  int v10; // w0\n  _BOOL4 v11; // w20\n\n  v8 = BN_num_bits(a3) + 1;\n  v9 = (int *)CRYPTO_malloc((void *)(4LL * v8), (__int64)\"crypto/bn/bn_gf2m.c\", 540);\n  if ( v9 )\n  {\n    v10 = BN_GF2m_poly2arr(a3, (__int64)v9, v8);\n    v11 = v10;\n    if ( v10 <= v8 && v10 )\n      v11 = BN_GF2m_mod_sqr_arr(a1, a2, v9, a4);\n    else\n      ERR_put_error(3, 136, 106, (__int64)\"crypto/bn/bn_gf2m.c\", 544);\n  }\n  else\n  {\n    v11 = 0;\n  }\n  CRYPTO_free(v9, (__int64)\"crypto/bn/bn_gf2m.c\", 550);\n  return v11;\n}", "assembly": "; \n; BN_GF2m_mod_sqr from 0x10f4868 to 0x10f4940 (216 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0xfdb88\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:18:09 +0000\n; \nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x10f4868\nMOV             X29, SP                                                ; +0x4, 0x10f486c\nSTR             X25, [SP,#0x50+var_10]                                 ; +0x8, 0x10f4870\nMOV             X25, X0                                                ; +0xc, 0x10f4874\nMOV             X0, X2                                                 ; +0x10, 0x10f4878\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x14, 0x10f487c\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x18, 0x10f4880\nSTP             X23, X24, [SP,#0x50+var_20]                            ; +0x1c, 0x10f4884\nMOV             X20, X2                                                ; +0x20, 0x10f4888\nMOV             X24, X1                                                ; +0x24, 0x10f488c\nMOV             X23, X3                                                ; +0x28, 0x10f4890\nADRP            X22, #aCryptoBnBnGf2m@PAGE; \"crypto/bn/bn_gf2m.c\"      ; +0x2c, 0x10f4894\nBL              BN_num_bits                                            ; +0x30, 0x10f4898\nADD             W21, W0, #1                                            ; +0x34, 0x10f489c\nSBFIZ           X0, X21, #2, #0x20 ; ' '                               ; +0x38, 0x10f48a0\nADD             X1, X22, #aCryptoBnBnGf2m@PAGEOFF; \"crypto/bn/bn_gf2m.c\" ; +0x3c, 0x10f48a4\nMOV             W2, #0x21C                                             ; +0x40, 0x10f48a8\nBL              CRYPTO_malloc                                          ; +0x44, 0x10f48ac\nMOV             X19, X0                                                ; +0x48, 0x10f48b0\nCBZ             X0, loc_10F4938                                        ; +0x4c, 0x10f48b4\nMOV             X0, X20                                                ; +0x50, 0x10f48b8\nMOV             X1, X19                                                ; +0x54, 0x10f48bc\nMOV             W2, W21                                                ; +0x58, 0x10f48c0\nBL              BN_GF2m_poly2arr                                       ; +0x5c, 0x10f48c4\nCMP             W0, W21                                                ; +0x60, 0x10f48c8\nMOV             W20, W0                                                ; +0x64, 0x10f48cc\nB.GT            loc_10F491C                                            ; +0x68, 0x10f48d0\nCBZ             W0, loc_10F491C                                        ; +0x6c, 0x10f48d4\nMOV             X0, X25                                                ; +0x70, 0x10f48d8\nMOV             X1, X24                                                ; +0x74, 0x10f48dc\nMOV             X2, X19                                                ; +0x78, 0x10f48e0\nMOV             X3, X23                                                ; +0x7c, 0x10f48e4\nBL              BN_GF2m_mod_sqr_arr                                    ; +0x80, 0x10f48e8\nMOV             W20, W0                                                ; +0x84, 0x10f48ec\nMOV             X0, X19                                                ; +0x88, 0x10f48f0\nADD             X1, X22, #aCryptoBnBnGf2m@PAGEOFF; \"crypto/bn/bn_gf2m.c\" ; +0x8c, 0x10f48f4\nMOV             W2, #0x226                                             ; +0x90, 0x10f48f8\nBL              CRYPTO_free                                            ; +0x94, 0x10f48fc\nLDR             X25, [SP,#0x50+var_10]                                 ; +0x98, 0x10f4900\nMOV             W0, W20                                                ; +0x9c, 0x10f4904\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xa0, 0x10f4908\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0xa4, 0x10f490c\nLDP             X23, X24, [SP,#0x50+var_20]                            ; +0xa8, 0x10f4910\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xac, 0x10f4914\nRET                                                                    ; +0xb0, 0x10f4918\nMOV             W0, #3                                                 ; +0xb4, 0x10f491c\nMOV             W1, #0x88                                              ; +0xb8, 0x10f4920\nMOV             W2, #0x6A ; 'j'                                        ; +0xbc, 0x10f4924\nADD             X3, X22, #aCryptoBnBnGf2m@PAGEOFF; \"crypto/bn/bn_gf2m.c\" ; +0xc0, 0x10f4928\nMOV             W4, #0x220                                             ; +0xc4, 0x10f492c\nBL              ERR_put_error                                          ; +0xc8, 0x10f4930\nB               loc_10F48F0                                            ; +0xcc, 0x10f4934\nMOV             W20, W0                                                ; +0xd0, 0x10f4938\nB               loc_10F48F0                                            ; +0xd4, 0x10f493c", "xrefs": ["<???> @ 0xfdb88"], "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"}