{"type": "func", "start": 11011888, "end": 11012308, "name": "BN_BLINDING_create_param", "pseudocode": "// \n// BN_BLINDING_create_param from 0xa80730 to 0xa808d4 (420 bytes)\n// \n// 3 xrefs:\n// > RSA_setup_blinding @ 0xa420c0\n// > BN_BLINDING_update @ 0xa80a18\n// > <???> @ 0x7fd1c\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_create_param(int *a1, int a2, int a3, int a4, int a5, int a6)\n{\n  int *v9; // r4\n  int v10; // r0\n  int v11; // r5\n  int (__fastcall *v13)(int, int, int, int, int, int); // r12\n  int v14; // lr\n  int *v15; // r0\n  int v16; // r0\n  int v17; // r0\n  int v18; // [sp+Ch] [bp-8h] BYREF\n\n  if ( a1 )\n  {\n    v9 = a1;\n  }\n  else\n  {\n    v15 = BN_BLINDING_new(0, 0, a3);\n    v9 = v15;\n    if ( !v15 )\n    {\nLABEL_27:\n      BN_BLINDING_free((int)v9);\n      return nullptr;\n    }\n  }\n  if ( *v9 || (v16 = BN_new(), (*v9 = v16) != 0) )\n  {\n    if ( v9[1] || (v17 = BN_new(), (v9[1] = v17) != 0) )\n    {\n      if ( a2 )\n      {\n        BN_free(v9[2]);\n        v10 = BN_dup(a2);\n        v9[2] = v10;\n      }\n      else\n      {\n        v10 = v9[2];\n      }\n      if ( v10 )\n      {\n        if ( a5 )\n          v9[8] = a5;\n        if ( a6 )\n          v9[7] = a6;\n        v11 = 33;\n        while ( BN_rand_range(*v9, v9[3]) )\n        {\n          if ( int_bn_mod_inverse(v9[1], *v9, v9[3], a4, &v18) )\n          {\n            v13 = (int (__fastcall *)(int, int, int, int, int, int))v9[8];\n            if ( v13 && (v14 = v9[7]) != 0 )\n            {\n              if ( !v13(*v9, *v9, v9[2], v9[3], a4, v14) )\n                break;\n            }\n            else if ( !BN_mod_exp(*v9, *v9, v9[2], v9[3], a4) )\n            {\n              break;\n            }\n            return v9;\n          }\n          if ( !v18 )\n            break;\n          if ( !--v11 )\n          {\n            ERR_put_error(3, 128, 113, (int)\"crypto/bn/bn_blind.c\", 263);\n            break;\n          }\n        }\n      }\n    }\n  }\n  if ( !a1 )\n    goto LABEL_27;\n  return v9;\n}", "assembly": "; \n; BN_BLINDING_create_param from 0xa80730 to 0xa808d4 (420 bytes)\n; \n; 3 xrefs:\n; > RSA_setup_blinding @ 0xa420c0\n; > BN_BLINDING_update @ 0xa80a18\n; > <???> @ 0x7fd1c\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; \nPUSH            {R4-R9,LR}                                             ; +0x0, 0xa80730\nSUBS            R8, R0, #0                                             ; +0x4, 0xa80734\nSUB             SP, SP, #0x14                                          ; +0x8, 0xa80738\nMOV             R5, R1                                                 ; +0xc, 0xa8073c\nMOV             R6, R3                                                 ; +0x10, 0xa80740\nLDR             R9, [SP,#0x14+arg_0]                                   ; +0x14, 0xa80744\nLDR             R7, [SP,#0x14+arg_4]                                   ; +0x18, 0xa80748\nMOVNE           R4, R8                                                 ; +0x1c, 0xa8074c\nBEQ             loc_A80868                                             ; +0x20, 0xa80750\nLDR             R3, [R4]                                               ; +0x24, 0xa80754\nCMP             R3, #0                                                 ; +0x28, 0xa80758\nBEQ             loc_A808AC                                             ; +0x2c, 0xa8075c\nLDR             R3, [R4,#4]                                            ; +0x30, 0xa80760\nCMP             R3, #0                                                 ; +0x34, 0xa80764\nBEQ             loc_A808C0                                             ; +0x38, 0xa80768\nCMP             R5, #0                                                 ; +0x3c, 0xa8076c\nBEQ             loc_A80824                                             ; +0x40, 0xa80770\nLDR             R0, [R4,#8]                                            ; +0x44, 0xa80774\nBL              BN_free                                                ; +0x48, 0xa80778\nMOV             R0, R5                                                 ; +0x4c, 0xa8077c\nBL              BN_dup                                                 ; +0x50, 0xa80780\nSTR             R0, [R4,#8]                                            ; +0x54, 0xa80784\nCMP             R0, #0                                                 ; +0x58, 0xa80788\nBEQ             loc_A80810                                             ; +0x5c, 0xa8078c\nCMP             R9, #0                                                 ; +0x60, 0xa80790\nSTRNE           R9, [R4,#0x20]                                         ; +0x64, 0xa80794\nCMP             R7, #0                                                 ; +0x68, 0xa80798\nSTRNE           R7, [R4,#0x1C]                                         ; +0x6c, 0xa8079c\nMOV             R5, #0x21 ; '!'                                        ; +0x70, 0xa807a0\nADD             R7, SP, #0x14+var_8                                    ; +0x74, 0xa807a4\nLDR             R0, [R4]                                               ; +0x78, 0xa807a8\nLDR             R1, [R4,#0xC]                                          ; +0x7c, 0xa807ac\nBL              BN_rand_range                                          ; +0x80, 0xa807b0\nMOV             R3, R6                                                 ; +0x84, 0xa807b4\nCMP             R0, #0                                                 ; +0x88, 0xa807b8\nBEQ             loc_A80810                                             ; +0x8c, 0xa807bc\nLDR             R0, [R4,#4]                                            ; +0x90, 0xa807c0\nLDR             R1, [R4]                                               ; +0x94, 0xa807c4\nLDR             R2, [R4,#0xC]                                          ; +0x98, 0xa807c8\nSTR             R7, [SP,#0x14+var_14]                                  ; +0x9c, 0xa807cc\nBL              int_bn_mod_inverse                                     ; +0xa0, 0xa807d0\nCMP             R0, #0                                                 ; +0xa4, 0xa807d4\nBNE             loc_A8082C                                             ; +0xa8, 0xa807d8\nLDR             R3, [SP,#0x14+var_8]                                   ; +0xac, 0xa807dc\nCMP             R3, #0                                                 ; +0xb0, 0xa807e0\nBEQ             loc_A80810                                             ; +0xb4, 0xa807e4\nSUBS            R5, R5, #1                                             ; +0xb8, 0xa807e8\nBNE             loc_A807A8                                             ; +0xbc, 0xa807ec\nLDR             R3, =0x107                                             ; +0xc0, 0xa807f0\nSTR             R3, [SP,#0x14+var_14]                                  ; +0xc4, 0xa807f4\nLDR             R3, =(aCryptoBnBnBlin - 0xA80810); \"crypto/bn/bn_blind.c\" ; +0xc8, 0xa807f8\nMOV             R0, #3                                                 ; +0xcc, 0xa807fc\nMOV             R1, #0x80                                              ; +0xd0, 0xa80800\nMOV             R2, #0x71 ; 'q'                                        ; +0xd4, 0xa80804\nADD             R3, PC, R3; \"crypto/bn/bn_blind.c\"                     ; +0xd8, 0xa80808\nBL              ERR_put_error                                          ; +0xdc, 0xa8080c\nCMP             R8, #0                                                 ; +0xe0, 0xa80810\nBEQ             loc_A80878                                             ; +0xe4, 0xa80814\nMOV             R0, R4                                                 ; +0xe8, 0xa80818\nADD             SP, SP, #0x14                                          ; +0xec, 0xa8081c\nPOP             {R4-R9,PC}                                             ; +0xf0, 0xa80820\nLDR             R0, [R4,#8]                                            ; +0xf4, 0xa80824\nB               loc_A80788                                             ; +0xf8, 0xa80828\nLDR             R12, [R4,#0x20]                                        ; +0xfc, 0xa8082c\nCMP             R12, #0                                                ; +0x100, 0xa80830\nBEQ             loc_A80888                                             ; +0x104, 0xa80834\nLDR             LR, [R4,#0x1C]                                         ; +0x108, 0xa80838\nCMP             LR, #0                                                 ; +0x10c, 0xa8083c\nBEQ             loc_A80888                                             ; +0x110, 0xa80840\nLDR             R0, [R4]                                               ; +0x114, 0xa80844\nLDR             R2, [R4,#8]                                            ; +0x118, 0xa80848\nLDR             R3, [R4,#0xC]                                          ; +0x11c, 0xa8084c\nMOV             R1, R0                                                 ; +0x120, 0xa80850\nSTMEA           SP, {R6,LR}                                            ; +0x124, 0xa80854\nBLX             R12                                                    ; +0x128, 0xa80858\nCMP             R0, #0                                                 ; +0x12c, 0xa8085c\nBEQ             loc_A80810                                             ; +0x130, 0xa80860\nB               loc_A80818                                             ; +0x134, 0xa80864\nMOV             R1, R8                                                 ; +0x138, 0xa80868\nBL              BN_BLINDING_new                                        ; +0x13c, 0xa8086c\nSUBS            R4, R0, #0                                             ; +0x140, 0xa80870\nBNE             loc_A80754                                             ; +0x144, 0xa80874\nMOV             R0, R4                                                 ; +0x148, 0xa80878\nBL              BN_BLINDING_free                                       ; +0x14c, 0xa8087c\nMOV             R4, #0                                                 ; +0x150, 0xa80880\nB               loc_A80818                                             ; +0x154, 0xa80884\nLDR             R0, [R4]                                               ; +0x158, 0xa80888\nLDR             R2, [R4,#8]                                            ; +0x15c, 0xa8088c\nLDR             R3, [R4,#0xC]                                          ; +0x160, 0xa80890\nMOV             R1, R0                                                 ; +0x164, 0xa80894\nSTR             R6, [SP,#0x14+var_14]                                  ; +0x168, 0xa80898\nBL              BN_mod_exp                                             ; +0x16c, 0xa8089c\nCMP             R0, #0                                                 ; +0x170, 0xa808a0\nBEQ             loc_A80810                                             ; +0x174, 0xa808a4\nB               loc_A80818                                             ; +0x178, 0xa808a8\nBL              BN_new                                                 ; +0x17c, 0xa808ac\nCMP             R0, #0                                                 ; +0x180, 0xa808b0\nSTR             R0, [R4]                                               ; +0x184, 0xa808b4\nBNE             loc_A80760                                             ; +0x188, 0xa808b8\nB               loc_A80810                                             ; +0x18c, 0xa808bc\nBL              BN_new                                                 ; +0x190, 0xa808c0\nCMP             R0, #0                                                 ; +0x194, 0xa808c4\nSTR             R0, [R4,#4]                                            ; +0x198, 0xa808c8\nBNE             loc_A8076C                                             ; +0x19c, 0xa808cc\nB               loc_A80810                                             ; +0x1a0, 0xa808d0", "xrefs": ["RSA_setup_blinding @ 0xa420c0", "BN_BLINDING_update @ 0xa80a18", "<???> @ 0x7fd1c"], "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"}