{"type": "func", "start": 8349984, "end": 8350668, "name": "ENGINE_ctrl_cmd_string", "pseudocode": "// \n// ENGINE_ctrl_cmd_string from 0x7f6920 to 0x7f6bcc (684 bytes)\n// \n// 10 xrefs:\n// > sub_7F5E14 @ 0x7f6014\n// > sub_7F5E14 @ 0x7f603c\n// > sub_7F5E14 @ 0x7f6060\n// > sub_7F5E14 @ 0x7f60e4\n// > ENGINE_by_id @ 0x7f7f5c\n// > ENGINE_by_id @ 0x7f7f80\n// > ENGINE_by_id @ 0x7f7fa0\n// > ENGINE_by_id @ 0x7f7fc4\n// > ENGINE_by_id @ 0x7f7fe4\n// > <???> @ 0x6219c\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 ENGINE_ctrl_cmd_string(_DWORD *a1, const char *a2, const char *a3, int a4)\n{\n  bool v4; // zf\n  _DWORD *v6; // r6\n  unsigned int v8; // r8\n  int v9; // r0\n  unsigned int v11; // r2\n  char *v12; // [sp+Ch] [bp-4h] BYREF\n\n  v4 = a2 == nullptr;\n  if ( a2 )\n    v4 = a1 == nullptr;\n  if ( v4 )\n  {\n    ERR_put_error(38, 171, 67, \"crypto/engine/eng_ctrl.c\", 245);\n    return 0;\n  }\n  v6 = a1;\n  if ( a1[14] && (a1 = (_DWORD *)ENGINE_ctrl(a1, 13, 0, a2, 0), v8 = (unsigned int)a1, (int)a1 > 0) )\n  {\n    if ( ENGINE_cmd_is_executable(v6, (unsigned int)a1) )\n    {\n      v9 = ENGINE_ctrl(v6, 18, v8, nullptr, 0);\n      if ( v9 < 0 )\n      {\n        a4 = 0;\n        ERR_put_error(38, 171, 110, \"crypto/engine/eng_ctrl.c\", 279);\n      }\n      else if ( (v9 & 4) != 0 )\n      {\n        if ( a3 )\n        {\n          a4 = 0;\n          ERR_put_error(38, 171, 136, \"crypto/engine/eng_ctrl.c\", 288);\n        }\n        else\n        {\n          return ENGINE_ctrl(v6, v8, 0, nullptr, 0) > 0;\n        }\n      }\n      else if ( a3 )\n      {\n        if ( (v9 & 2) != 0 )\n        {\n          return ENGINE_ctrl(v6, v8, 0, a3, v9 & 4) > 0;\n        }\n        else\n        {\n          a4 = v9 & 1;\n          if ( (v9 & 1) != 0 )\n          {\n            v11 = strtol(a3, &v12, 10);\n            if ( a3 == v12 || *v12 )\n            {\n              ERR_put_error(38, 171, 133, \"crypto/engine/eng_ctrl.c\", 328);\n              return 0;\n            }\n            else\n            {\n              return ENGINE_ctrl(v6, v8, v11, nullptr, 0) > 0;\n            }\n          }\n          else\n          {\n            ERR_put_error(38, 171, 110, \"crypto/engine/eng_ctrl.c\", 322);\n          }\n        }\n      }\n      else\n      {\n        a4 = 0;\n        ERR_put_error(38, 171, 135, \"crypto/engine/eng_ctrl.c\", 304);\n      }\n      return a4;\n    }\n    ERR_put_error(38, 171, 134, \"crypto/engine/eng_ctrl.c\", 268);\n    return 0;\n  }\n  else\n  {\n    if ( !a4 )\n    {\n      ERR_put_error(38, 171, 137, \"crypto/engine/eng_ctrl.c\", 263);\n      return a4;\n    }\n    ERR_clear_error(a1);\n    return 1;\n  }\n}", "assembly": "; \n; ENGINE_ctrl_cmd_string from 0x7f6920 to 0x7f6bcc (684 bytes)\n; \n; 10 xrefs:\n; > sub_7F5E14 @ 0x7f6014\n; > sub_7F5E14 @ 0x7f603c\n; > sub_7F5E14 @ 0x7f6060\n; > sub_7F5E14 @ 0x7f60e4\n; > ENGINE_by_id @ 0x7f7f5c\n; > ENGINE_by_id @ 0x7f7f80\n; > ENGINE_by_id @ 0x7f7fa0\n; > ENGINE_by_id @ 0x7f7fc4\n; > ENGINE_by_id @ 0x7f7fe4\n; > <???> @ 0x6219c\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, 0x7f6920\nCMPNE           R0, #0                                                 ; +0x4, 0x7f6924\nPUSH            {R4-R8,LR}                                             ; +0x8, 0x7f6928\nMOVEQ           R5, #1                                                 ; +0xc, 0x7f692c\nSUB             SP, SP, #0x10                                          ; +0x10, 0x7f6930\nMOVNE           R5, #0                                                 ; +0x14, 0x7f6934\nBEQ             loc_7F6A24                                             ; +0x18, 0x7f6938\nLDR             R12, [R0,#0x38]                                        ; +0x1c, 0x7f693c\nMOV             R4, R3                                                 ; +0x20, 0x7f6940\nCMP             R12, #0                                                ; +0x24, 0x7f6944\nMOV             R6, R0                                                 ; +0x28, 0x7f6948\nBEQ             loc_7F69DC                                             ; +0x2c, 0x7f694c\nMOV             R3, R1                                                 ; +0x30, 0x7f6950\nMOV             R7, R2                                                 ; +0x34, 0x7f6954\nSTR             R5, [SP,#0x10+var_10]                                  ; +0x38, 0x7f6958\nMOV             R1, #0xD                                               ; +0x3c, 0x7f695c\nMOV             R2, R5                                                 ; +0x40, 0x7f6960\nBL              ENGINE_ctrl                                            ; +0x44, 0x7f6964\nSUBS            R8, R0, #0                                             ; +0x48, 0x7f6968\nBLE             loc_7F69DC                                             ; +0x4c, 0x7f696c\nMOV             R0, R6                                                 ; +0x50, 0x7f6970\nMOV             R1, R8                                                 ; +0x54, 0x7f6974\nBL              ENGINE_cmd_is_executable                               ; +0x58, 0x7f6978\nSUBS            R4, R0, #0                                             ; +0x5c, 0x7f697c\nBEQ             loc_7F6A54                                             ; +0x60, 0x7f6980\nSTR             R5, [SP,#0x10+var_10]                                  ; +0x64, 0x7f6984\nMOV             R0, R6                                                 ; +0x68, 0x7f6988\nMOV             R1, #0x12                                              ; +0x6c, 0x7f698c\nMOV             R2, R8                                                 ; +0x70, 0x7f6990\nMOV             R3, R5                                                 ; +0x74, 0x7f6994\nBL              ENGINE_ctrl                                            ; +0x78, 0x7f6998\nCMP             R0, #0                                                 ; +0x7c, 0x7f699c\nBLT             loc_7F6B5C                                             ; +0x80, 0x7f69a0\nANDS            R2, R0, #4                                             ; +0x84, 0x7f69a4\nBEQ             loc_7F6A80                                             ; +0x88, 0x7f69a8\nCMP             R7, #0                                                 ; +0x8c, 0x7f69ac\nBEQ             loc_7F6B34                                             ; +0x90, 0x7f69b0\nMOV             R3, #0x120                                             ; +0x94, 0x7f69b4\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x98, 0x7f69b8\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F69D4); \"crypto/engine/eng_ctrl.c\" ; +0x9c, 0x7f69bc\nMOV             R0, #0x26 ; '&'                                        ; +0xa0, 0x7f69c0\nMOV             R1, #0xAB                                              ; +0xa4, 0x7f69c4\nMOV             R2, #0x88                                              ; +0xa8, 0x7f69c8\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0xac, 0x7f69cc\nMOV             R4, R5                                                 ; +0xb0, 0x7f69d0\nBL              ERR_put_error                                          ; +0xb4, 0x7f69d4\nB               loc_7F6A04                                             ; +0xb8, 0x7f69d8\nCMP             R4, #0                                                 ; +0xbc, 0x7f69dc\nBNE             loc_7F6A10                                             ; +0xc0, 0x7f69e0\nLDR             R3, =0x107                                             ; +0xc4, 0x7f69e4\nSTR             R3, [SP,#0x10+var_10]                                  ; +0xc8, 0x7f69e8\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F6A04); \"crypto/engine/eng_ctrl.c\" ; +0xcc, 0x7f69ec\nMOV             R0, #0x26 ; '&'                                        ; +0xd0, 0x7f69f0\nMOV             R1, #0xAB                                              ; +0xd4, 0x7f69f4\nMOV             R2, #0x89                                              ; +0xd8, 0x7f69f8\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0xdc, 0x7f69fc\nBL              ERR_put_error                                          ; +0xe0, 0x7f6a00\nMOV             R0, R4                                                 ; +0xe4, 0x7f6a04\nADD             SP, SP, #0x10                                          ; +0xe8, 0x7f6a08\nPOP             {R4-R8,PC}                                             ; +0xec, 0x7f6a0c\nBL              ERR_clear_error                                        ; +0xf0, 0x7f6a10\nMOV             R4, #1                                                 ; +0xf4, 0x7f6a14\nMOV             R0, R4                                                 ; +0xf8, 0x7f6a18\nADD             SP, SP, #0x10                                          ; +0xfc, 0x7f6a1c\nPOP             {R4-R8,PC}                                             ; +0x100, 0x7f6a20\nMOV             R3, #0xF5                                              ; +0x104, 0x7f6a24\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x108, 0x7f6a28\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F6A44); \"crypto/engine/eng_ctrl.c\" ; +0x10c, 0x7f6a2c\nMOV             R0, #0x26 ; '&'                                        ; +0x110, 0x7f6a30\nMOV             R1, #0xAB                                              ; +0x114, 0x7f6a34\nMOV             R2, #0x43 ; 'C'                                        ; +0x118, 0x7f6a38\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0x11c, 0x7f6a3c\nBL              ERR_put_error                                          ; +0x120, 0x7f6a40\nMOV             R4, #0                                                 ; +0x124, 0x7f6a44\nMOV             R0, R4                                                 ; +0x128, 0x7f6a48\nADD             SP, SP, #0x10                                          ; +0x12c, 0x7f6a4c\nPOP             {R4-R8,PC}                                             ; +0x130, 0x7f6a50\nMOV             R3, #0x10C                                             ; +0x134, 0x7f6a54\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x138, 0x7f6a58\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F6A74); \"crypto/engine/eng_ctrl.c\" ; +0x13c, 0x7f6a5c\nMOV             R0, #0x26 ; '&'                                        ; +0x140, 0x7f6a60\nMOV             R1, #0xAB                                              ; +0x144, 0x7f6a64\nMOV             R2, #0x86                                              ; +0x148, 0x7f6a68\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0x14c, 0x7f6a6c\nBL              ERR_put_error                                          ; +0x150, 0x7f6a70\nMOV             R0, R4                                                 ; +0x154, 0x7f6a74\nADD             SP, SP, #0x10                                          ; +0x158, 0x7f6a78\nPOP             {R4-R8,PC}                                             ; +0x15c, 0x7f6a7c\nCMP             R7, #0                                                 ; +0x160, 0x7f6a80\nBEQ             loc_7F6BA4                                             ; +0x164, 0x7f6a84\nTST             R0, #2                                                 ; +0x168, 0x7f6a88\nBNE             loc_7F6B10                                             ; +0x16c, 0x7f6a8c\nANDS            R4, R0, #1                                             ; +0x170, 0x7f6a90\nBEQ             loc_7F6AEC                                             ; +0x174, 0x7f6a94\nMOV             R2, #0xA; int                                          ; +0x178, 0x7f6a98\nMOV             R0, R7; char *                                         ; +0x17c, 0x7f6a9c\nADD             R1, SP, #0x10+var_4; char **                           ; +0x180, 0x7f6aa0\nBL              strtol                                                 ; +0x184, 0x7f6aa4\nLDR             R3, [SP,#0x10+var_4]                                   ; +0x188, 0x7f6aa8\nCMP             R7, R3                                                 ; +0x18c, 0x7f6aac\nMOV             R2, R0                                                 ; +0x190, 0x7f6ab0\nBEQ             loc_7F6AC4                                             ; +0x194, 0x7f6ab4\nLDRB            R3, [R3]                                               ; +0x198, 0x7f6ab8\nCMP             R3, #0                                                 ; +0x19c, 0x7f6abc\nBEQ             loc_7F6B84                                             ; +0x1a0, 0x7f6ac0\nMOV             R3, #0x148                                             ; +0x1a4, 0x7f6ac4\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x1a8, 0x7f6ac8\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F6AE4); \"crypto/engine/eng_ctrl.c\" ; +0x1ac, 0x7f6acc\nMOV             R0, #0x26 ; '&'                                        ; +0x1b0, 0x7f6ad0\nMOV             R1, #0xAB                                              ; +0x1b4, 0x7f6ad4\nMOV             R2, #0x85                                              ; +0x1b8, 0x7f6ad8\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0x1bc, 0x7f6adc\nBL              ERR_put_error                                          ; +0x1c0, 0x7f6ae0\nMOV             R4, #0                                                 ; +0x1c4, 0x7f6ae4\nB               loc_7F6A04                                             ; +0x1c8, 0x7f6ae8\nLDR             R3, =0x142                                             ; +0x1cc, 0x7f6aec\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x1d0, 0x7f6af0\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F6B0C); \"crypto/engine/eng_ctrl.c\" ; +0x1d4, 0x7f6af4\nMOV             R0, #0x26 ; '&'                                        ; +0x1d8, 0x7f6af8\nMOV             R1, #0xAB                                              ; +0x1dc, 0x7f6afc\nMOV             R2, #0x6E ; 'n'                                        ; +0x1e0, 0x7f6b00\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0x1e4, 0x7f6b04\nBL              ERR_put_error                                          ; +0x1e8, 0x7f6b08\nB               loc_7F6A04                                             ; +0x1ec, 0x7f6b0c\nSTR             R2, [SP,#0x10+var_10]                                  ; +0x1f0, 0x7f6b10\nMOV             R0, R6                                                 ; +0x1f4, 0x7f6b14\nMOV             R1, R8                                                 ; +0x1f8, 0x7f6b18\nMOV             R3, R7                                                 ; +0x1fc, 0x7f6b1c\nBL              ENGINE_ctrl                                            ; +0x200, 0x7f6b20\nCMP             R0, #0                                                 ; +0x204, 0x7f6b24\nMOVLE           R4, #0                                                 ; +0x208, 0x7f6b28\nMOVGT           R4, #1                                                 ; +0x20c, 0x7f6b2c\nB               loc_7F6A04                                             ; +0x210, 0x7f6b30\nSTR             R7, [SP,#0x10+var_10]                                  ; +0x214, 0x7f6b34\nMOV             R0, R6                                                 ; +0x218, 0x7f6b38\nMOV             R1, R8                                                 ; +0x21c, 0x7f6b3c\nMOV             R2, R7                                                 ; +0x220, 0x7f6b40\nMOV             R3, R7                                                 ; +0x224, 0x7f6b44\nBL              ENGINE_ctrl                                            ; +0x228, 0x7f6b48\nCMP             R0, #0                                                 ; +0x22c, 0x7f6b4c\nMOVLE           R4, #0                                                 ; +0x230, 0x7f6b50\nMOVGT           R4, #1                                                 ; +0x234, 0x7f6b54\nB               loc_7F6A04                                             ; +0x238, 0x7f6b58\nLDR             R3, =0x117                                             ; +0x23c, 0x7f6b5c\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x240, 0x7f6b60\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F6B7C); \"crypto/engine/eng_ctrl.c\" ; +0x244, 0x7f6b64\nMOV             R0, #0x26 ; '&'                                        ; +0x248, 0x7f6b68\nMOV             R1, #0xAB                                              ; +0x24c, 0x7f6b6c\nMOV             R2, #0x6E ; 'n'                                        ; +0x250, 0x7f6b70\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0x254, 0x7f6b74\nMOV             R4, R5                                                 ; +0x258, 0x7f6b78\nBL              ERR_put_error                                          ; +0x25c, 0x7f6b7c\nB               loc_7F6A04                                             ; +0x260, 0x7f6b80\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x264, 0x7f6b84\nMOV             R0, R6                                                 ; +0x268, 0x7f6b88\nMOV             R1, R8                                                 ; +0x26c, 0x7f6b8c\nBL              ENGINE_ctrl                                            ; +0x270, 0x7f6b90\nCMP             R0, #0                                                 ; +0x274, 0x7f6b94\nMOVLE           R4, #0                                                 ; +0x278, 0x7f6b98\nMOVGT           R4, #1                                                 ; +0x27c, 0x7f6b9c\nB               loc_7F6A04                                             ; +0x280, 0x7f6ba0\nMOV             R3, #0x130                                             ; +0x284, 0x7f6ba4\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x288, 0x7f6ba8\nLDR             R3, =(aCryptoEngineEn_0 - 0x7F6BC4); \"crypto/engine/eng_ctrl.c\" ; +0x28c, 0x7f6bac\nMOV             R0, #0x26 ; '&'                                        ; +0x290, 0x7f6bb0\nMOV             R1, #0xAB                                              ; +0x294, 0x7f6bb4\nMOV             R2, #0x87                                              ; +0x298, 0x7f6bb8\nADD             R3, PC, R3; \"crypto/engine/eng_ctrl.c\"                 ; +0x29c, 0x7f6bbc\nMOV             R4, R7                                                 ; +0x2a0, 0x7f6bc0\nBL              ERR_put_error                                          ; +0x2a4, 0x7f6bc4\nB               loc_7F6A04                                             ; +0x2a8, 0x7f6bc8", "xrefs": ["sub_7F5E14 @ 0x7f6014", "sub_7F5E14 @ 0x7f603c", "sub_7F5E14 @ 0x7f6060", "sub_7F5E14 @ 0x7f60e4", "ENGINE_by_id @ 0x7f7f5c", "ENGINE_by_id @ 0x7f7f80", "ENGINE_by_id @ 0x7f7fa0", "ENGINE_by_id @ 0x7f7fc4", "ENGINE_by_id @ 0x7f7fe4", "<???> @ 0x6219c"], "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"}