{"type": "func", "start": 4299991784, "end": 4299992208, "name": "EditorSFXManager::importFromString", "pseudocode": "// \n// EditorSFXManager::importFromString from 0x1004caae8 to 0x1004cac90 (424 bytes)\n// \n// 2 xrefs:\n// > sub_1004CAE9C @ 0x1004cafa4\n// > sub_1004CB79C @ 0x1004cb8a8\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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:06:25 +0000\n// \n\n__int64 __fastcall EditorSFXManager::importFromString(_QWORD *a1, __int64 a2, _DWORD *a3, std::string *this)\n{\n  __int64 v5; // x8\n  std::string::size_type size; // x8\n  std::string::size_type v9; // x0\n  __int64 v10; // x20\n  std::string *p_p; // x0\n  __int64 v12; // x0\n  char v13; // w8\n  std::string __p; // [xsp+0h] [xbp-60h] BYREF\n  std::string __str; // [xsp+20h] [xbp-40h] BYREF\n  std::allocator<char> __a; // [xsp+3Fh] [xbp-21h] BYREF\n\n  v5 = *(unsigned __int8 *)(a2 + 23);\n  if ( (v5 & 0x80u) != 0LL )\n    v5 = *(_QWORD *)(a2 + 8);\n  if ( v5 )\n  {\n    cocos2d::ZipUtils::decompressString((void **)a2, 0, 0, &__str);\n    size = HIBYTE(__str.__r_.__value_.__r.__words[2]);\n    if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )\n      size = __str.__r_.__value_.__l.__size_;\n    if ( !size )\n    {\n      if ( this )\n        std::string::assign(this, \"Invalid or corrupt share string.\");\n      v10 = 0;\n      goto LABEL_32;\n    }\n    v9 = std::string::find(&__str, 59, 0);\n    if ( v9 == -1 )\n    {\n      if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n        sub_1000097D0(&__p, __str.__r_.__value_.__l.__data_, __str.__r_.__value_.__l.__size_);\n      else\n        __p = __str;\n    }\n    else\n    {\n      std::string::basic_string(&__p, &__str, 0, v9, &__a);\n    }\n    if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n      p_p = &__p;\n    else\n      p_p = (std::string *)__p.__r_.__value_.__r.__words[0];\n    if ( (unsigned int)(atoi((const char *)p_p) - 3) > 0xFFFFFFFD )\n    {\n      v12 = EditorSFXManager::deserializeAll(a1, &__str, *a3 == 0);\n      v10 = v12;\n      if ( this )\n        v13 = v12;\n      else\n        v13 = 1;\n      if ( (v13 & 1) != 0 )\n      {\nLABEL_30:\n        if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n          operator delete(__p.__r_.__value_.__l.__data_);\nLABEL_32:\n        if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n          operator delete(__str.__r_.__value_.__l.__data_);\n        return v10;\n      }\n      std::string::assign(this, \"Parse error.\");\n    }\n    else if ( this )\n    {\n      std::string::assign(this, \"Invalid or corrupt share string.\");\n    }\n    v10 = 0;\n    goto LABEL_30;\n  }\n  if ( this )\n    std::string::assign(this, \"Empty string.\");\n  return 0;\n}", "assembly": "; \n; EditorSFXManager::importFromString from 0x1004caae8 to 0x1004cac90 (424 bytes)\n; \n; 2 xrefs:\n; > sub_1004CAE9C @ 0x1004cafa4\n; > sub_1004CB79C @ 0x1004cb8a8\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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:06:25 +0000\n; \nSUB             SP, SP, #0x70                                          ; +0x0, 0x1004caae8\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x4, 0x1004caaec\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x8, 0x1004caaf0\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0xc, 0x1004caaf4\nADD             X29, SP, #0x60                                         ; +0x10, 0x1004caaf8\nMOV             X19, X3                                                ; +0x14, 0x1004caafc\nLDRB            W8, [X1,#0x17]                                         ; +0x18, 0x1004cab00\nSXTB            W9, W8                                                 ; +0x1c, 0x1004cab04\nLDR             X10, [X1,#8]                                           ; +0x20, 0x1004cab08\nCMP             W9, #0                                                 ; +0x24, 0x1004cab0c\nCSEL            X8, X10, X8, LT                                        ; +0x28, 0x1004cab10\nCBZ             X8, loc_1004CAB80                                      ; +0x2c, 0x1004cab14\nMOV             X21, X2                                                ; +0x30, 0x1004cab18\nMOV             X20, X0                                                ; +0x34, 0x1004cab1c\nADD             X8, SP, #0x60+__str                                    ; +0x38, 0x1004cab20\nMOV             X0, X1                                                 ; +0x3c, 0x1004cab24\nMOV             W1, #0                                                 ; +0x40, 0x1004cab28\nMOV             W2, #0                                                 ; +0x44, 0x1004cab2c\nBL              cocos2d__ZipUtils__decompressString                    ; +0x48, 0x1004cab30\nLDRB            W8, [SP,#0x60+__str.__r_.__value_+0x17]                ; +0x4c, 0x1004cab34\nSXTB            W9, W8                                                 ; +0x50, 0x1004cab38\nLDR             X10, [SP,#0x60+__str.__r_.__value_+8]                  ; +0x54, 0x1004cab3c\nCMP             W9, #0                                                 ; +0x58, 0x1004cab40\nCSEL            X8, X10, X8, LT                                        ; +0x5c, 0x1004cab44\nCBZ             X8, loc_1004CAB9C                                      ; +0x60, 0x1004cab48\nADD             X0, SP, #0x60+__str; this                              ; +0x64, 0x1004cab4c\nMOV             W1, #0x3B ; ';'; __c                                   ; +0x68, 0x1004cab50\nMOV             X2, #0; __pos                                          ; +0x6c, 0x1004cab54\nBL              __ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findEcm; std::string::find(char,ulong) ; +0x70, 0x1004cab58\nCMN             X0, #1                                                 ; +0x74, 0x1004cab5c\nB.EQ            loc_1004CABB8                                          ; +0x78, 0x1004cab60\nMOV             X3, X0; __n                                            ; +0x7c, 0x1004cab64\nMOV             X0, SP; this                                           ; +0x80, 0x1004cab68\nADD             X1, SP, #0x60+__str; __str                             ; +0x84, 0x1004cab6c\nSUB             X4, X29, #-__a; __a                                    ; +0x88, 0x1004cab70\nMOV             X2, #0; __pos                                          ; +0x8c, 0x1004cab74\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_mmRKS4_; std::string::basic_string(std::string const&,ulong,ulong,std::allocator<char> const&) ; +0x90, 0x1004cab78\nB               loc_1004CABE0                                          ; +0x94, 0x1004cab7c\nCBZ             X19, loc_1004CAB94                                     ; +0x98, 0x1004cab80\nADRL            X1, aEmptyString; \"Empty string.\"                      ; +0x9c, 0x1004cab84\nMOV             X0, X19; this                                          ; +0xa4, 0x1004cab8c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xa8, 0x1004cab90\nMOV             W20, #0                                                ; +0xac, 0x1004cab94\nB               loc_1004CAC78                                          ; +0xb0, 0x1004cab98\nCBZ             X19, loc_1004CABB0                                     ; +0xb4, 0x1004cab9c\nADRL            X1, aInvalidOrCorru; \"Invalid or corrupt share string.\" ; +0xb8, 0x1004caba0\nMOV             X0, X19; this                                          ; +0xc0, 0x1004caba8\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xc4, 0x1004cabac\nMOV             W20, #0                                                ; +0xc8, 0x1004cabb0\nB               loc_1004CAC68                                          ; +0xcc, 0x1004cabb4\nLDRSB           W8, [SP,#0x60+__str.__r_.__value_+0x17]                ; +0xd0, 0x1004cabb8\nTBNZ            W8, #0x1F, loc_1004CABD4                               ; +0xd4, 0x1004cabbc\nLDR             Q0, [SP,#0x60+__str]                                   ; +0xd8, 0x1004cabc0\nSTR             Q0, [SP,#0x60+__p]                                     ; +0xdc, 0x1004cabc4\nLDR             X8, [SP,#0x30]                                         ; +0xe0, 0x1004cabc8\nSTR             X8, [SP,#0x60+var_50]                                  ; +0xe4, 0x1004cabcc\nB               loc_1004CABE0                                          ; +0xe8, 0x1004cabd0\nLDP             X1, X2, [SP,#0x60+__str]; __src                        ; +0xec, 0x1004cabd4\nMOV             X0, SP; __dst                                          ; +0xf0, 0x1004cabd8\nBL              sub_1000097D0                                          ; +0xf4, 0x1004cabdc\nLDRSB           W8, [SP,#0x60+var_50+7]                                ; +0xf8, 0x1004cabe0\nLDR             X9, [SP,#0x60+__p]                                     ; +0xfc, 0x1004cabe4\nCMP             W8, #0                                                 ; +0x100, 0x1004cabe8\nMOV             X8, SP                                                 ; +0x104, 0x1004cabec\nCSEL            X0, X9, X8, LT; char *                                 ; +0x108, 0x1004cabf0\nBL              _atoi                                                  ; +0x10c, 0x1004cabf4\nSUB             W8, W0, #3                                             ; +0x110, 0x1004cabf8\nCMN             W8, #3                                                 ; +0x114, 0x1004cabfc\nB.HI            loc_1004CAC1C                                          ; +0x118, 0x1004cac00\nCBZ             X19, loc_1004CAC54                                     ; +0x11c, 0x1004cac04\nADRL            X1, aInvalidOrCorru; \"Invalid or corrupt share string.\" ; +0x120, 0x1004cac08\nMOV             X0, X19; this                                          ; +0x128, 0x1004cac10\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x12c, 0x1004cac14\nB               loc_1004CAC54                                          ; +0x130, 0x1004cac18\nLDR             W8, [X21]                                              ; +0x134, 0x1004cac1c\nCMP             W8, #0                                                 ; +0x138, 0x1004cac20\nCSET            W2, EQ                                                 ; +0x13c, 0x1004cac24\nADD             X1, SP, #0x60+__str; this                              ; +0x140, 0x1004cac28\nMOV             X0, X20; int                                           ; +0x144, 0x1004cac2c\nBL              EditorSFXManager__deserializeAll                       ; +0x148, 0x1004cac30\nMOV             X20, X0                                                ; +0x14c, 0x1004cac34\nCMP             X19, #0                                                ; +0x150, 0x1004cac38\nCSINC           W8, W0, WZR, NE                                        ; +0x154, 0x1004cac3c\nTBNZ            W8, #0, loc_1004CAC58                                  ; +0x158, 0x1004cac40\nADRL            X1, aParseError; \"Parse error.\"                        ; +0x15c, 0x1004cac44\nMOV             X0, X19; this                                          ; +0x164, 0x1004cac4c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x168, 0x1004cac50\nMOV             W20, #0                                                ; +0x16c, 0x1004cac54\nLDRSB           W8, [SP,#0x60+var_50+7]                                ; +0x170, 0x1004cac58\nTBZ             W8, #0x1F, loc_1004CAC68                               ; +0x174, 0x1004cac5c\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x178, 0x1004cac60\nBL              __ZdlPv; operator delete(void *)                       ; +0x17c, 0x1004cac64\nLDRSB           W8, [SP,#0x60+__str.__r_.__value_+0x17]                ; +0x180, 0x1004cac68\nTBZ             W8, #0x1F, loc_1004CAC78                               ; +0x184, 0x1004cac6c\nLDR             X0, [SP,#0x60+__str]; __p                              ; +0x188, 0x1004cac70\nBL              __ZdlPv; operator delete(void *)                       ; +0x18c, 0x1004cac74\nMOV             X0, X20                                                ; +0x190, 0x1004cac78\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x194, 0x1004cac7c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x198, 0x1004cac80\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x19c, 0x1004cac84\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x1a0, 0x1004cac88\nRET                                                                    ; +0x1a4, 0x1004cac8c", "xrefs": ["sub_1004CAE9C @ 0x1004cafa4", "sub_1004CB79C @ 0x1004cb8a8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}