{"type": "func", "start": 8848020, "end": 8848092, "name": "BN_mod_add_quick", "pseudocode": "// \n// BN_mod_add_quick from 0x870294 to 0x8702dc (72 bytes)\n// \n// 19 xrefs:\n// > ossl_ecdsa_sign_sig @ 0x7ee330\n// > ec_GFp_simple_set_compressed_coordinates @ 0x7f2388\n// > ec_GFp_simple_set_compressed_coordinates @ 0x7f23d0\n// > ec_GFp_simple_set_compressed_coordinates @ 0x7f24fc\n// > ec_GFp_simple_set_compressed_coordinates @ 0x7f2560\n// > ec_GFp_simple_dbl @ 0x7f39b8\n// > ec_GFp_simple_dbl @ 0x7f3a30\n// > ec_GFp_simple_dbl @ 0x7f3c28\n// > ec_GFp_simple_dbl @ 0x7f3c44\n// > ec_GFp_simple_dbl @ 0x7f3c64\n// > ec_GFp_simple_dbl @ 0x7f3cd8\n// > ec_GFp_simple_add @ 0x7f463c\n// > ec_GFp_simple_add @ 0x7f4658\n// > ec_GFp_simple_is_on_curve @ 0x7f49f0\n// > ec_GFp_simple_is_on_curve @ 0x7f4a30\n// > ec_GFp_simple_is_on_curve @ 0x7f4ac8\n// > ec_GFp_simple_is_on_curve @ 0x7f4b48\n// > ec_GFp_simple_is_on_curve @ 0x7f4bbc\n// > <???> @ 0x61c8c\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_add_quick(int *a1, int *a2, int *a3, int *a4)\n{\n  int result; // r0\n\n  result = BN_uadd(a1, a2, a3, a4);\n  if ( result )\n  {\n    if ( BN_ucmp(a1, a4) < 0 )\n      return 1;\n    else\n      return BN_usub(a1, a1, a4);\n  }\n  return result;\n}", "assembly": "; \n; BN_mod_add_quick from 0x870294 to 0x8702dc (72 bytes)\n; \n; 19 xrefs:\n; > ossl_ecdsa_sign_sig @ 0x7ee330\n; > ec_GFp_simple_set_compressed_coordinates @ 0x7f2388\n; > ec_GFp_simple_set_compressed_coordinates @ 0x7f23d0\n; > ec_GFp_simple_set_compressed_coordinates @ 0x7f24fc\n; > ec_GFp_simple_set_compressed_coordinates @ 0x7f2560\n; > ec_GFp_simple_dbl @ 0x7f39b8\n; > ec_GFp_simple_dbl @ 0x7f3a30\n; > ec_GFp_simple_dbl @ 0x7f3c28\n; > ec_GFp_simple_dbl @ 0x7f3c44\n; > ec_GFp_simple_dbl @ 0x7f3c64\n; > ec_GFp_simple_dbl @ 0x7f3cd8\n; > ec_GFp_simple_add @ 0x7f463c\n; > ec_GFp_simple_add @ 0x7f4658\n; > ec_GFp_simple_is_on_curve @ 0x7f49f0\n; > ec_GFp_simple_is_on_curve @ 0x7f4a30\n; > ec_GFp_simple_is_on_curve @ 0x7f4ac8\n; > ec_GFp_simple_is_on_curve @ 0x7f4b48\n; > ec_GFp_simple_is_on_curve @ 0x7f4bbc\n; > <???> @ 0x61c8c\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            {R3-R5,LR}                                             ; +0x0, 0x870294\nMOV             R5, R3                                                 ; +0x4, 0x870298\nMOV             R4, R0                                                 ; +0x8, 0x87029c\nBL              BN_uadd                                                ; +0xc, 0x8702a0\nCMP             R0, #0                                                 ; +0x10, 0x8702a4\nPOPEQ           {R3-R5,PC}                                             ; +0x14, 0x8702a8\nMOV             R0, R4                                                 ; +0x18, 0x8702ac\nMOV             R1, R5                                                 ; +0x1c, 0x8702b0\nBL              BN_ucmp                                                ; +0x20, 0x8702b4\nCMP             R0, #0                                                 ; +0x24, 0x8702b8\nBLT             loc_8702D4                                             ; +0x28, 0x8702bc\nMOV             R2, R5                                                 ; +0x2c, 0x8702c0\nMOV             R0, R4                                                 ; +0x30, 0x8702c4\nMOV             R1, R4                                                 ; +0x34, 0x8702c8\nPOP             {R3-R5,LR}                                             ; +0x38, 0x8702cc\nB               BN_usub                                                ; +0x3c, 0x8702d0\nMOV             R0, #1                                                 ; +0x40, 0x8702d4\nPOP             {R3-R5,PC}                                             ; +0x44, 0x8702d8", "xrefs": ["ossl_ecdsa_sign_sig @ 0x7ee330", "ec_GFp_simple_set_compressed_coordinates @ 0x7f2388", "ec_GFp_simple_set_compressed_coordinates @ 0x7f23d0", "ec_GFp_simple_set_compressed_coordinates @ 0x7f24fc", "ec_GFp_simple_set_compressed_coordinates @ 0x7f2560", "ec_GFp_simple_dbl @ 0x7f39b8", "ec_GFp_simple_dbl @ 0x7f3a30", "ec_GFp_simple_dbl @ 0x7f3c28", "ec_GFp_simple_dbl @ 0x7f3c44", "ec_GFp_simple_dbl @ 0x7f3c64", "ec_GFp_simple_dbl @ 0x7f3cd8", "ec_GFp_simple_add @ 0x7f463c", "ec_GFp_simple_add @ 0x7f4658", "ec_GFp_simple_is_on_curve @ 0x7f49f0", "ec_GFp_simple_is_on_curve @ 0x7f4a30", "ec_GFp_simple_is_on_curve @ 0x7f4ac8", "ec_GFp_simple_is_on_curve @ 0x7f4b48", "ec_GFp_simple_is_on_curve @ 0x7f4bbc", "<???> @ 0x61c8c"], "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"}