{"type": "func", "start": 8349736, "end": 8349976, "name": "ENGINE_ctrl_cmd", "pseudocode": "// \n// ENGINE_ctrl_cmd from 0x7f6828 to 0x7f6918 (240 bytes)\n// \n// 2 xrefs:\n// > sub_643938 @ 0x6442f6\n// > <???> @ 0x5538c\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\nbool __fastcall ENGINE_ctrl_cmd(_DWORD *a1, const char *a2, unsigned int a3, const char *a4, int a5, int a6)\n{\n  bool v6; // zf\n  _DWORD *v7; // r4\n\n  v6 = a2 == nullptr;\n  if ( a2 )\n    v6 = a1 == nullptr;\n  if ( v6 )\n  {\n    ERR_put_error(38, 178, 67, \"crypto/engine/eng_ctrl.c\", 207);\n    return 0;\n  }\n  else\n  {\n    v7 = a1;\n    if ( a1[14] && (a1 = (_DWORD *)ENGINE_ctrl(a1, 13, 0, a2, 0), (int)a1 > 0) )\n    {\n      return ENGINE_ctrl(v7, (int)a1, a3, a4, a5) > 0;\n    }\n    else if ( a6 )\n    {\n      ERR_clear_error(a1);\n      return 1;\n    }\n    else\n    {\n      ERR_put_error(38, 178, 137, \"crypto/engine/eng_ctrl.c\", 225);\n      return 0;\n    }\n  }\n}", "assembly": "; \n; ENGINE_ctrl_cmd from 0x7f6828 to 0x7f6918 (240 bytes)\n; \n; 2 xrefs:\n; > sub_643938 @ 0x6442f6\n; > <???> @ 0x5538c\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             R1, #0                                                 ; +0x0, 0x7f6828\nCMPNE           R0, #0                                                 ; +0x4, 0x7f682c\nPUSH            {R4-R6,LR}                                             ; +0x8, 0x7f6830\nMOVEQ           R12, #1                                                ; +0xc, 0x7f6834\nSUB             SP, SP, #8                                             ; +0x10, 0x7f6838\nMOVNE           R12, #0                                                ; +0x14, 0x7f683c\nBEQ             loc_7F68EC                                             ; +0x18, 0x7f6840\nLDR             LR, [R0,#0x38]                                         ; +0x1c, 0x7f6844\nMOV             R4, R0                                                 ; +0x20, 0x7f6848\nCMP             LR, #0                                                 ; +0x24, 0x7f684c\nBEQ             loc_7F68A4                                             ; +0x28, 0x7f6850\nMOV             R6, R2                                                 ; +0x2c, 0x7f6854\nMOV             R5, R3                                                 ; +0x30, 0x7f6858\nSTR             R12, [SP,#8+var_8]                                     ; +0x34, 0x7f685c\nMOV             R3, R1                                                 ; +0x38, 0x7f6860\nMOV             R2, R12                                                ; +0x3c, 0x7f6864\nMOV             R1, #0xD                                               ; +0x40, 0x7f6868\nBL              ENGINE_ctrl                                            ; +0x44, 0x7f686c\nSUBS            R1, R0, #0                                             ; +0x48, 0x7f6870\nBLE             loc_7F68A4                                             ; +0x4c, 0x7f6874\nLDR             R3, [SP,#8+arg_0]                                      ; +0x50, 0x7f6878\nSTR             R3, [SP,#8+var_8]                                      ; +0x54, 0x7f687c\nMOV             R0, R4                                                 ; +0x58, 0x7f6880\nMOV             R2, R6                                                 ; +0x5c, 0x7f6884\nMOV             R3, R5                                                 ; +0x60, 0x7f6888\nBL              ENGINE_ctrl                                            ; +0x64, 0x7f688c\nCMP             R0, #0                                                 ; +0x68, 0x7f6890\nMOVLE           R0, #0                                                 ; +0x6c, 0x7f6894\nMOVGT           R0, #1                                                 ; +0x70, 0x7f6898\nADD             SP, SP, #8                                             ; +0x74, 0x7f689c\nPOP             {R4-R6,PC}                                             ; +0x78, 0x7f68a0\nLDR             R3, [SP,#8+arg_4]                                      ; +0x7c, 0x7f68a4\nCMP             R3, #0                                                 ; +0x80, 0x7f68a8\nBEQ             loc_7F68C0                                             ; +0x84, 0x7f68ac\nBL              ERR_clear_error                                        ; +0x88, 0x7f68b0\nMOV             R0, #1                                                 ; +0x8c, 0x7f68b4\nADD             SP, SP, #8                                             ; +0x90, 0x7f68b8\nPOP             {R4-R6,PC}                                             ; +0x94, 0x7f68bc\nMOV             R3, #0xE1                                              ; +0x98, 0x7f68c0\nSTR             R3, [SP,#8+var_8]                                      ; +0x9c, 0x7f68c4\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F68E0); \"crypto/engine/eng_ctrl.c\" ; +0xa0, 0x7f68c8\nMOV             R0, #0x26 ; '&'                                        ; +0xa4, 0x7f68cc\nMOV             R1, #0xB2                                              ; +0xa8, 0x7f68d0\nMOV             R2, #0x89                                              ; +0xac, 0x7f68d4\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0xb0, 0x7f68d8\nBL              ERR_put_error                                          ; +0xb4, 0x7f68dc\nLDR             R0, [SP,#8+arg_4]                                      ; +0xb8, 0x7f68e0\nADD             SP, SP, #8                                             ; +0xbc, 0x7f68e4\nPOP             {R4-R6,PC}                                             ; +0xc0, 0x7f68e8\nMOV             R3, #0xCF                                              ; +0xc4, 0x7f68ec\nSTR             R3, [SP,#8+var_8]                                      ; +0xc8, 0x7f68f0\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F690C); \"crypto/engine/eng_ctrl.c\" ; +0xcc, 0x7f68f4\nMOV             R0, #0x26 ; '&'                                        ; +0xd0, 0x7f68f8\nMOV             R1, #0xB2                                              ; +0xd4, 0x7f68fc\nMOV             R2, #0x43 ; 'C'                                        ; +0xd8, 0x7f6900\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0xdc, 0x7f6904\nBL              ERR_put_error                                          ; +0xe0, 0x7f6908\nMOV             R0, #0                                                 ; +0xe4, 0x7f690c\nADD             SP, SP, #8                                             ; +0xe8, 0x7f6910\nPOP             {R4-R6,PC}                                             ; +0xec, 0x7f6914", "xrefs": ["sub_643938 @ 0x6442f6", "<???> @ 0x5538c"], "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"}