{"type": "func", "start": 15161984, "end": 15162340, "name": "BN_GF2m_mod_exp_arr", "pseudocode": "// \n// BN_GF2m_mod_exp_arr from 0xe75a80 to 0xe75be4 (356 bytes)\n// \n// 3 xrefs:\n// > BN_GF2m_mod_sqrt_arr @ 0xe75c90\n// > BN_GF2m_mod_exp @ 0xe769cc\n// > <???> @ 0x96c48\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\nunsigned __int64 *__fastcall BN_GF2m_mod_exp_arr(unsigned __int64 *a1, __int64 *a2, __int64 a3, int *a4, int32x2_t *a5)\n{\n  __int64 v10; // x0\n  __int64 v11; // x21\n  _BOOL4 v12; // w19\n  int v14; // w19\n  _BOOL4 v15; // w0\n  int v16; // w1\n\n  if ( BN_is_zero(a3) )\n    return BN_set_word((__int64)a1, 1);\n  if ( !(unsigned int)BN_abs_is_word(a3, 1) )\n  {\n    BN_CTX_start((unsigned __int64)a5);\n    v10 = BN_CTX_get(a5);\n    v11 = v10;\n    if ( v10 && (unsigned int)BN_GF2m_mod_arr(v10, (__int64)a2, a4) )\n    {\n      v14 = BN_num_bits(a3) - 2;\n      if ( v14 < 0 )\n      {\nLABEL_16:\n        v12 = BN_copy(a1, v11) != nullptr;\n        goto LABEL_6;\n      }\n      while ( 1 )\n      {\n        v15 = BN_GF2m_mod_sqr_arr(v11, v11, a4, a5);\n        v16 = v14--;\n        if ( !v15 || (unsigned int)BN_is_bit_set(a3, v16) && !BN_GF2m_mod_mul_arr(v11, v11, a2, a4, a5) )\n          break;\n        if ( v14 == -1 )\n          goto LABEL_16;\n      }\n    }\n    v12 = 0;\nLABEL_6:\n    BN_CTX_end((__int64)a5);\n    return (unsigned __int64 *)v12;\n  }\n  return (unsigned __int64 *)(BN_copy(a1, (__int64)a2) != nullptr);\n}", "assembly": "; \n; BN_GF2m_mod_exp_arr from 0xe75a80 to 0xe75be4 (356 bytes)\n; \n; 3 xrefs:\n; > BN_GF2m_mod_sqrt_arr @ 0xe75c90\n; > BN_GF2m_mod_exp @ 0xe769cc\n; > <???> @ 0x96c48\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0xe75a80\nMOV             X29, SP                                                ; +0x4, 0xe75a84\nSTR             X25, [SP,#0x50+var_10]                                 ; +0x8, 0xe75a88\nMOV             X25, X0                                                ; +0xc, 0xe75a8c\nMOV             X0, X2                                                 ; +0x10, 0xe75a90\nSTP             X23, X24, [SP,#0x50+var_20]                            ; +0x14, 0xe75a94\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x18, 0xe75a98\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x1c, 0xe75a9c\nMOV             X20, X2                                                ; +0x20, 0xe75aa0\nMOV             X24, X1                                                ; +0x24, 0xe75aa4\nMOV             X23, X3                                                ; +0x28, 0xe75aa8\nMOV             X22, X4                                                ; +0x2c, 0xe75aac\nBL              BN_is_zero                                             ; +0x30, 0xe75ab0\nCBNZ            W0, loc_E75B44                                         ; +0x34, 0xe75ab4\nMOV             X0, X20                                                ; +0x38, 0xe75ab8\nMOV             X1, #1                                                 ; +0x3c, 0xe75abc\nBL              BN_abs_is_word                                         ; +0x40, 0xe75ac0\nCBNZ            W0, loc_E75B18                                         ; +0x44, 0xe75ac4\nMOV             X0, X22                                                ; +0x48, 0xe75ac8\nBL              BN_CTX_start                                           ; +0x4c, 0xe75acc\nMOV             X0, X22                                                ; +0x50, 0xe75ad0\nBL              BN_CTX_get                                             ; +0x54, 0xe75ad4\nMOV             X21, X0                                                ; +0x58, 0xe75ad8\nCBZ             X0, loc_E75AF0                                         ; +0x5c, 0xe75adc\nMOV             X1, X24                                                ; +0x60, 0xe75ae0\nMOV             X2, X23                                                ; +0x64, 0xe75ae4\nBL              BN_GF2m_mod_arr                                        ; +0x68, 0xe75ae8\nCBNZ            W0, loc_E75B64                                         ; +0x6c, 0xe75aec\nMOV             W19, #0                                                ; +0x70, 0xe75af0\nMOV             X0, X22                                                ; +0x74, 0xe75af4\nBL              BN_CTX_end                                             ; +0x78, 0xe75af8\nLDR             X25, [SP,#0x50+var_10]                                 ; +0x7c, 0xe75afc\nMOV             W0, W19                                                ; +0x80, 0xe75b00\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x84, 0xe75b04\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0x88, 0xe75b08\nLDP             X23, X24, [SP,#0x50+var_20]                            ; +0x8c, 0xe75b0c\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x90, 0xe75b10\nRET                                                                    ; +0x94, 0xe75b14\nMOV             X1, X24                                                ; +0x98, 0xe75b18\nMOV             X0, X25                                                ; +0x9c, 0xe75b1c\nBL              BN_copy                                                ; +0xa0, 0xe75b20\nCMP             X0, XZR                                                ; +0xa4, 0xe75b24\nCSET            W0, NE                                                 ; +0xa8, 0xe75b28\nLDR             X25, [SP,#0x50+var_10]                                 ; +0xac, 0xe75b2c\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xb0, 0xe75b30\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0xb4, 0xe75b34\nLDP             X23, X24, [SP,#0x50+var_20]                            ; +0xb8, 0xe75b38\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xbc, 0xe75b3c\nRET                                                                    ; +0xc0, 0xe75b40\nMOV             X0, X25                                                ; +0xc4, 0xe75b44\nLDR             X25, [SP,#0x50+var_10]                                 ; +0xc8, 0xe75b48\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xcc, 0xe75b4c\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0xd0, 0xe75b50\nLDP             X23, X24, [SP,#0x50+var_20]                            ; +0xd4, 0xe75b54\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xd8, 0xe75b58\nMOV             X1, #1                                                 ; +0xdc, 0xe75b5c\nB               BN_set_word                                            ; +0xe0, 0xe75b60\nMOV             X0, X20                                                ; +0xe4, 0xe75b64\nBL              BN_num_bits                                            ; +0xe8, 0xe75b68\nSUBS            W19, W0, #2                                            ; +0xec, 0xe75b6c\nB.PL            loc_E75B80                                             ; +0xf0, 0xe75b70\nB               loc_E75BCC                                             ; +0xf4, 0xe75b74\nCMN             W19, #1                                                ; +0xf8, 0xe75b78\nB.EQ            loc_E75BCC                                             ; +0xfc, 0xe75b7c\nMOV             X1, X21                                                ; +0x100, 0xe75b80\nMOV             X2, X23                                                ; +0x104, 0xe75b84\nMOV             X3, X22                                                ; +0x108, 0xe75b88\nMOV             X0, X21                                                ; +0x10c, 0xe75b8c\nBL              BN_GF2m_mod_sqr_arr                                    ; +0x110, 0xe75b90\nMOV             W1, W19                                                ; +0x114, 0xe75b94\nSUB             W19, W19, #1                                           ; +0x118, 0xe75b98\nCBZ             W0, loc_E75AF0                                         ; +0x11c, 0xe75b9c\nMOV             X0, X20                                                ; +0x120, 0xe75ba0\nBL              BN_is_bit_set                                          ; +0x124, 0xe75ba4\nCBZ             W0, loc_E75B78                                         ; +0x128, 0xe75ba8\nMOV             X0, X21                                                ; +0x12c, 0xe75bac\nMOV             X1, X21                                                ; +0x130, 0xe75bb0\nMOV             X2, X24                                                ; +0x134, 0xe75bb4\nMOV             X3, X23                                                ; +0x138, 0xe75bb8\nMOV             X4, X22                                                ; +0x13c, 0xe75bbc\nBL              BN_GF2m_mod_mul_arr                                    ; +0x140, 0xe75bc0\nCBNZ            W0, loc_E75B78                                         ; +0x144, 0xe75bc4\nB               loc_E75AF0                                             ; +0x148, 0xe75bc8\nMOV             X0, X25                                                ; +0x14c, 0xe75bcc\nMOV             X1, X21                                                ; +0x150, 0xe75bd0\nBL              BN_copy                                                ; +0x154, 0xe75bd4\nCMP             X0, XZR                                                ; +0x158, 0xe75bd8\nCSET            W19, NE                                                ; +0x15c, 0xe75bdc\nB               loc_E75AF4                                             ; +0x160, 0xe75be0", "xrefs": ["BN_GF2m_mod_sqrt_arr @ 0xe75c90", "BN_GF2m_mod_exp @ 0xe769cc", "<???> @ 0x96c48"], "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"}