{"type": "func", "start": 7869064, "end": 7869332, "name": "EditorSFXManager::importFromString", "pseudocode": "// \n// EditorSFXManager::importFromString from 0x781288 to 0x781394 (268 bytes)\n// \n// 2 xrefs:\n// > EditorSFXManager::applyConfigDirect @ 0x78142e\n// > EditorSFXManager::applyMyConfig @ 0x781522\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 11:59:29 +0000\n// \n\nint __fastcall EditorSFXManager::importFromString(EditorSFXManager *a1, unsigned __int8 *a2, _DWORD *a3, int *a4)\n{\n  int v5; // r4\n  int v8; // r4\n  int v9; // r3\n  size_t v10; // r3\n  const char *v11; // r0\n  int *v12; // r0\n  char *v13; // r1\n  unsigned __int8 v15[4]; // [sp+Ch] [bp-1Ch] BYREF\n  int v16; // [sp+10h] [bp-18h]\n  int v17[3]; // [sp+18h] [bp-10h] BYREF\n\n  v5 = *a2;\n  if ( (v5 & 1) != 0 )\n    v8 = *((_DWORD *)a2 + 1);\n  else\n    v8 = v5 >> 1;\n  if ( v8 )\n  {\n    cocos2d::ZipUtils::decompressString(v15, a2, 0, 0);\n    if ( (v15[0] & 1) != 0 )\n      v9 = v16;\n    else\n      v9 = (int)v15[0] >> 1;\n    if ( !v9 )\n    {\n      if ( a4 )\n        std::string::assign(a4, \"Invalid or corrupt share string.\");\n      v8 = 0;\n      goto LABEL_29;\n    }\n    v10 = std::string::find(v15, 59, 0);\n    if ( v10 == -1 )\n      std::string::basic_string(v17, (int)v15);\n    else\n      std::string::basic_string(v17, v15, 0, v10);\n    if ( (v17[0] & 1) != 0 )\n      v11 = (const char *)v17[2];\n    else\n      v11 = (char *)v17 + 1;\n    if ( (unsigned int)(atoi(v11) - 1) <= 1 )\n    {\n      v8 = EditorSFXManager::deserializeAll(a1, v15, *a3 == 0);\n      if ( v8 )\n        goto LABEL_28;\n      if ( !a4 )\n      {\nLABEL_22:\n        v8 = 0;\nLABEL_28:\n        std::string::~string((int)v17);\nLABEL_29:\n        std::string::~string((int)v15);\n        return v8;\n      }\n      v12 = a4;\n      v13 = \"Parse error.\";\n    }\n    else\n    {\n      if ( !a4 )\n        goto LABEL_22;\n      v12 = a4;\n      v13 = \"Invalid or corrupt share string.\";\n    }\n    std::string::assign(v12, v13);\n    goto LABEL_22;\n  }\n  if ( !a4 )\n    return 0;\n  std::string::assign(a4, \"Empty string.\");\n  return v8;\n}", "assembly": "; \n; EditorSFXManager::importFromString from 0x781288 to 0x781394 (268 bytes)\n; \n; 2 xrefs:\n; > EditorSFXManager::applyConfigDirect @ 0x78142e\n; > EditorSFXManager::applyMyConfig @ 0x781522\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 11:59:29 +0000\n; \nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x781288\nMOV             R8, R0                                                 ; +0x4, 0x78128c\nLDRB            R4, [R1]                                               ; +0x6, 0x78128e\nMOV             R5, R3                                                 ; +0x8, 0x781290\nLDR             R7, =(__stack_chk_guard_ptr - 0x78129E)                ; +0xa, 0x781292\nSUB             SP, SP, #0x28                                          ; +0xc, 0x781294\nLSLS            R0, R4, #0x1F                                          ; +0xe, 0x781296\nMOV             R9, R2                                                 ; +0x10, 0x781298\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x12, 0x78129a\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x14, 0x78129c\nITE PL                                                                 ; +0x16, 0x78129e\nASRPL           R4, R4, #1                                             ; +0x18, 0x7812a0\nLDRMI           R4, [R1,#4]                                            ; +0x1a, 0x7812a2\nLDR             R3, [R7]                                               ; +0x1c, 0x7812a4\nSTR             R3, [SP,#0x28+var_4]                                   ; +0x1e, 0x7812a6\nCBNZ            R4, loc_7812BA                                         ; +0x20, 0x7812a8\nCMP             R5, #0                                                 ; +0x22, 0x7812aa\nBEQ             loc_78136C                                             ; +0x24, 0x7812ac\nLDR             R1, =(aEmptyString - 0x7812B6); \"Empty string.\"        ; +0x26, 0x7812ae\nMOV             R0, R5; int                                            ; +0x28, 0x7812b0\nADD             R1, PC; \"Empty string.\"                                ; +0x2a, 0x7812b2\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x2c, 0x7812b4\nB               loc_78136E                                             ; +0x30, 0x7812b8\nADD             R6, SP, #0x28+var_1C                                   ; +0x32, 0x7812ba\nMOVS            R2, #0                                                 ; +0x34, 0x7812bc\nMOV             R3, R2                                                 ; +0x36, 0x7812be\nMOV             R0, R6                                                 ; +0x38, 0x7812c0\nBL              _ZN7cocos2d8ZipUtils16decompressStringERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbi; cocos2d::ZipUtils::decompressString(std::string const&,bool,int) ; +0x3a, 0x7812c2\nLDRB.W          R3, [SP,#0x28+var_1C]                                  ; +0x3e, 0x7812c6\nLSLS            R1, R3, #0x1F                                          ; +0x42, 0x7812ca\nITE PL                                                                 ; +0x44, 0x7812cc\nASRPL           R3, R3, #1                                             ; +0x46, 0x7812ce\nLDRMI           R3, [SP,#0x28+var_18]                                  ; +0x48, 0x7812d0\nCBNZ            R3, loc_7812E6                                         ; +0x4a, 0x7812d2\nCBNZ            R5, loc_7812DA                                         ; +0x4c, 0x7812d4\nMOVS            R4, #0                                                 ; +0x4e, 0x7812d6\nB               loc_781364                                             ; +0x50, 0x7812d8\nLDR             R1, =(aInvalidOrCorru - 0x7812E2); \"Invalid or corrupt share string.\" ; +0x52, 0x7812da\nMOV             R0, R5; int                                            ; +0x54, 0x7812dc\nADD             R1, PC; \"Invalid or corrupt share string.\"             ; +0x56, 0x7812de\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x58, 0x7812e0\nB               loc_7812D6                                             ; +0x5c, 0x7812e4\nMOVS            R2, #0                                                 ; +0x5e, 0x7812e6\nMOV             R0, R6                                                 ; +0x60, 0x7812e8\nMOVS            R1, #0x3B ; ';'                                        ; +0x62, 0x7812ea\nADD.W           R10, SP, #0x28+var_10                                  ; +0x64, 0x7812ec\nBL              _ZNKSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcj; std::string::find(char,uint) ; +0x68, 0x7812f0\nADDS            R2, R0, #1                                             ; +0x6c, 0x7812f4\nMOV             R3, R0                                                 ; +0x6e, 0x7812f6\nBNE             loc_781310                                             ; +0x70, 0x7812f8\nMOV             R0, R10                                                ; +0x72, 0x7812fa\nMOV             R1, R6                                                 ; +0x74, 0x7812fc\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x76, 0x7812fe\nLDRB.W          R3, [SP,#0x28+var_10]                                  ; +0x7a, 0x781302\nLSLS            R3, R3, #0x1F                                          ; +0x7e, 0x781306\nBMI             loc_78131E                                             ; +0x80, 0x781308\nADD.W           R0, SP, #0x28+var_F                                    ; +0x82, 0x78130a\nB               loc_781320                                             ; +0x86, 0x78130e\nSTR             R6, [SP,#0x28+var_28]                                  ; +0x88, 0x781310\nMOV             R0, R10                                                ; +0x8a, 0x781312\nMOV             R1, R6                                                 ; +0x8c, 0x781314\nMOVS            R2, #0                                                 ; +0x8e, 0x781316\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_jjRKS4_; std::string::basic_string(std::string const&,uint,uint,std::allocator<char> const&) ; +0x90, 0x781318\nB               loc_781302                                             ; +0x94, 0x78131c\nLDR             R0, [SP,#0x28+var_8]; char *                           ; +0x96, 0x78131e\nBLX             atoi                                                   ; +0x98, 0x781320\nSUBS            R0, #1                                                 ; +0x9c, 0x781324\nCMP             R0, #1                                                 ; +0x9e, 0x781326\nBLS             loc_781338                                             ; +0xa0, 0x781328\nCBNZ            R5, loc_781330                                         ; +0xa2, 0x78132a\nMOVS            R4, #0                                                 ; +0xa4, 0x78132c\nB               loc_78135E                                             ; +0xa6, 0x78132e\nLDR             R1, =(aInvalidOrCorru - 0x781338); \"Invalid or corrupt share string.\" ; +0xa8, 0x781330\nMOV             R0, R5                                                 ; +0xaa, 0x781332\nADD             R1, PC; \"Invalid or corrupt share string.\"             ; +0xac, 0x781334\nB               loc_781358                                             ; +0xae, 0x781336\nLDR.W           R2, [R9]                                               ; +0xb0, 0x781338\nMOV             R0, R8                                                 ; +0xb4, 0x78133c\nMOV             R1, R6                                                 ; +0xb6, 0x78133e\nCLZ.W           R2, R2                                                 ; +0xb8, 0x781340\nLSRS            R2, R2, #5                                             ; +0xbc, 0x781344\nBL              _ZN16EditorSFXManager14deserializeAllERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEb; EditorSFXManager::deserializeAll(std::string const&,bool) ; +0xbe, 0x781346\nMOV             R4, R0                                                 ; +0xc2, 0x78134a\nCBNZ            R0, loc_78135E                                         ; +0xc4, 0x78134c\nCMP             R5, #0                                                 ; +0xc6, 0x78134e\nBEQ             loc_78132C                                             ; +0xc8, 0x781350\nLDR             R1, =(aParseError - 0x78135A); \"Parse error.\"          ; +0xca, 0x781352\nMOV             R0, R5; int                                            ; +0xcc, 0x781354\nADD             R1, PC; \"Parse error.\"                                 ; +0xce, 0x781356\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xd0, 0x781358\nB               loc_78132C                                             ; +0xd4, 0x78135c\nMOV             R0, R10                                                ; +0xd6, 0x78135e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xd8, 0x781360\nMOV             R0, R6                                                 ; +0xdc, 0x781364\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xde, 0x781366\nB               loc_78136E                                             ; +0xe2, 0x78136a\nMOV             R4, R5                                                 ; +0xe4, 0x78136c\nLDR             R2, [SP,#0x28+var_4]                                   ; +0xe6, 0x78136e\nMOV             R0, R4                                                 ; +0xe8, 0x781370\nLDR             R3, [R7]                                               ; +0xea, 0x781372\nCMP             R2, R3                                                 ; +0xec, 0x781374\nBEQ             loc_78138E                                             ; +0xee, 0x781376\nBLX             __stack_chk_fail                                       ; +0xf0, 0x781378\nMOV             R0, R10                                                ; +0xf4, 0x78137c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xf6, 0x78137e\nB               loc_781384                                             ; +0xfa, 0x781382\nMOV             R0, R6                                                 ; +0xfc, 0x781384\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xfe, 0x781386\nBL              __cxa_end_cleanup                                      ; +0x102, 0x78138a\nADD             SP, SP, #0x28 ; '('                                    ; +0x106, 0x78138e\nPOP.W           {R4-R10,PC}                                            ; +0x108, 0x781390", "xrefs": ["EditorSFXManager::applyConfigDirect @ 0x78142e", "EditorSFXManager::applyMyConfig @ 0x781522"], "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"}