{"type": "func", "start": 10391844, "end": 10391980, "name": "BN_security_bits", "pseudocode": "// \n// BN_security_bits from 0x9e9124 to 0x9e91ac (136 bytes)\n// \n// 4 xrefs:\n// > DH_security_bits @ 0x9f5438\n// > DSA_security_bits @ 0x9f6de8\n// > RSA_security_bits @ 0xa42728\n// > <???> @ 0x7959c\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:07:25 +0000\n// \n\nint __fastcall BN_security_bits(int a1, int a2)\n{\n  int result; // r0\n  int v3; // r1\n\n  if ( a1 >= 15360 )\n  {\n    result = 256;\nLABEL_6:\n    if ( a2 == -1 )\n      return result;\n    goto LABEL_7;\n  }\n  if ( a1 > 7689 )\n  {\n    result = 192;\n    if ( a2 == -1 )\n      return result;\n    goto LABEL_7;\n  }\n  if ( a1 < 3072 )\n  {\n    if ( a1 >= 2048 )\n    {\n      result = 112;\n    }\n    else\n    {\n      if ( a1 < 1024 )\n        return 0;\n      result = 80;\n    }\n    goto LABEL_6;\n  }\n  result = 128;\n  if ( a2 == -1 )\n    return result;\nLABEL_7:\n  v3 = a2 / 2;\n  if ( v3 <= 79 )\n    return 0;\n  if ( result >= v3 )\n    return v3;\n  return result;\n}", "assembly": "; \n; BN_security_bits from 0x9e9124 to 0x9e91ac (136 bytes)\n; \n; 4 xrefs:\n; > DH_security_bits @ 0x9f5438\n; > DSA_security_bits @ 0x9f6de8\n; > RSA_security_bits @ 0xa42728\n; > <???> @ 0x7959c\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:07:25 +0000\n; \nCMP             R0, #0x3C00                                            ; +0x0, 0x9e9124\nBGE             loc_9E9148                                             ; +0x4, 0x9e9128\nLDR             R3, =0x1E09                                            ; +0x8, 0x9e912c\nCMP             R0, R3                                                 ; +0xc, 0x9e9130\nBLE             loc_9E9170                                             ; +0x10, 0x9e9134\nCMN             R1, #1                                                 ; +0x14, 0x9e9138\nMOV             R0, #0xC0                                              ; +0x18, 0x9e913c\nBNE             loc_9E9154                                             ; +0x1c, 0x9e9140\nBX              LR                                                     ; +0x20, 0x9e9144\nMOV             R0, #0x100                                             ; +0x24, 0x9e9148\nCMN             R1, #1                                                 ; +0x28, 0x9e914c\nBXEQ            LR                                                     ; +0x2c, 0x9e9150\nADD             R1, R1, R1,LSR#31                                      ; +0x30, 0x9e9154\nMOV             R1, R1,ASR#1                                           ; +0x34, 0x9e9158\nCMP             R1, #0x4F ; 'O'                                        ; +0x38, 0x9e915c\nBLE             loc_9E918C                                             ; +0x3c, 0x9e9160\nCMP             R0, R1                                                 ; +0x40, 0x9e9164\nMOVGE           R0, R1                                                 ; +0x44, 0x9e9168\nBX              LR                                                     ; +0x48, 0x9e916c\nCMP             R0, #0xC00                                             ; +0x4c, 0x9e9170\nBGE             loc_9E9194                                             ; +0x50, 0x9e9174\nCMP             R0, #0x800                                             ; +0x54, 0x9e9178\nBGE             loc_9E91A4                                             ; +0x58, 0x9e917c\nCMP             R0, #0x400                                             ; +0x5c, 0x9e9180\nMOVGE           R0, #0x50 ; 'P'                                        ; +0x60, 0x9e9184\nBGE             loc_9E914C                                             ; +0x64, 0x9e9188\nMOV             R0, #0                                                 ; +0x68, 0x9e918c\nBX              LR                                                     ; +0x6c, 0x9e9190\nCMN             R1, #1                                                 ; +0x70, 0x9e9194\nMOV             R0, #0x80                                              ; +0x74, 0x9e9198\nBNE             loc_9E9154                                             ; +0x78, 0x9e919c\nBX              LR                                                     ; +0x7c, 0x9e91a0\nMOV             R0, #0x70 ; 'p'                                        ; +0x80, 0x9e91a4\nB               loc_9E914C                                             ; +0x84, 0x9e91a8", "xrefs": ["DH_security_bits @ 0x9f5438", "DSA_security_bits @ 0x9f6de8", "RSA_security_bits @ 0xa42728", "<???> @ 0x7959c"], "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"}