{"type": "func", "start": 11313888, "end": 11314132, "name": "BIO_set_cipher", "pseudocode": "// \n// BIO_set_cipher from 0xaca2e0 to 0xaca3d4 (244 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x847fc\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:09:20 +0000\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 0xaca2e0 to 0xaca3d4 (244 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x847fc\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:09:20 +0000\n; \nPUSH            {R4-R11,LR}                                            ; +0x0, 0xaca2e0\nSUB             SP, SP, #0xC                                           ; +0x4, 0xaca2e4\nMOV             R5, R1                                                 ; +0x8, 0xaca2e8\nMOV             R8, R2                                                 ; +0xc, 0xaca2ec\nMOV             R9, R3                                                 ; +0x10, 0xaca2f0\nMOV             R4, R0                                                 ; +0x14, 0xaca2f4\nLDR             R6, [SP,#0xC+arg_0]                                    ; +0x18, 0xaca2f8\nBL              BIO_get_data                                           ; +0x1c, 0xaca2fc\nSUBS            R10, R0, #0                                            ; +0x20, 0xaca300\nBEQ             loc_ACA3C8                                             ; +0x24, 0xaca304\nMOV             R0, R4                                                 ; +0x28, 0xaca308\nBL              BIO_get_callback                                       ; +0x2c, 0xaca30c\nSUBS            R7, R0, #0                                             ; +0x30, 0xaca310\nBEQ             loc_ACA394                                             ; +0x34, 0xaca314\nMOV             R11, #0                                                ; +0x38, 0xaca318\nSTMEA           SP, {R6,R11}                                           ; +0x3c, 0xaca31c\nMOV             R0, R4                                                 ; +0x40, 0xaca320\nMOV             R1, #6                                                 ; +0x44, 0xaca324\nMOV             R2, R5                                                 ; +0x48, 0xaca328\nMOV             R3, #4                                                 ; +0x4c, 0xaca32c\nBLX             R7                                                     ; +0x50, 0xaca330\nCMP             R0, R11                                                ; +0x54, 0xaca334\nBLE             loc_ACA3C8                                             ; +0x58, 0xaca338\nMOV             R0, R4                                                 ; +0x5c, 0xaca33c\nMOV             R1, #1                                                 ; +0x60, 0xaca340\nBL              BIO_set_init                                           ; +0x64, 0xaca344\nLDR             R0, [R10,#0x14]; int                                   ; +0x68, 0xaca348\nMOV             R2, R11; int                                           ; +0x6c, 0xaca34c\nSTR             R9, [SP,#0xC+var_C]; void *                            ; +0x70, 0xaca350\nSTR             R6, [SP,#0xC+var_8]; int                               ; +0x74, 0xaca354\nMOV             R3, R8; int                                            ; +0x78, 0xaca358\nMOV             R1, R5; int                                            ; +0x7c, 0xaca35c\nBL              EVP_CipherInit_ex                                      ; +0x80, 0xaca360\nCMP             R0, #0                                                 ; +0x84, 0xaca364\nBEQ             loc_ACA3C8                                             ; +0x88, 0xaca368\nMOV             R3, #1                                                 ; +0x8c, 0xaca36c\nSTR             R3, [SP,#0xC+var_8]                                    ; +0x90, 0xaca370\nSTR             R6, [SP,#0xC+var_C]                                    ; +0x94, 0xaca374\nMOV             R0, R4                                                 ; +0x98, 0xaca378\nMOV             R2, R5                                                 ; +0x9c, 0xaca37c\nMOV             R1, #6                                                 ; +0xa0, 0xaca380\nMOV             R3, #4                                                 ; +0xa4, 0xaca384\nBLX             R7                                                     ; +0xa8, 0xaca388\nADD             SP, SP, #0xC                                           ; +0xac, 0xaca38c\nPOP             {R4-R11,PC}                                            ; +0xb0, 0xaca390\nMOV             R0, R4                                                 ; +0xb4, 0xaca394\nMOV             R1, #1                                                 ; +0xb8, 0xaca398\nBL              BIO_set_init                                           ; +0xbc, 0xaca39c\nLDR             R0, [R10,#0x14]; int                                   ; +0xc0, 0xaca3a0\nMOV             R1, R5; int                                            ; +0xc4, 0xaca3a4\nSTR             R9, [SP,#0xC+var_C]; void *                            ; +0xc8, 0xaca3a8\nSTR             R6, [SP,#0xC+var_8]; int                               ; +0xcc, 0xaca3ac\nMOV             R2, R7; int                                            ; +0xd0, 0xaca3b0\nMOV             R3, R8; int                                            ; +0xd4, 0xaca3b4\nBL              EVP_CipherInit_ex                                      ; +0xd8, 0xaca3b8\nCMP             R0, #0                                                 ; +0xdc, 0xaca3bc\nMOVNE           R0, #1                                                 ; +0xe0, 0xaca3c0\nBNE             loc_ACA38C                                             ; +0xe4, 0xaca3c4\nMOV             R0, #0                                                 ; +0xe8, 0xaca3c8\nADD             SP, SP, #0xC                                           ; +0xec, 0xaca3cc\nPOP             {R4-R11,PC}                                            ; +0xf0, 0xaca3d0", "xrefs": ["<???> @ 0x847fc"], "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"}