{"type": "func", "start": 10377860, "end": 10378092, "name": "BIO_callback_ctrl", "pseudocode": "// \n// BIO_callback_ctrl from 0x9e5a84 to 0x9e5b6c (232 bytes)\n// \n// 8 xrefs:\n// > sub_99A620 @ 0x99a64c\n// > sub_9E476C @ 0x9e4778\n// > sub_9E6534 @ 0x9e6630\n// > sub_AC9A98 @ 0xac9abc\n// > sub_ACA3D4 @ 0xaca3f8\n// > sub_AE6C44 @ 0xae6c68\n// > sub_AEA914 @ 0xaea938\n// > <???> @ 0x7381c\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:23 +0000\n// \n\nint __fastcall BIO_callback_ctrl(_DWORD *a1, int a2, int a3)\n{\n  int (*v4)(void); // r3\n  int (__fastcall *v5)(_DWORD *, int); // r6\n  int result; // r0\n  int v8; // r0\n  int v9; // [sp+Ch] [bp-4h] BYREF\n\n  v9 = a3;\n  if ( !a1 )\n    return 0;\n  if ( *a1 && (v4 = *(int (**)(void))(*a1 + 36)) != nullptr )\n  {\n    v5 = (int (__fastcall *)(_DWORD *, int))a1[1];\n    if ( v5 )\n    {\n      result = v5(a1, 6);\n      if ( result > 0 )\n      {\n        v8 = (*(int (__fastcall **)(_DWORD *, int, int))(*a1 + 36))(a1, a2, v9);\n        return ((int (__fastcall *)(_DWORD *, int, int *, int, _DWORD, int))v5)(a1, 134, &v9, a2, 0, v8);\n      }\n    }\n    else\n    {\n      return v4();\n    }\n  }\n  else\n  {\n    ERR_put_error(32, 131, 121, \"crypto/bio/bio_lib.c\", 364);\n    return -2;\n  }\n  return result;\n}", "assembly": "; \n; BIO_callback_ctrl from 0x9e5a84 to 0x9e5b6c (232 bytes)\n; \n; 8 xrefs:\n; > sub_99A620 @ 0x99a64c\n; > sub_9E476C @ 0x9e4778\n; > sub_9E6534 @ 0x9e6630\n; > sub_AC9A98 @ 0xac9abc\n; > sub_ACA3D4 @ 0xaca3f8\n; > sub_AE6C44 @ 0xae6c68\n; > sub_AEA914 @ 0xaea938\n; > <???> @ 0x7381c\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:23 +0000\n; \nPUSH            {R4-R8,LR}                                             ; +0x0, 0x9e5a84\nSUBS            R12, R0, #0                                            ; +0x4, 0x9e5a88\nSUB             SP, SP, #0x10                                          ; +0x8, 0x9e5a8c\nSTR             R2, [SP,#0x10+var_4]                                   ; +0xc, 0x9e5a90\nBEQ             loc_9E5B38                                             ; +0x10, 0x9e5a94\nLDR             R3, [R12]                                              ; +0x14, 0x9e5a98\nMOV             R5, R12                                                ; +0x18, 0x9e5a9c\nCMP             R3, #0                                                 ; +0x1c, 0x9e5aa0\nBEQ             loc_9E5B44                                             ; +0x20, 0x9e5aa4\nLDR             R3, [R3,#0x24]                                         ; +0x24, 0x9e5aa8\nCMP             R3, #0                                                 ; +0x28, 0x9e5aac\nBEQ             loc_9E5B44                                             ; +0x2c, 0x9e5ab0\nLDR             R6, [R12,#4]                                           ; +0x30, 0x9e5ab4\nCMP             R6, #0                                                 ; +0x34, 0x9e5ab8\nBEQ             loc_9E5B2C                                             ; +0x38, 0x9e5abc\nMOV             R4, R1                                                 ; +0x3c, 0x9e5ac0\nMOV             R3, #1                                                 ; +0x40, 0x9e5ac4\nADD             R7, SP, #0x10+var_4                                    ; +0x44, 0x9e5ac8\nMOV             R8, #0                                                 ; +0x48, 0x9e5acc\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x4c, 0x9e5ad0\nMOV             R2, R7                                                 ; +0x50, 0x9e5ad4\nSTR             R8, [SP,#0x10+var_10]                                  ; +0x54, 0x9e5ad8\nMOV             R1, #6                                                 ; +0x58, 0x9e5adc\nMOV             R3, R4                                                 ; +0x5c, 0x9e5ae0\nBLX             R6                                                     ; +0x60, 0x9e5ae4\nCMP             R0, #0                                                 ; +0x64, 0x9e5ae8\nBLE             loc_9E5B24                                             ; +0x68, 0x9e5aec\nLDR             R3, [R5]                                               ; +0x6c, 0x9e5af0\nMOV             R1, R4                                                 ; +0x70, 0x9e5af4\nLDR             R3, [R3,#0x24]                                         ; +0x74, 0x9e5af8\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x78, 0x9e5afc\nMOV             R0, R5                                                 ; +0x7c, 0x9e5b00\nBLX             R3                                                     ; +0x80, 0x9e5b04\nSTR             R8, [SP,#0x10+var_10]                                  ; +0x84, 0x9e5b08\nMOV             R2, R7                                                 ; +0x88, 0x9e5b0c\nMOV             R3, R4                                                 ; +0x8c, 0x9e5b10\nMOV             R1, #0x86                                              ; +0x90, 0x9e5b14\nSTR             R0, [SP,#0x10+var_C]                                   ; +0x94, 0x9e5b18\nMOV             R0, R5                                                 ; +0x98, 0x9e5b1c\nBLX             R6                                                     ; +0x9c, 0x9e5b20\nADD             SP, SP, #0x10                                          ; +0xa0, 0x9e5b24\nPOP             {R4-R8,PC}                                             ; +0xa4, 0x9e5b28\nBLX             R3                                                     ; +0xa8, 0x9e5b2c\nADD             SP, SP, #0x10                                          ; +0xac, 0x9e5b30\nPOP             {R4-R8,PC}                                             ; +0xb0, 0x9e5b34\nMOV             R0, R12                                                ; +0xb4, 0x9e5b38\nADD             SP, SP, #0x10                                          ; +0xb8, 0x9e5b3c\nPOP             {R4-R8,PC}                                             ; +0xbc, 0x9e5b40\nMOV             R3, #0x16C                                             ; +0xc0, 0x9e5b44\nSTR             R3, [SP,#0x10+var_10]                                  ; +0xc4, 0x9e5b48\nLDR             R3, =(aCryptoBioBioLi - 0x9E5B64); \"crypto/bio/bio_lib.c\" ; +0xc8, 0x9e5b4c\nMOV             R0, #0x20 ; ' '                                        ; +0xcc, 0x9e5b50\nMOV             R1, #0x83                                              ; +0xd0, 0x9e5b54\nMOV             R2, #0x79 ; 'y'                                        ; +0xd4, 0x9e5b58\nADD             R3, PC, R3; \"crypto/bio/bio_lib.c\"                     ; +0xd8, 0x9e5b5c\nBL              ERR_put_error                                          ; +0xdc, 0x9e5b60\nMOV             R0, #0xFFFFFFFE                                        ; +0xe0, 0x9e5b64\nB               loc_9E5B24                                             ; +0xe4, 0x9e5b68", "xrefs": ["sub_99A620 @ 0x99a64c", "sub_9E476C @ 0x9e4778", "sub_9E6534 @ 0x9e6630", "sub_AC9A98 @ 0xac9abc", "sub_ACA3D4 @ 0xaca3f8", "sub_AE6C44 @ 0xae6c68", "sub_AEA914 @ 0xaea938", "<???> @ 0x7381c"], "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"}