{"type": "func", "start": 11030688, "end": 11030944, "name": "BN_mod_lshift_quick", "pseudocode": "// \n// BN_mod_lshift_quick from 0xa850a0 to 0xa851a0 (256 bytes)\n// \n// 4 xrefs:\n// > ec_GFp_simple_dbl @ 0xa086cc\n// > ec_GFp_simple_dbl @ 0xa08754\n// > BN_mod_lshift @ 0xa851e8\n// > <???> @ 0x7bbac\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 12:08:51 +0000\n// \n\nint __fastcall BN_mod_lshift_quick(int *a1, int a2, int a3, int *a4)\n{\n  int v7; // r4\n  int v8; // r4\n\n  if ( a1 != (int *)a2 && !BN_copy((int)a1, a2) )\n    return 0;\n  while ( 1 )\n  {\n    if ( a3 <= 0 )\n      return 1;\n    v7 = BN_num_bits(a4);\n    v8 = v7 - BN_num_bits(a1);\n    if ( v8 < 0 )\n      break;\n    if ( v8 > a3 )\n    {\n      v8 = a3;\nLABEL_13:\n      if ( !BN_lshift(a1, a1, v8) )\n        return 0;\n      a3 -= v8;\n      goto LABEL_9;\n    }\n    if ( v8 )\n      goto LABEL_13;\n    if ( !BN_lshift1((int **)a1, (int **)a1) )\n      return 0;\n    --a3;\nLABEL_9:\n    if ( BN_cmp(a1, a4) >= 0 && !BN_sub(a1, a1, a4) )\n      return 0;\n  }\n  ERR_put_error(3, 119, 110, (int)\"crypto/bn/bn_mod.c\", 174);\n  return 0;\n}", "assembly": "; \n; BN_mod_lshift_quick from 0xa850a0 to 0xa851a0 (256 bytes)\n; \n; 4 xrefs:\n; > ec_GFp_simple_dbl @ 0xa086cc\n; > ec_GFp_simple_dbl @ 0xa08754\n; > BN_mod_lshift @ 0xa851e8\n; > <???> @ 0x7bbac\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 12:08:51 +0000\n; \nCMP             R0, R1                                                 ; +0x0, 0xa850a0\nPUSH            {R4-R7,LR}                                             ; +0x4, 0xa850a4\nMOV             R5, R0                                                 ; +0x8, 0xa850a8\nSUB             SP, SP, #0xC                                           ; +0xc, 0xa850ac\nMOV             R6, R2                                                 ; +0x10, 0xa850b0\nMOV             R7, R3                                                 ; +0x14, 0xa850b4\nBEQ             loc_A850C8                                             ; +0x18, 0xa850b8\nBL              BN_copy                                                ; +0x1c, 0xa850bc\nCMP             R0, #0                                                 ; +0x20, 0xa850c0\nBEQ             loc_A85140                                             ; +0x24, 0xa850c4\nCMP             R6, #0                                                 ; +0x28, 0xa850c8\nBLE             loc_A85170                                             ; +0x2c, 0xa850cc\nMOV             R0, R7                                                 ; +0x30, 0xa850d0\nBL              BN_num_bits                                            ; +0x34, 0xa850d4\nMOV             R4, R0                                                 ; +0x38, 0xa850d8\nMOV             R0, R5                                                 ; +0x3c, 0xa850dc\nBL              BN_num_bits                                            ; +0x40, 0xa850e0\nSUBS            R4, R4, R0                                             ; +0x44, 0xa850e4\nBMI             loc_A8517C                                             ; +0x48, 0xa850e8\nCMP             R4, R6                                                 ; +0x4c, 0xa850ec\nBGT             loc_A8514C                                             ; +0x50, 0xa850f0\nCMP             R4, #0                                                 ; +0x54, 0xa850f4\nBNE             loc_A85150                                             ; +0x58, 0xa850f8\nMOV             R0, R5                                                 ; +0x5c, 0xa850fc\nMOV             R1, R5                                                 ; +0x60, 0xa85100\nBL              BN_lshift1                                             ; +0x64, 0xa85104\nCMP             R0, #0                                                 ; +0x68, 0xa85108\nBEQ             loc_A85140                                             ; +0x6c, 0xa8510c\nSUB             R6, R6, #1                                             ; +0x70, 0xa85110\nMOV             R0, R5                                                 ; +0x74, 0xa85114\nMOV             R1, R7                                                 ; +0x78, 0xa85118\nBL              BN_cmp                                                 ; +0x7c, 0xa8511c\nCMP             R0, #0                                                 ; +0x80, 0xa85120\nBLT             loc_A850C8                                             ; +0x84, 0xa85124\nMOV             R0, R5                                                 ; +0x88, 0xa85128\nMOV             R1, R5                                                 ; +0x8c, 0xa8512c\nMOV             R2, R7                                                 ; +0x90, 0xa85130\nBL              BN_sub                                                 ; +0x94, 0xa85134\nCMP             R0, #0                                                 ; +0x98, 0xa85138\nBNE             loc_A850C8                                             ; +0x9c, 0xa8513c\nMOV             R0, #0                                                 ; +0xa0, 0xa85140\nADD             SP, SP, #0xC                                           ; +0xa4, 0xa85144\nPOP             {R4-R7,PC}                                             ; +0xa8, 0xa85148\nMOV             R4, R6                                                 ; +0xac, 0xa8514c\nMOV             R0, R5                                                 ; +0xb0, 0xa85150\nMOV             R1, R5                                                 ; +0xb4, 0xa85154\nMOV             R2, R4                                                 ; +0xb8, 0xa85158\nBL              BN_lshift                                              ; +0xbc, 0xa8515c\nCMP             R0, #0                                                 ; +0xc0, 0xa85160\nBEQ             loc_A85140                                             ; +0xc4, 0xa85164\nRSB             R6, R4, R6                                             ; +0xc8, 0xa85168\nB               loc_A85114                                             ; +0xcc, 0xa8516c\nMOV             R0, #1                                                 ; +0xd0, 0xa85170\nADD             SP, SP, #0xC                                           ; +0xd4, 0xa85174\nPOP             {R4-R7,PC}                                             ; +0xd8, 0xa85178\nMOV             R3, #0xAE                                              ; +0xdc, 0xa8517c\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xe0, 0xa85180\nLDR             R3, =(aCryptoBnBnModC - 0xA8519C); \"crypto/bn/bn_mod.c\" ; +0xe4, 0xa85184\nMOV             R0, #3                                                 ; +0xe8, 0xa85188\nMOV             R1, #0x77 ; 'w'                                        ; +0xec, 0xa8518c\nMOV             R2, #0x6E ; 'n'                                        ; +0xf0, 0xa85190\nADD             R3, PC, R3; \"crypto/bn/bn_mod.c\"                       ; +0xf4, 0xa85194\nBL              ERR_put_error                                          ; +0xf8, 0xa85198\nB               loc_A85140                                             ; +0xfc, 0xa8519c", "xrefs": ["ec_GFp_simple_dbl @ 0xa086cc", "ec_GFp_simple_dbl @ 0xa08754", "BN_mod_lshift @ 0xa851e8", "<???> @ 0x7bbac"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}