{"type": "func", "start": 11012316, "end": 11012652, "name": "BN_BLINDING_update", "pseudocode": "// \n// BN_BLINDING_update from 0xa808dc to 0xa80a2c (336 bytes)\n// \n// 2 xrefs:\n// > BN_BLINDING_convert_ex @ 0xa80a7c\n// > <???> @ 0x8374c\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:49 +0000\n// \n\nint __fastcall BN_BLINDING_update(int *a1, int a2)\n{\n  int v2; // r12\n  int v4; // r2\n  int v6; // r2\n  int result; // r0\n  int v8; // r3\n  int v9; // r3\n  int v10; // r3\n  int v11; // r0\n  int *param; // r0\n\n  v2 = *a1;\n  if ( !*a1 || !a1[1] )\n  {\n    ERR_put_error(3, 103, 107, (int)\"crypto/bn/bn_blind.c\", 99);\n    v10 = a1[5];\n    result = 0;\n    goto LABEL_15;\n  }\n  v4 = a1[5];\n  if ( v4 == -1 )\n  {\n    v8 = a1[6];\n    result = 1;\n    a1[5] = 1;\n    if ( (v8 & 1) != 0 )\n      return result;\n  }\n  else\n  {\n    v6 = v4 + 1;\n    a1[5] = v6;\n    if ( v6 == 32 )\n    {\n      v9 = a1[6];\n      if ( a1[2] && (v9 & 2) == 0 )\n      {\n        param = BN_BLINDING_create_param(a1, 0, 0, a2, 0, 0);\n        v10 = a1[5];\n        result = param != nullptr;\n        goto LABEL_15;\n      }\n      if ( (v9 & 1) != 0 )\n      {\n        result = 1;\nLABEL_16:\n        a1[5] = 0;\n        return result;\n      }\n    }\n    else if ( (a1[6] & 1) != 0 )\n    {\n      return 1;\n    }\n  }\n  result = BN_mod_mul(v2, v2, v2, a1[3], a2);\n  if ( result )\n  {\n    v11 = BN_mod_mul(a1[1], a1[1], a1[1], a1[3], a2);\n    v10 = a1[5];\n    result = v11 != 0;\n  }\n  else\n  {\n    v10 = a1[5];\n  }\nLABEL_15:\n  if ( v10 == 32 )\n    goto LABEL_16;\n  return result;\n}", "assembly": "; \n; BN_BLINDING_update from 0xa808dc to 0xa80a2c (336 bytes)\n; \n; 2 xrefs:\n; > BN_BLINDING_convert_ex @ 0xa80a7c\n; > <???> @ 0x8374c\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:49 +0000\n; \nLDR             R12, [R0]                                              ; +0x0, 0xa808dc\nPUSH            {R4,R5,LR}                                             ; +0x4, 0xa808e0\nCMP             R12, #0                                                ; +0x8, 0xa808e4\nSUB             SP, SP, #0xC                                           ; +0xc, 0xa808e8\nMOV             R4, R0                                                 ; +0x10, 0xa808ec\nBEQ             loc_A809B4                                             ; +0x14, 0xa808f0\nLDR             R2, [R0,#4]                                            ; +0x18, 0xa808f4\nCMP             R2, #0                                                 ; +0x1c, 0xa808f8\nBEQ             loc_A809B4                                             ; +0x20, 0xa808fc\nLDR             R2, [R0,#0x14]                                         ; +0x24, 0xa80900\nMOV             R5, R1                                                 ; +0x28, 0xa80904\nCMN             R2, #1                                                 ; +0x2c, 0xa80908\nBEQ             loc_A80938                                             ; +0x30, 0xa8090c\nADD             R2, R2, #1                                             ; +0x34, 0xa80910\nCMP             R2, #0x20 ; ' '                                        ; +0x38, 0xa80914\nSTR             R2, [R0,#0x14]                                         ; +0x3c, 0xa80918\nBEQ             loc_A80954                                             ; +0x40, 0xa8091c\nLDR             R3, [R0,#0x18]                                         ; +0x44, 0xa80920\nTST             R3, #1                                                 ; +0x48, 0xa80924\nBEQ             loc_A80978                                             ; +0x4c, 0xa80928\nMOV             R0, #1                                                 ; +0x50, 0xa8092c\nADD             SP, SP, #0xC                                           ; +0x54, 0xa80930\nPOP             {R4,R5,PC}                                             ; +0x58, 0xa80934\nLDR             R3, [R0,#0x18]                                         ; +0x5c, 0xa80938\nMOV             R0, #1                                                 ; +0x60, 0xa8093c\nTST             R3, #1                                                 ; +0x64, 0xa80940\nSTR             R0, [R4,#0x14]                                         ; +0x68, 0xa80944\nBEQ             loc_A80978                                             ; +0x6c, 0xa80948\nADD             SP, SP, #0xC                                           ; +0x70, 0xa8094c\nPOP             {R4,R5,PC}                                             ; +0x74, 0xa80950\nLDR             R3, [R0,#8]                                            ; +0x78, 0xa80954\nCMP             R3, #0                                                 ; +0x7c, 0xa80958\nLDR             R3, [R0,#0x18]                                         ; +0x80, 0xa8095c\nBEQ             loc_A8096C                                             ; +0x84, 0xa80960\nANDS            R1, R3, #2                                             ; +0x88, 0xa80964\nBEQ             loc_A80A08                                             ; +0x8c, 0xa80968\nTST             R3, #1                                                 ; +0x90, 0xa8096c\nMOVNE           R0, #1                                                 ; +0x94, 0xa80970\nBNE             loc_A809A4                                             ; +0x98, 0xa80974\nLDR             R3, [R4,#0xC]                                          ; +0x9c, 0xa80978\nMOV             R0, R12                                                ; +0xa0, 0xa8097c\nSTR             R5, [SP,#0xC+var_C]                                    ; +0xa4, 0xa80980\nMOV             R1, R12                                                ; +0xa8, 0xa80984\nMOV             R2, R12                                                ; +0xac, 0xa80988\nBL              BN_mod_mul                                             ; +0xb0, 0xa8098c\nCMP             R0, #0                                                 ; +0xb4, 0xa80990\nBNE             loc_A809E0                                             ; +0xb8, 0xa80994\nLDR             R3, [R4,#0x14]                                         ; +0xbc, 0xa80998\nCMP             R3, #0x20 ; ' '                                        ; +0xc0, 0xa8099c\nBNE             loc_A8094C                                             ; +0xc4, 0xa809a0\nMOV             R3, #0                                                 ; +0xc8, 0xa809a4\nSTR             R3, [R4,#0x14]                                         ; +0xcc, 0xa809a8\nADD             SP, SP, #0xC                                           ; +0xd0, 0xa809ac\nPOP             {R4,R5,PC}                                             ; +0xd4, 0xa809b0\nMOV             R3, #0x63 ; 'c'                                        ; +0xd8, 0xa809b4\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xdc, 0xa809b8\nLDR             R3, =(aCryptoBnBnBlin - 0xA809CC); \"crypto/bn/bn_blind.c\" ; +0xe0, 0xa809bc\nMOV             R0, #3                                                 ; +0xe4, 0xa809c0\nADD             R3, PC, R3; \"crypto/bn/bn_blind.c\"                     ; +0xe8, 0xa809c4\nMOV             R1, #0x67 ; 'g'                                        ; +0xec, 0xa809c8\nMOV             R2, #0x6B ; 'k'                                        ; +0xf0, 0xa809cc\nBL              ERR_put_error                                          ; +0xf4, 0xa809d0\nLDR             R3, [R4,#0x14]                                         ; +0xf8, 0xa809d4\nMOV             R0, #0                                                 ; +0xfc, 0xa809d8\nB               loc_A8099C                                             ; +0x100, 0xa809dc\nLDR             R0, [R4,#4]                                            ; +0x104, 0xa809e0\nLDR             R3, [R4,#0xC]                                          ; +0x108, 0xa809e4\nMOV             R1, R0                                                 ; +0x10c, 0xa809e8\nSTR             R5, [SP,#0xC+var_C]                                    ; +0x110, 0xa809ec\nMOV             R2, R0                                                 ; +0x114, 0xa809f0\nBL              BN_mod_mul                                             ; +0x118, 0xa809f4\nLDR             R3, [R4,#0x14]                                         ; +0x11c, 0xa809f8\nMOVS            R0, R0                                                 ; +0x120, 0xa809fc\nMOVNE           R0, #1                                                 ; +0x124, 0xa80a00\nB               loc_A8099C                                             ; +0x128, 0xa80a04\nMOV             R3, R5                                                 ; +0x12c, 0xa80a08\nSTR             R1, [SP,#0xC+var_C]                                    ; +0x130, 0xa80a0c\nSTR             R1, [SP,#0xC+var_8]                                    ; +0x134, 0xa80a10\nMOV             R2, R1                                                 ; +0x138, 0xa80a14\nBL              BN_BLINDING_create_param                               ; +0x13c, 0xa80a18\nLDR             R3, [R4,#0x14]                                         ; +0x140, 0xa80a1c\nMOVS            R0, R0                                                 ; +0x144, 0xa80a20\nMOVNE           R0, #1                                                 ; +0x148, 0xa80a24\nB               loc_A8099C                                             ; +0x14c, 0xa80a28", "xrefs": ["BN_BLINDING_convert_ex @ 0xa80a7c", "<???> @ 0x8374c"], "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"}