{"type": "func", "start": 17398448, "end": 17398544, "name": "BN_mod_add_quick", "pseudocode": "// \n// BN_mod_add_quick from 0x1097ab0 to 0x1097b10 (96 bytes)\n// \n// 19 xrefs:\n// > ossl_ecdsa_sign_sig @ 0x10131a0\n// > ec_GFp_simple_set_compressed_coordinates @ 0x1016a64\n// > ec_GFp_simple_set_compressed_coordinates @ 0x1016aa0\n// > ec_GFp_simple_set_compressed_coordinates @ 0x1016bac\n// > ec_GFp_simple_set_compressed_coordinates @ 0x1016c04\n// > ec_GFp_simple_dbl @ 0x101802c\n// > ec_GFp_simple_dbl @ 0x1018094\n// > ec_GFp_simple_dbl @ 0x101823c\n// > ec_GFp_simple_dbl @ 0x1018254\n// > ec_GFp_simple_dbl @ 0x1018270\n// > ec_GFp_simple_dbl @ 0x10182d4\n// > ec_GFp_simple_add @ 0x1018c30\n// > ec_GFp_simple_add @ 0x1018c48\n// > ec_GFp_simple_is_on_curve @ 0x1018fa0\n// > ec_GFp_simple_is_on_curve @ 0x1018fd4\n// > ec_GFp_simple_is_on_curve @ 0x1019054\n// > ec_GFp_simple_is_on_curve @ 0x10190bc\n// > ec_GFp_simple_is_on_curve @ 0x1019120\n// > <???> @ 0x650b0\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:17:24 +0000\n// \n\nunsigned __int64 *__fastcall BN_mod_add_quick(unsigned __int64 *a1, __int64 a2, __int64 a3, __int64 *a4)\n{\n  unsigned __int64 *result; // x0\n\n  result = BN_uadd((__int64)a1, a2, a3);\n  if ( (_DWORD)result )\n  {\n    if ( (BN_ucmp((__int64 *)a1, a4) & 0x80000000) != 0 )\n      return (_QWORD *)(dword_0 + 1);\n    else\n      return BN_usub(a1, (__int64 *)a1, (__int64)a4);\n  }\n  return result;\n}", "assembly": "; \n; BN_mod_add_quick from 0x1097ab0 to 0x1097b10 (96 bytes)\n; \n; 19 xrefs:\n; > ossl_ecdsa_sign_sig @ 0x10131a0\n; > ec_GFp_simple_set_compressed_coordinates @ 0x1016a64\n; > ec_GFp_simple_set_compressed_coordinates @ 0x1016aa0\n; > ec_GFp_simple_set_compressed_coordinates @ 0x1016bac\n; > ec_GFp_simple_set_compressed_coordinates @ 0x1016c04\n; > ec_GFp_simple_dbl @ 0x101802c\n; > ec_GFp_simple_dbl @ 0x1018094\n; > ec_GFp_simple_dbl @ 0x101823c\n; > ec_GFp_simple_dbl @ 0x1018254\n; > ec_GFp_simple_dbl @ 0x1018270\n; > ec_GFp_simple_dbl @ 0x10182d4\n; > ec_GFp_simple_add @ 0x1018c30\n; > ec_GFp_simple_add @ 0x1018c48\n; > ec_GFp_simple_is_on_curve @ 0x1018fa0\n; > ec_GFp_simple_is_on_curve @ 0x1018fd4\n; > ec_GFp_simple_is_on_curve @ 0x1019054\n; > ec_GFp_simple_is_on_curve @ 0x10190bc\n; > ec_GFp_simple_is_on_curve @ 0x1019120\n; > <???> @ 0x650b0\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:17:24 +0000\n; \nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0x1097ab0\nMOV             X29, SP                                                ; +0x4, 0x1097ab4\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0x1097ab8\nMOV             X20, X0                                                ; +0xc, 0x1097abc\nMOV             X19, X3                                                ; +0x10, 0x1097ac0\nBL              BN_uadd                                                ; +0x14, 0x1097ac4\nCBNZ            W0, loc_1097AD8                                        ; +0x18, 0x1097ac8\nLDP             X19, X20, [SP,#var_s10]                                ; +0x1c, 0x1097acc\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x20, 0x1097ad0\nRET                                                                    ; +0x24, 0x1097ad4\nMOV             X0, X20                                                ; +0x28, 0x1097ad8\nMOV             X1, X19                                                ; +0x2c, 0x1097adc\nBL              BN_ucmp                                                ; +0x30, 0x1097ae0\nTBNZ            W0, #0x1F, loc_1097B00                                 ; +0x34, 0x1097ae4\nMOV             X0, X20                                                ; +0x38, 0x1097ae8\nMOV             X1, X20                                                ; +0x3c, 0x1097aec\nMOV             X2, X19                                                ; +0x40, 0x1097af0\nLDP             X19, X20, [SP,#var_s10]                                ; +0x44, 0x1097af4\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x48, 0x1097af8\nB               BN_usub                                                ; +0x4c, 0x1097afc\nMOV             W0, #1                                                 ; +0x50, 0x1097b00\nLDP             X19, X20, [SP,#var_s10]                                ; +0x54, 0x1097b04\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x58, 0x1097b08\nRET                                                                    ; +0x5c, 0x1097b0c", "xrefs": ["ossl_ecdsa_sign_sig @ 0x10131a0", "ec_GFp_simple_set_compressed_coordinates @ 0x1016a64", "ec_GFp_simple_set_compressed_coordinates @ 0x1016aa0", "ec_GFp_simple_set_compressed_coordinates @ 0x1016bac", "ec_GFp_simple_set_compressed_coordinates @ 0x1016c04", "ec_GFp_simple_dbl @ 0x101802c", "ec_GFp_simple_dbl @ 0x1018094", "ec_GFp_simple_dbl @ 0x101823c", "ec_GFp_simple_dbl @ 0x1018254", "ec_GFp_simple_dbl @ 0x1018270", "ec_GFp_simple_dbl @ 0x10182d4", "ec_GFp_simple_add @ 0x1018c30", "ec_GFp_simple_add @ 0x1018c48", "ec_GFp_simple_is_on_curve @ 0x1018fa0", "ec_GFp_simple_is_on_curve @ 0x1018fd4", "ec_GFp_simple_is_on_curve @ 0x1019054", "ec_GFp_simple_is_on_curve @ 0x10190bc", "ec_GFp_simple_is_on_curve @ 0x1019120", "<???> @ 0x650b0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}