{"type": "func", "start": 8214968, "end": 8215088, "name": "BN_MONT_CTX_copy", "pseudocode": "// \n// BN_MONT_CTX_copy from 0x7d59b8 to 0x7d5a30 (120 bytes)\n// \n// 3 xrefs:\n// > EC_GROUP_copy @ 0x7ea958\n// > ec_GFp_mont_group_copy @ 0x7efcd4\n// > <???> @ 0x5fdfc\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\nint *__fastcall BN_MONT_CTX_copy(int *result, int *a2)\n{\n  int *v3; // r4\n  int v4; // r3\n\n  if ( result != a2 )\n  {\n    v3 = result;\n    if ( BN_copy((int)(result + 1), (int)(a2 + 1))\n      && BN_copy((int)(v3 + 6), (int)(a2 + 6))\n      && BN_copy((int)(v3 + 11), (int)(a2 + 11)) )\n    {\n      v4 = *a2;\n      v3[16] = a2[16];\n      v3[17] = a2[17];\n      *v3 = v4;\n      return v3;\n    }\n    else\n    {\n      return nullptr;\n    }\n  }\n  return result;\n}", "assembly": "; \n; BN_MONT_CTX_copy from 0x7d59b8 to 0x7d5a30 (120 bytes)\n; \n; 3 xrefs:\n; > EC_GROUP_copy @ 0x7ea958\n; > ec_GFp_mont_group_copy @ 0x7efcd4\n; > <???> @ 0x5fdfc\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\nCMP             R0, R1                                                 ; +0x0, 0x7d59b8\nBXEQ            LR                                                     ; +0x4, 0x7d59bc\nPUSH            {R3-R5,LR}                                             ; +0x8, 0x7d59c0\nMOV             R5, R1                                                 ; +0xc, 0x7d59c4\nMOV             R4, R0                                                 ; +0x10, 0x7d59c8\nADD             R1, R1, #4                                             ; +0x14, 0x7d59cc\nADD             R0, R0, #4                                             ; +0x18, 0x7d59d0\nBL              BN_copy                                                ; +0x1c, 0x7d59d4\nCMP             R0, #0                                                 ; +0x20, 0x7d59d8\nBEQ             loc_7D5A28                                             ; +0x24, 0x7d59dc\nADD             R0, R4, #0x18                                          ; +0x28, 0x7d59e0\nADD             R1, R5, #0x18                                          ; +0x2c, 0x7d59e4\nBL              BN_copy                                                ; +0x30, 0x7d59e8\nCMP             R0, #0                                                 ; +0x34, 0x7d59ec\nBEQ             loc_7D5A28                                             ; +0x38, 0x7d59f0\nADD             R0, R4, #0x2C ; ','                                    ; +0x3c, 0x7d59f4\nADD             R1, R5, #0x2C ; ','                                    ; +0x40, 0x7d59f8\nBL              BN_copy                                                ; +0x44, 0x7d59fc\nCMP             R0, #0                                                 ; +0x48, 0x7d5a00\nBEQ             loc_7D5A28                                             ; +0x4c, 0x7d5a04\nLDR             R2, [R5,#0x40]                                         ; +0x50, 0x7d5a08\nLDR             R3, [R5]                                               ; +0x54, 0x7d5a0c\nSTR             R2, [R4,#0x40]                                         ; +0x58, 0x7d5a10\nLDR             R2, [R5,#0x44]                                         ; +0x5c, 0x7d5a14\nSTR             R2, [R4,#0x44]                                         ; +0x60, 0x7d5a18\nSTR             R3, [R4]                                               ; +0x64, 0x7d5a1c\nMOV             R0, R4                                                 ; +0x68, 0x7d5a20\nPOP             {R3-R5,PC}                                             ; +0x6c, 0x7d5a24\nMOV             R0, #0                                                 ; +0x70, 0x7d5a28\nPOP             {R3-R5,PC}                                             ; +0x74, 0x7d5a2c", "xrefs": ["EC_GROUP_copy @ 0x7ea958", "ec_GFp_mont_group_copy @ 0x7efcd4", "<???> @ 0x5fdfc"], "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"}