{"type": "func", "start": 8214072, "end": 8214176, "name": "BN_from_montgomery", "pseudocode": "// \n// BN_from_montgomery from 0x7d5638 to 0x7d56a0 (104 bytes)\n// \n// 6 xrefs:\n// > ec_GFp_mont_field_decode @ 0x7efe64\n// > BN_mod_exp_mont_consttime @ 0x86d75c\n// > BN_mod_exp_mont @ 0x86dcf8\n// > BN_mod_exp_mont_word @ 0x86e118\n// > BN_mod_exp2_mont @ 0x86ef00\n// > <???> @ 0x5fd6c\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_from_montgomery(int *a1, int a2, _DWORD *a3, int a4)\n{\n  int v8; // r0\n  _DWORD *v9; // r7\n  int v10; // r5\n\n  BN_CTX_start(a4);\n  v8 = BN_CTX_get(a4);\n  v9 = (_DWORD *)v8;\n  if ( v8 && BN_copy(v8, a2) )\n    v10 = sub_7D52C4(a1, v9, a3);\n  else\n    v10 = 0;\n  BN_CTX_end(a4);\n  return v10;\n}", "assembly": "; \n; BN_from_montgomery from 0x7d5638 to 0x7d56a0 (104 bytes)\n; \n; 6 xrefs:\n; > ec_GFp_mont_field_decode @ 0x7efe64\n; > BN_mod_exp_mont_consttime @ 0x86d75c\n; > BN_mod_exp_mont @ 0x86dcf8\n; > BN_mod_exp_mont_word @ 0x86e118\n; > BN_mod_exp2_mont @ 0x86ef00\n; > <???> @ 0x5fd6c\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-R8,LR}                                             ; +0x0, 0x7d5638\nMOV             R4, R3                                                 ; +0x4, 0x7d563c\nMOV             R8, R0                                                 ; +0x8, 0x7d5640\nMOV             R0, R3                                                 ; +0xc, 0x7d5644\nMOV             R5, R1                                                 ; +0x10, 0x7d5648\nMOV             R6, R2                                                 ; +0x14, 0x7d564c\nBL              BN_CTX_start                                           ; +0x18, 0x7d5650\nMOV             R0, R4                                                 ; +0x1c, 0x7d5654\nBL              BN_CTX_get                                             ; +0x20, 0x7d5658\nSUBS            R7, R0, #0                                             ; +0x24, 0x7d565c\nBEQ             loc_7D5698                                             ; +0x28, 0x7d5660\nMOV             R1, R5                                                 ; +0x2c, 0x7d5664\nBL              BN_copy                                                ; +0x30, 0x7d5668\nCMP             R0, #0                                                 ; +0x34, 0x7d566c\nBEQ             loc_7D5698                                             ; +0x38, 0x7d5670\nMOV             R0, R8                                                 ; +0x3c, 0x7d5674\nMOV             R1, R7                                                 ; +0x40, 0x7d5678\nMOV             R2, R6                                                 ; +0x44, 0x7d567c\nBL              sub_7D52C4                                             ; +0x48, 0x7d5680\nMOV             R5, R0                                                 ; +0x4c, 0x7d5684\nMOV             R0, R4                                                 ; +0x50, 0x7d5688\nBL              BN_CTX_end                                             ; +0x54, 0x7d568c\nMOV             R0, R5                                                 ; +0x58, 0x7d5690\nPOP             {R4-R8,PC}                                             ; +0x5c, 0x7d5694\nMOV             R5, #0                                                 ; +0x60, 0x7d5698\nB               loc_7D5688                                             ; +0x64, 0x7d569c", "xrefs": ["ec_GFp_mont_field_decode @ 0x7efe64", "BN_mod_exp_mont_consttime @ 0x86d75c", "BN_mod_exp_mont @ 0x86dcf8", "BN_mod_exp_mont_word @ 0x86e118", "BN_mod_exp2_mont @ 0x86ef00", "<???> @ 0x5fd6c"], "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"}