{"type": "func", "start": 8209700, "end": 8209836, "name": "BN_security_bits", "pseudocode": "// \n// BN_security_bits from 0x7d4524 to 0x7d45ac (136 bytes)\n// \n// 4 xrefs:\n// > DH_security_bits @ 0x7e0838\n// > DSA_security_bits @ 0x7e21e8\n// > RSA_security_bits @ 0x82db28\n// > <???> @ 0x5fb1c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\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 0x7d4524 to 0x7d45ac (136 bytes)\n; \n; 4 xrefs:\n; > DH_security_bits @ 0x7e0838\n; > DSA_security_bits @ 0x7e21e8\n; > RSA_security_bits @ 0x82db28\n; > <???> @ 0x5fb1c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nCMP             R0, #0x3C00                                            ; +0x0, 0x7d4524\nBGE             loc_7D4548                                             ; +0x4, 0x7d4528\nLDR             R3, =0x1E09                                            ; +0x8, 0x7d452c\nCMP             R0, R3                                                 ; +0xc, 0x7d4530\nBLE             loc_7D4570                                             ; +0x10, 0x7d4534\nCMN             R1, #1                                                 ; +0x14, 0x7d4538\nMOV             R0, #0xC0                                              ; +0x18, 0x7d453c\nBNE             loc_7D4554                                             ; +0x1c, 0x7d4540\nBX              LR                                                     ; +0x20, 0x7d4544\nMOV             R0, #0x100                                             ; +0x24, 0x7d4548\nCMN             R1, #1                                                 ; +0x28, 0x7d454c\nBXEQ            LR                                                     ; +0x2c, 0x7d4550\nADD             R1, R1, R1,LSR#31                                      ; +0x30, 0x7d4554\nMOV             R1, R1,ASR#1                                           ; +0x34, 0x7d4558\nCMP             R1, #0x4F ; 'O'                                        ; +0x38, 0x7d455c\nBLE             loc_7D458C                                             ; +0x3c, 0x7d4560\nCMP             R0, R1                                                 ; +0x40, 0x7d4564\nMOVGE           R0, R1                                                 ; +0x44, 0x7d4568\nBX              LR                                                     ; +0x48, 0x7d456c\nCMP             R0, #0xC00                                             ; +0x4c, 0x7d4570\nBGE             loc_7D4594                                             ; +0x50, 0x7d4574\nCMP             R0, #0x800                                             ; +0x54, 0x7d4578\nBGE             loc_7D45A4                                             ; +0x58, 0x7d457c\nCMP             R0, #0x400                                             ; +0x5c, 0x7d4580\nMOVGE           R0, #0x50 ; 'P'                                        ; +0x60, 0x7d4584\nBGE             loc_7D454C                                             ; +0x64, 0x7d4588\nMOV             R0, #0                                                 ; +0x68, 0x7d458c\nBX              LR                                                     ; +0x6c, 0x7d4590\nCMN             R1, #1                                                 ; +0x70, 0x7d4594\nMOV             R0, #0x80                                              ; +0x74, 0x7d4598\nBNE             loc_7D4554                                             ; +0x78, 0x7d459c\nBX              LR                                                     ; +0x7c, 0x7d45a0\nMOV             R0, #0x70 ; 'p'                                        ; +0x80, 0x7d45a4\nB               loc_7D454C                                             ; +0x84, 0x7d45a8", "xrefs": ["DH_security_bits @ 0x7e0838", "DSA_security_bits @ 0x7e21e8", "RSA_security_bits @ 0x82db28", "<???> @ 0x5fb1c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}