{"type": "func", "start": 9130720, "end": 9130964, "name": "BIO_set_cipher", "pseudocode": "// \n// BIO_set_cipher from 0x8b52e0 to 0x8b53d4 (244 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6ad7c\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 BIO_set_cipher(int a1, int *a2, int a3, void *a4, int a5)\n{\n  int data; // r10\n  int (__fastcall *callback)(int, int, int *, int, int, int); // r7\n\n  data = BIO_get_data(a1);\n  if ( data )\n  {\n    callback = (int (__fastcall *)(int, int, int *, int, int, int))BIO_get_callback(a1);\n    if ( callback )\n    {\n      if ( callback(a1, 6, a2, 4, a5, 0) > 0 )\n      {\n        BIO_set_init(a1, 1);\n        if ( EVP_CipherInit_ex(*(int **)(data + 20), a2, nullptr, a3, a4, a5) )\n          return callback(a1, 6, a2, 4, a5, 1);\n      }\n    }\n    else\n    {\n      BIO_set_init(a1, 1);\n      if ( EVP_CipherInit_ex(*(int **)(data + 20), a2, nullptr, a3, a4, a5) )\n        return 1;\n    }\n  }\n  return 0;\n}", "assembly": "; \n; BIO_set_cipher from 0x8b52e0 to 0x8b53d4 (244 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6ad7c\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\nPUSH            {R4-R11,LR}                                            ; +0x0, 0x8b52e0\nSUB             SP, SP, #0xC                                           ; +0x4, 0x8b52e4\nMOV             R5, R1                                                 ; +0x8, 0x8b52e8\nMOV             R8, R2                                                 ; +0xc, 0x8b52ec\nMOV             R9, R3                                                 ; +0x10, 0x8b52f0\nMOV             R4, R0                                                 ; +0x14, 0x8b52f4\nLDR             R6, [SP,#0xC+arg_0]                                    ; +0x18, 0x8b52f8\nBL              BIO_get_data                                           ; +0x1c, 0x8b52fc\nSUBS            R10, R0, #0                                            ; +0x20, 0x8b5300\nBEQ             loc_8B53C8                                             ; +0x24, 0x8b5304\nMOV             R0, R4                                                 ; +0x28, 0x8b5308\nBL              BIO_get_callback                                       ; +0x2c, 0x8b530c\nSUBS            R7, R0, #0                                             ; +0x30, 0x8b5310\nBEQ             loc_8B5394                                             ; +0x34, 0x8b5314\nMOV             R11, #0                                                ; +0x38, 0x8b5318\nSTMEA           SP, {R6,R11}                                           ; +0x3c, 0x8b531c\nMOV             R0, R4                                                 ; +0x40, 0x8b5320\nMOV             R1, #6                                                 ; +0x44, 0x8b5324\nMOV             R2, R5                                                 ; +0x48, 0x8b5328\nMOV             R3, #4                                                 ; +0x4c, 0x8b532c\nBLX             R7                                                     ; +0x50, 0x8b5330\nCMP             R0, R11                                                ; +0x54, 0x8b5334\nBLE             loc_8B53C8                                             ; +0x58, 0x8b5338\nMOV             R0, R4                                                 ; +0x5c, 0x8b533c\nMOV             R1, #1                                                 ; +0x60, 0x8b5340\nBL              BIO_set_init                                           ; +0x64, 0x8b5344\nLDR             R0, [R10,#0x14]; int                                   ; +0x68, 0x8b5348\nMOV             R2, R11; int                                           ; +0x6c, 0x8b534c\nSTR             R9, [SP,#0xC+var_C]; void *                            ; +0x70, 0x8b5350\nSTR             R6, [SP,#0xC+var_8]; int                               ; +0x74, 0x8b5354\nMOV             R3, R8; int                                            ; +0x78, 0x8b5358\nMOV             R1, R5; int                                            ; +0x7c, 0x8b535c\nBL              EVP_CipherInit_ex                                      ; +0x80, 0x8b5360\nCMP             R0, #0                                                 ; +0x84, 0x8b5364\nBEQ             loc_8B53C8                                             ; +0x88, 0x8b5368\nMOV             R3, #1                                                 ; +0x8c, 0x8b536c\nSTR             R3, [SP,#0xC+var_8]                                    ; +0x90, 0x8b5370\nSTR             R6, [SP,#0xC+var_C]                                    ; +0x94, 0x8b5374\nMOV             R0, R4                                                 ; +0x98, 0x8b5378\nMOV             R2, R5                                                 ; +0x9c, 0x8b537c\nMOV             R1, #6                                                 ; +0xa0, 0x8b5380\nMOV             R3, #4                                                 ; +0xa4, 0x8b5384\nBLX             R7                                                     ; +0xa8, 0x8b5388\nADD             SP, SP, #0xC                                           ; +0xac, 0x8b538c\nPOP             {R4-R11,PC}                                            ; +0xb0, 0x8b5390\nMOV             R0, R4                                                 ; +0xb4, 0x8b5394\nMOV             R1, #1                                                 ; +0xb8, 0x8b5398\nBL              BIO_set_init                                           ; +0xbc, 0x8b539c\nLDR             R0, [R10,#0x14]; int                                   ; +0xc0, 0x8b53a0\nMOV             R1, R5; int                                            ; +0xc4, 0x8b53a4\nSTR             R9, [SP,#0xC+var_C]; void *                            ; +0xc8, 0x8b53a8\nSTR             R6, [SP,#0xC+var_8]; int                               ; +0xcc, 0x8b53ac\nMOV             R2, R7; int                                            ; +0xd0, 0x8b53b0\nMOV             R3, R8; int                                            ; +0xd4, 0x8b53b4\nBL              EVP_CipherInit_ex                                      ; +0xd8, 0x8b53b8\nCMP             R0, #0                                                 ; +0xdc, 0x8b53bc\nMOVNE           R0, #1                                                 ; +0xe0, 0x8b53c0\nBNE             loc_8B538C                                             ; +0xe4, 0x8b53c4\nMOV             R0, #0                                                 ; +0xe8, 0x8b53c8\nADD             SP, SP, #0xC                                           ; +0xec, 0x8b53cc\nPOP             {R4-R11,PC}                                            ; +0xf0, 0x8b53d0", "xrefs": ["<???> @ 0x6ad7c"], "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"}