{"type": "func", "start": 9216976, "end": 9217180, "name": "BN_GF2m_mod_sqr", "pseudocode": "// \n// BN_GF2m_mod_sqr from 0x8ca3d0 to 0x8ca49c (204 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6ba2c\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\nbool __fastcall BN_GF2m_mod_sqr(int **a1, _DWORD *a2, int **a3, int ***a4)\n{\n  int v8; // r5\n  int *v9; // r10\n  _BOOL4 v10; // r4\n  int v11; // r0\n  _BOOL4 v12; // r12\n\n  v8 = BN_num_bits(a3) + 1;\n  v9 = (int *)CRYPTO_malloc((void *)(4 * v8), (int)\"crypto/bn/bn_gf2m.c\", 540);\n  if ( v9 )\n  {\n    v11 = BN_GF2m_poly2arr(a3, (int)v9, v8);\n    v12 = v11 == 0;\n    if ( v11 > v8 )\n      v12 = 1;\n    v10 = v11;\n    if ( v12 )\n      ERR_put_error(3, 136, 106, (int)\"crypto/bn/bn_gf2m.c\", 544);\n    else\n      v10 = BN_GF2m_mod_sqr_arr(a1, a2, v9, a4);\n  }\n  else\n  {\n    v10 = 0;\n  }\n  CRYPTO_free(v9, (int)\"crypto/bn/bn_gf2m.c\", 550);\n  return v10;\n}", "assembly": "; \n; BN_GF2m_mod_sqr from 0x8ca3d0 to 0x8ca49c (204 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6ba2c\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\nPUSH            {R4-R10,LR}                                            ; +0x0, 0x8ca3d0\nMOV             R9, R0                                                 ; +0x4, 0x8ca3d4\nSUB             SP, SP, #8                                             ; +0x8, 0x8ca3d8\nMOV             R0, R2                                                 ; +0xc, 0x8ca3dc\nMOV             R4, R2                                                 ; +0x10, 0x8ca3e0\nMOV             R8, R1                                                 ; +0x14, 0x8ca3e4\nMOV             R7, R3                                                 ; +0x18, 0x8ca3e8\nBL              BN_num_bits                                            ; +0x1c, 0x8ca3ec\nLDR             R6, =(aCryptoBnBnGf2m - 0x8CA400); \"crypto/bn/bn_gf2m.c\" ; +0x20, 0x8ca3f0\nMOV             R2, #0x21C                                             ; +0x24, 0x8ca3f4\nADD             R6, PC, R6; \"crypto/bn/bn_gf2m.c\"                      ; +0x28, 0x8ca3f8\nMOV             R1, R6                                                 ; +0x2c, 0x8ca3fc\nADD             R5, R0, #1                                             ; +0x30, 0x8ca400\nMOV             R0, R5,LSL#2                                           ; +0x34, 0x8ca404\nBL              CRYPTO_malloc                                          ; +0x38, 0x8ca408\nSUBS            R10, R0, #0                                            ; +0x3c, 0x8ca40c\nMOVEQ           R4, R10                                                ; +0x40, 0x8ca410\nBEQ             loc_8CA45C                                             ; +0x44, 0x8ca414\nMOV             R0, R4                                                 ; +0x48, 0x8ca418\nMOV             R1, R10                                                ; +0x4c, 0x8ca41c\nMOV             R2, R5                                                 ; +0x50, 0x8ca420\nBL              BN_GF2m_poly2arr                                       ; +0x54, 0x8ca424\nCLZ             R12, R0                                                ; +0x58, 0x8ca428\nMOV             R12, R12,LSR#5                                         ; +0x5c, 0x8ca42c\nCMP             R0, R5                                                 ; +0x60, 0x8ca430\nORRGT           R12, R12, #1                                           ; +0x64, 0x8ca434\nCMP             R12, #0                                                ; +0x68, 0x8ca438\nMOV             R4, R0                                                 ; +0x6c, 0x8ca43c\nBNE             loc_8CA47C                                             ; +0x70, 0x8ca440\nMOV             R0, R9                                                 ; +0x74, 0x8ca444\nMOV             R1, R8                                                 ; +0x78, 0x8ca448\nMOV             R3, R7                                                 ; +0x7c, 0x8ca44c\nMOV             R2, R10                                                ; +0x80, 0x8ca450\nBL              BN_GF2m_mod_sqr_arr                                    ; +0x84, 0x8ca454\nMOV             R4, R0                                                 ; +0x88, 0x8ca458\nLDR             R1, =(aCryptoBnBnGf2m - 0x8CA46C); \"crypto/bn/bn_gf2m.c\" ; +0x8c, 0x8ca45c\nMOV             R0, R10                                                ; +0x90, 0x8ca460\nADD             R1, PC, R1; \"crypto/bn/bn_gf2m.c\"                      ; +0x94, 0x8ca464\nLDR             R2, =0x226                                             ; +0x98, 0x8ca468\nBL              CRYPTO_free                                            ; +0x9c, 0x8ca46c\nMOV             R0, R4                                                 ; +0xa0, 0x8ca470\nADD             SP, SP, #8                                             ; +0xa4, 0x8ca474\nPOP             {R4-R10,PC}                                            ; +0xa8, 0x8ca478\nMOV             R2, #0x220                                             ; +0xac, 0x8ca47c\nSTR             R2, [SP,#8+var_8]                                      ; +0xb0, 0x8ca480\nMOV             R3, R6                                                 ; +0xb4, 0x8ca484\nMOV             R0, #3                                                 ; +0xb8, 0x8ca488\nMOV             R1, #0x88                                              ; +0xbc, 0x8ca48c\nMOV             R2, #0x6A ; 'j'                                        ; +0xc0, 0x8ca490\nBL              ERR_put_error                                          ; +0xc4, 0x8ca494\nB               loc_8CA45C                                             ; +0xc8, 0x8ca498", "xrefs": ["<???> @ 0x6ba2c"], "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"}