{"type": "func", "start": 8839816, "end": 8840012, "name": "BN_mod_exp", "pseudocode": "// \n// BN_mod_exp from 0x86e288 to 0x86e34c (196 bytes)\n// \n// 17 xrefs:\n// > sub_7E11C4 @ 0x7e1310\n// > SRP_Calc_server_key @ 0x8369c0\n// > SRP_Calc_server_key @ 0x836a34\n// > SRP_Calc_B @ 0x836adc\n// > SRP_Calc_A @ 0x836dd8\n// > SRP_Calc_client_key @ 0x836ea0\n// > SRP_Calc_client_key @ 0x836fc8\n// > SRP_create_verifier_BN @ 0x83826c\n// > BN_BLINDING_create_param @ 0x86bc9c\n// > BN_mod_sqrt @ 0x871928\n// > BN_mod_sqrt @ 0x871aa0\n// > BN_mod_sqrt @ 0x871b08\n// > BN_mod_sqrt @ 0x871db4\n// > DH_check @ 0x87f6e0\n// > DH_check_pub_key @ 0x87f858\n// > DSA_generate_key @ 0x8d0f70\n// > <???> @ 0x60d5c\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_mod_exp(int **a1, int *a2, _DWORD *a3, int a4, int ***a5)\n{\n  if ( !BN_is_odd(a4) )\n    return BN_mod_exp_recp(a1, (int)a2, a3, a4, a5);\n  if ( a2[1] != 1 || a2[3] || BN_get_flags((int)a3, 4) )\n    return BN_mod_exp_mont((int *)a1, a2, a3, a4, a5, nullptr);\n  return BN_mod_exp_mont_word((int *)a1, *(_DWORD *)*a2, a3, a4, a5, nullptr);\n}", "assembly": "; \n; BN_mod_exp from 0x86e288 to 0x86e34c (196 bytes)\n; \n; 17 xrefs:\n; > sub_7E11C4 @ 0x7e1310\n; > SRP_Calc_server_key @ 0x8369c0\n; > SRP_Calc_server_key @ 0x836a34\n; > SRP_Calc_B @ 0x836adc\n; > SRP_Calc_A @ 0x836dd8\n; > SRP_Calc_client_key @ 0x836ea0\n; > SRP_Calc_client_key @ 0x836fc8\n; > SRP_create_verifier_BN @ 0x83826c\n; > BN_BLINDING_create_param @ 0x86bc9c\n; > BN_mod_sqrt @ 0x871928\n; > BN_mod_sqrt @ 0x871aa0\n; > BN_mod_sqrt @ 0x871b08\n; > BN_mod_sqrt @ 0x871db4\n; > DH_check @ 0x87f6e0\n; > DH_check_pub_key @ 0x87f858\n; > DSA_generate_key @ 0x8d0f70\n; > <???> @ 0x60d5c\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, 0x86e288\nMOV             R7, R0                                                 ; +0x4, 0x86e28c\nSUB             SP, SP, #8                                             ; +0x8, 0x86e290\nMOV             R0, R3                                                 ; +0xc, 0x86e294\nMOV             R5, R3                                                 ; +0x10, 0x86e298\nMOV             R4, R1                                                 ; +0x14, 0x86e29c\nMOV             R6, R2                                                 ; +0x18, 0x86e2a0\nLDR             R8, [SP,#8+arg_0]                                      ; +0x1c, 0x86e2a4\nBL              BN_is_odd                                              ; +0x20, 0x86e2a8\nCMP             R0, #0                                                 ; +0x24, 0x86e2ac\nBEQ             loc_86E2F4                                             ; +0x28, 0x86e2b0\nLDR             R3, [R4,#4]                                            ; +0x2c, 0x86e2b4\nCMP             R3, #1                                                 ; +0x30, 0x86e2b8\nBNE             loc_86E2CC                                             ; +0x34, 0x86e2bc\nLDR             R3, [R4,#0xC]                                          ; +0x38, 0x86e2c0\nCMP             R3, #0                                                 ; +0x3c, 0x86e2c4\nBEQ             loc_86E314                                             ; +0x40, 0x86e2c8\nMOV             R12, #0                                                ; +0x44, 0x86e2cc\nSTR             R8, [SP,#8+var_8]                                      ; +0x48, 0x86e2d0\nMOV             R0, R7                                                 ; +0x4c, 0x86e2d4\nMOV             R1, R4                                                 ; +0x50, 0x86e2d8\nMOV             R2, R6                                                 ; +0x54, 0x86e2dc\nMOV             R3, R5                                                 ; +0x58, 0x86e2e0\nSTR             R12, [SP,#8+var_4]                                     ; +0x5c, 0x86e2e4\nBL              BN_mod_exp_mont                                        ; +0x60, 0x86e2e8\nADD             SP, SP, #8                                             ; +0x64, 0x86e2ec\nPOP             {R4-R8,PC}                                             ; +0x68, 0x86e2f0\nMOV             R0, R7                                                 ; +0x6c, 0x86e2f4\nMOV             R1, R4                                                 ; +0x70, 0x86e2f8\nMOV             R2, R6                                                 ; +0x74, 0x86e2fc\nMOV             R3, R5                                                 ; +0x78, 0x86e300\nSTR             R8, [SP,#8+arg_0]                                      ; +0x7c, 0x86e304\nADD             SP, SP, #8                                             ; +0x80, 0x86e308\nPOP             {R4-R8,LR}                                             ; +0x84, 0x86e30c\nB               BN_mod_exp_recp                                        ; +0x88, 0x86e310\nMOV             R0, R6                                                 ; +0x8c, 0x86e314\nMOV             R1, #4                                                 ; +0x90, 0x86e318\nBL              BN_get_flags                                           ; +0x94, 0x86e31c\nSUBS            R3, R0, #0                                             ; +0x98, 0x86e320\nBNE             loc_86E2CC                                             ; +0x9c, 0x86e324\nLDR             R2, [R4]                                               ; +0xa0, 0x86e328\nMOV             R0, R7                                                 ; +0xa4, 0x86e32c\nLDR             R1, [R2]                                               ; +0xa8, 0x86e330\nSTR             R3, [SP,#8+var_4]                                      ; +0xac, 0x86e334\nMOV             R2, R6                                                 ; +0xb0, 0x86e338\nSTR             R8, [SP,#8+var_8]                                      ; +0xb4, 0x86e33c\nMOV             R3, R5                                                 ; +0xb8, 0x86e340\nBL              BN_mod_exp_mont_word                                   ; +0xbc, 0x86e344\nB               loc_86E2EC                                             ; +0xc0, 0x86e348", "xrefs": ["sub_7E11C4 @ 0x7e1310", "SRP_Calc_server_key @ 0x8369c0", "SRP_Calc_server_key @ 0x836a34", "SRP_Calc_B @ 0x836adc", "SRP_Calc_A @ 0x836dd8", "SRP_Calc_client_key @ 0x836ea0", "SRP_Calc_client_key @ 0x836fc8", "SRP_create_verifier_BN @ 0x83826c", "BN_BLINDING_create_param @ 0x86bc9c", "BN_mod_sqrt @ 0x871928", "BN_mod_sqrt @ 0x871aa0", "BN_mod_sqrt @ 0x871b08", "BN_mod_sqrt @ 0x871db4", "DH_check @ 0x87f6e0", "DH_check_pub_key @ 0x87f858", "DSA_generate_key @ 0x8d0f70", "<???> @ 0x60d5c"], "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"}