{"type": "func", "start": 9125568, "end": 9126032, "name": "ColorAction::setupFromString", "pseudocode": "// \n// ColorAction::setupFromString from 0x8b3ec0 to 0x8b4090 (464 bytes)\n// \n// 12 xrefs:\n// > LevelSettingsObject::objectFromDict @ 0x669f58\n// > LevelSettingsObject::objectFromDict @ 0x669fd0\n// > LevelSettingsObject::objectFromDict @ 0x66a048\n// > LevelSettingsObject::objectFromDict @ 0x66a0c8\n// > LevelSettingsObject::objectFromDict @ 0x66a140\n// > LevelSettingsObject::objectFromDict @ 0x66a1b8\n// > LevelSettingsObject::objectFromDict @ 0x66a230\n// > LevelSettingsObject::objectFromDict @ 0x66a2a8\n// > LevelSettingsObject::objectFromDict @ 0x66a320\n// > EditorUI::pasteObjects @ 0x6bf4b0\n// > GJEffectManager::setupFromString @ 0x8c08c8\n// > <???> @ 0x34a88\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\n__int64 __fastcall ColorAction::setupFromString(ColorAction *a1, std::string *a2)\n{\n  std::_rb_tree_base *m_parent; // x19\n  __int64 v4; // x1\n  void *v5; // x0\n  std::_rb_tree_base *v6; // x0\n  std::_rb_tree_base *m_left; // x25\n  std::_rb_tree_base *v8; // x1\n  std::_rb_tree_base **p_m_parent; // x0\n  unsigned int *p_m_right; // x1\n  int m_right; // w2\n  unsigned int *v12; // x1\n  int v13; // w2\n  std::_rb_tree_base *v14; // x0\n  std::map<std::string,std::string> v16; // [xsp+58h] [xbp+58h] BYREF\n\n  *(_DWORD *)&v16.m_header.m_isblack = 0;\n  v16.m_header.m_parent = nullptr;\n  v16.m_nodecount = 0;\n  v16.m_header.m_left = &v16.m_header;\n  v16.m_header.m_right = &v16.m_header;\n  GameToolbox::stringSetupToMap(a2, \"_\", &v16);\n  ColorAction::setupFromMap(a1, &v16);\n  m_parent = v16.m_header.m_parent;\n  if ( v16.m_header.m_parent )\n  {\n    do\n    {\n      while ( 1 )\n      {\n        std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_M_erase(\n          (__int64)&v16,\n          &m_parent->m_right->m_isblack);\n        m_left = m_parent->m_left;\n        v8 = m_parent[1].m_parent;\n        p_m_parent = &v8[-1].m_parent;\n        if ( &v8[-1].m_parent != (std::_rb_tree_base **)&qword_124B6B0 )\n        {\n          if ( &pthread_create )\n          {\n            p_m_right = (unsigned int *)&v8[-1].m_right;\n            do\n              m_right = __ldaxr(p_m_right);\n            while ( __stlxr(m_right - 1, p_m_right) );\n          }\n          else\n          {\n            m_right = (int)v8[-1].m_right;\n            LODWORD(v8[-1].m_right) = m_right - 1;\n          }\n          if ( m_right <= 0 )\n            break;\n        }\n        v4 = *(_QWORD *)&m_parent[1].m_isblack;\n        v5 = (void *)(v4 - 24);\n        if ( (__int64 *)(v4 - 24) != &qword_124B6B0 )\n          goto LABEL_11;\nLABEL_4:\n        v6 = m_parent;\n        m_parent = m_left;\n        operator delete(v6);\n        if ( !m_left )\n          return _stack_chk_guard;\n      }\n      operator delete(p_m_parent);\n      v4 = *(_QWORD *)&m_parent[1].m_isblack;\n      v5 = (void *)(v4 - 24);\n      if ( (__int64 *)(v4 - 24) == &qword_124B6B0 )\n        goto LABEL_4;\nLABEL_11:\n      if ( &pthread_create )\n      {\n        v12 = (unsigned int *)(v4 - 8);\n        do\n          v13 = __ldaxr(v12);\n        while ( __stlxr(v13 - 1, v12) );\n      }\n      else\n      {\n        v13 = *(_DWORD *)(v4 - 8);\n        *(_DWORD *)(v4 - 8) = v13 - 1;\n      }\n      if ( v13 > 0 )\n        goto LABEL_4;\n      operator delete(v5);\n      v14 = m_parent;\n      m_parent = m_left;\n      operator delete(v14);\n    }\n    while ( m_left );\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; ColorAction::setupFromString from 0x8b3ec0 to 0x8b4090 (464 bytes)\n; \n; 12 xrefs:\n; > LevelSettingsObject::objectFromDict @ 0x669f58\n; > LevelSettingsObject::objectFromDict @ 0x669fd0\n; > LevelSettingsObject::objectFromDict @ 0x66a048\n; > LevelSettingsObject::objectFromDict @ 0x66a0c8\n; > LevelSettingsObject::objectFromDict @ 0x66a140\n; > LevelSettingsObject::objectFromDict @ 0x66a1b8\n; > LevelSettingsObject::objectFromDict @ 0x66a230\n; > LevelSettingsObject::objectFromDict @ 0x66a2a8\n; > LevelSettingsObject::objectFromDict @ 0x66a320\n; > EditorUI::pasteObjects @ 0x6bf4b0\n; > GJEffectManager::setupFromString @ 0x8c08c8\n; > <???> @ 0x34a88\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\nSTP             X29, X30, [SP,#var_90]!                                ; +0x0, 0x8b3ec0\nMOV             X29, SP                                                ; +0x4, 0x8b3ec4\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x8, 0x8b3ec8\nADRP            X22, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8b3ecc\nADD             X21, X29, #0x90+var_38                                 ; +0x10, 0x8b3ed0\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0x14, 0x8b3ed4\nMOV             X19, X0                                                ; +0x18, 0x8b3ed8\nMOV             X0, X1; int                                            ; +0x1c, 0x8b3edc\nLDR             X4, [X22,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x8b3ee0\nADRP            X1, #(aOSecret+8)@PAGE; \"_\"                            ; +0x24, 0x8b3ee4\nADD             X3, X21, #8                                            ; +0x28, 0x8b3ee8\nMOV             X2, X21                                                ; +0x2c, 0x8b3eec\nADD             X1, X1, #(aOSecret+8)@PAGEOFF; char *                  ; +0x30, 0x8b3ef0\nSTR             X25, [SP,#0x90+var_50]                                 ; +0x34, 0x8b3ef4\nLDR             X4, [X4]                                               ; +0x38, 0x8b3ef8\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x3c, 0x8b3efc\nSTR             WZR, [X29,#0x90+var_30]                                ; +0x40, 0x8b3f00\nSTR             XZR, [X29,#0x90+var_28]                                ; +0x44, 0x8b3f04\nSTR             X4, [X29,#0x90+var_8]                                  ; +0x48, 0x8b3f08\nSTR             XZR, [X29,#0x90+var_10]                                ; +0x4c, 0x8b3f0c\nSTR             X3, [X29,#0x90+var_20]                                 ; +0x50, 0x8b3f10\nSTR             X3, [X29,#0x90+var_18]                                 ; +0x54, 0x8b3f14\nBL              _ZN11GameToolbox16stringSetupToMapERKSsPKcRSt3mapISsSsSt4lessISsESaISt4pairIS0_SsEEE; GameToolbox::stringSetupToMap(std::string const&,char const*,std::map<std::string,std::string> &) ; +0x58, 0x8b3f18\nMOV             X0, X19                                                ; +0x5c, 0x8b3f1c\nMOV             X1, X21                                                ; +0x60, 0x8b3f20\nBL              _ZN11ColorAction12setupFromMapERSt3mapISsSsSt4lessISsESaISt4pairIKSsSsEEE; ColorAction::setupFromMap(std::map<std::string,std::string> &) ; +0x64, 0x8b3f24\nLDR             X19, [X29,#0x90+var_28]                                ; +0x68, 0x8b3f28\nADRP            X20, #off_122EFE8@PAGE                                 ; +0x6c, 0x8b3f2c\nCBZ             X19, loc_8B4004                                        ; +0x70, 0x8b3f30\nADRP            X23, #pthread_create_ptr_0@PAGE                        ; +0x74, 0x8b3f34\nADD             X24, X29, #0x90+var_40                                 ; +0x78, 0x8b3f38\nB               loc_8B3F64                                             ; +0x7c, 0x8b3f3c\nLDR             X1, [X19,#0x20]                                        ; +0x80, 0x8b3f40\nLDR             X2, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x84, 0x8b3f44\nSUB             X0, X1, #0x18                                          ; +0x88, 0x8b3f48\nCMP             X0, X2                                                 ; +0x8c, 0x8b3f4c\nB.NE            loc_8B3FC8                                             ; +0x90, 0x8b3f50\nMOV             X0, X19; p                                             ; +0x94, 0x8b3f54\nMOV             X19, X25                                               ; +0x98, 0x8b3f58\nBL              _ZdlPv; operator delete(void *)                        ; +0x9c, 0x8b3f5c\nCBZ             X25, loc_8B4004                                        ; +0xa0, 0x8b3f60\nLDR             X1, [X19,#0x18]                                        ; +0xa4, 0x8b3f64\nMOV             X0, X21                                                ; +0xa8, 0x8b3f68\nBL              _ZNSt8_Rb_treeISsSt4pairIKSsSsESt10_Select1stIS2_ESt4lessISsESaIS2_EE8_M_eraseEPSt13_Rb_tree_nodeIS2_E; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_M_erase(std::_Rb_tree_node<std::pair<std::string const,std::string>> *) ; +0xac, 0x8b3f6c\nLDR             X25, [X19,#0x10]                                       ; +0xb0, 0x8b3f70\nLDR             X1, [X19,#0x28]                                        ; +0xb4, 0x8b3f74\nLDR             X2, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0xb8, 0x8b3f78\nSUB             X0, X1, #0x18; p                                       ; +0xbc, 0x8b3f7c\nCMP             X0, X2                                                 ; +0xc0, 0x8b3f80\nB.EQ            loc_8B3F40                                             ; +0xc4, 0x8b3f84\nLDR             X2, [X23,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xc8, 0x8b3f88\nCBZ             X2, loc_8B4040                                         ; +0xcc, 0x8b3f8c\nSUB             X1, X1, #8                                             ; +0xd0, 0x8b3f90\nLDAXR           W2, [X1]                                               ; +0xd4, 0x8b3f94\nSUB             W3, W2, #1                                             ; +0xd8, 0x8b3f98\nSTLXR           W4, W3, [X1]                                           ; +0xdc, 0x8b3f9c\nCBNZ            W4, loc_8B3F94                                         ; +0xe0, 0x8b3fa0\nCMP             W2, WZR                                                ; +0xe4, 0x8b3fa4\nB.GT            loc_8B3F40                                             ; +0xe8, 0x8b3fa8\nMOV             X1, X24                                                ; +0xec, 0x8b3fac\nBL              j__ZdlPv; operator delete(void *)                      ; +0xf0, 0x8b3fb0\nLDR             X1, [X19,#0x20]                                        ; +0xf4, 0x8b3fb4\nLDR             X2, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0xf8, 0x8b3fb8\nSUB             X0, X1, #0x18; p                                       ; +0xfc, 0x8b3fbc\nCMP             X0, X2                                                 ; +0x100, 0x8b3fc0\nB.EQ            loc_8B3F54                                             ; +0x104, 0x8b3fc4\nLDR             X2, [X23,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x108, 0x8b3fc8\nCBZ             X2, loc_8B4030                                         ; +0x10c, 0x8b3fcc\nSUB             X1, X1, #8                                             ; +0x110, 0x8b3fd0\nLDAXR           W2, [X1]                                               ; +0x114, 0x8b3fd4\nSUB             W3, W2, #1                                             ; +0x118, 0x8b3fd8\nSTLXR           W4, W3, [X1]                                           ; +0x11c, 0x8b3fdc\nCBNZ            W4, loc_8B3FD4                                         ; +0x120, 0x8b3fe0\nCMP             W2, WZR                                                ; +0x124, 0x8b3fe4\nB.GT            loc_8B3F54                                             ; +0x128, 0x8b3fe8\nMOV             X1, X24                                                ; +0x12c, 0x8b3fec\nBL              j__ZdlPv; operator delete(void *)                      ; +0x130, 0x8b3ff0\nMOV             X0, X19; p                                             ; +0x134, 0x8b3ff4\nMOV             X19, X25                                               ; +0x138, 0x8b3ff8\nBL              _ZdlPv; operator delete(void *)                        ; +0x13c, 0x8b3ffc\nCBNZ            X25, loc_8B3F64                                        ; +0x140, 0x8b4000\nLDR             X22, [X22,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x144, 0x8b4004\nLDR             X1, [X29,#0x90+var_8]                                  ; +0x148, 0x8b4008\nLDR             X0, [X22]                                              ; +0x14c, 0x8b400c\nCMP             X1, X0                                                 ; +0x150, 0x8b4010\nB.NE            loc_8B4050                                             ; +0x154, 0x8b4014\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0x158, 0x8b4018\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0x15c, 0x8b401c\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0x160, 0x8b4020\nLDR             X25, [SP,#0x90+var_50]                                 ; +0x164, 0x8b4024\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0x168, 0x8b4028\nRET                                                                    ; +0x16c, 0x8b402c\nLDUR            W2, [X1,#-8]                                           ; +0x170, 0x8b4030\nSUB             W3, W2, #1                                             ; +0x174, 0x8b4034\nSTUR            W3, [X1,#-8]                                           ; +0x178, 0x8b4038\nB               loc_8B3FE4                                             ; +0x17c, 0x8b403c\nLDUR            W2, [X1,#-8]                                           ; +0x180, 0x8b4040\nSUB             W3, W2, #1                                             ; +0x184, 0x8b4044\nSTUR            W3, [X1,#-8]                                           ; +0x188, 0x8b4048\nB               loc_8B3FA4                                             ; +0x18c, 0x8b404c\nBL              .__stack_chk_fail                                      ; +0x190, 0x8b4050\nLDR             X19, [X29,#0x90+var_28]                                ; +0x194, 0x8b4054\nMOV             X20, X0                                                ; +0x198, 0x8b4058\nCBZ             X19, loc_8B4088                                        ; +0x19c, 0x8b405c\nLDR             X1, [X19,#0x18]                                        ; +0x1a0, 0x8b4060\nMOV             X0, X21                                                ; +0x1a4, 0x8b4064\nBL              _ZNSt8_Rb_treeISsSt4pairIKSsSsESt10_Select1stIS2_ESt4lessISsESaIS2_EE8_M_eraseEPSt13_Rb_tree_nodeIS2_E; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_M_erase(std::_Rb_tree_node<std::pair<std::string const,std::string>> *) ; +0x1a8, 0x8b4068\nLDR             X22, [X19,#0x10]                                       ; +0x1ac, 0x8b406c\nADD             X0, X19, #0x20 ; ' '                                   ; +0x1b0, 0x8b4070\nBL              sub_4DC4F0                                             ; +0x1b4, 0x8b4074\nMOV             X0, X19; p                                             ; +0x1b8, 0x8b4078\nMOV             X19, X22                                               ; +0x1bc, 0x8b407c\nBL              _ZdlPv; operator delete(void *)                        ; +0x1c0, 0x8b4080\nCBNZ            X22, loc_8B4060                                        ; +0x1c4, 0x8b4084\nMOV             X0, X20                                                ; +0x1c8, 0x8b4088\nBL              _Unwind_Resume                                         ; +0x1cc, 0x8b408c", "xrefs": ["LevelSettingsObject::objectFromDict @ 0x669f58", "LevelSettingsObject::objectFromDict @ 0x669fd0", "LevelSettingsObject::objectFromDict @ 0x66a048", "LevelSettingsObject::objectFromDict @ 0x66a0c8", "LevelSettingsObject::objectFromDict @ 0x66a140", "LevelSettingsObject::objectFromDict @ 0x66a1b8", "LevelSettingsObject::objectFromDict @ 0x66a230", "LevelSettingsObject::objectFromDict @ 0x66a2a8", "LevelSettingsObject::objectFromDict @ 0x66a320", "EditorUI::pasteObjects @ 0x6bf4b0", "GJEffectManager::setupFromString @ 0x8c08c8", "<???> @ 0x34a88"], "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"}