{"type": "func", "start": 4300952576, "end": 4300952624, "name": "GameObject::setDefaultMainColorMode", "pseudocode": "// \n// GameObject::setDefaultMainColorMode from 0x1005b5400 to 0x1005b5430 (48 bytes)\n// \n// 5 xrefs:\n// > PlayLayer::addObject @ 0x1000b21ed\n// > LevelEditorLayer::copyObjectState @ 0x1000f3a13\n// > EffectGameObject::customSetup @ 0x100196d22\n// > GameObject::setupCustomSprites @ 0x100445a1b\n// > GameObject::setupCustomSprites @ 0x1004463fc\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\nvoid __fastcall GameObject::setDefaultMainColorMode(GameObject *a1, int a2)\n{\n  GJSpriteColor *m_baseColor; // rax\n  int v3; // ecx\n  int v4; // edx\n\n  m_baseColor = a1->m_baseColor;\n  if ( m_baseColor )\n  {\n    v3 = 0;\n    if ( a2 > 0 )\n      v3 = a2;\n    v4 = 1101;\n    if ( v3 < 1101 )\n      v4 = v3;\n    m_baseColor->m_defaultColorID = v4;\n    m_baseColor->m_colorID = 0;\n  }\n}", "assembly": "; \n; GameObject::setDefaultMainColorMode from 0x1005b5400 to 0x1005b5430 (48 bytes)\n; \n; 5 xrefs:\n; > PlayLayer::addObject @ 0x1000b21ed\n; > LevelEditorLayer::copyObjectState @ 0x1000f3a13\n; > EffectGameObject::customSetup @ 0x100196d22\n; > GameObject::setupCustomSprites @ 0x100445a1b\n; > GameObject::setupCustomSprites @ 0x1004463fc\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\nmov     rax, [rdi+448h]                                                ; +0x0, 0x1005b5400\ntest    rax, rax                                                       ; +0x7, 0x1005b5407\njz      short locret_1005B542F                                         ; +0xa, 0x1005b540a\npush    rbp                                                            ; +0xc, 0x1005b540c\nmov     rbp, rsp                                                       ; +0xd, 0x1005b540d\nxor     ecx, ecx                                                       ; +0x10, 0x1005b5410\ntest    esi, esi                                                       ; +0x12, 0x1005b5412\ncmovg   ecx, esi                                                       ; +0x14, 0x1005b5414\ncmp     ecx, 44Dh                                                      ; +0x17, 0x1005b5417\nmov     edx, 44Dh                                                      ; +0x1d, 0x1005b541d\ncmovl   edx, ecx                                                       ; +0x22, 0x1005b5422\nmov     [rax+4], edx                                                   ; +0x25, 0x1005b5425\nmov     dword ptr [rax], 0                                             ; +0x28, 0x1005b5428\npop     rbp                                                            ; +0x2e, 0x1005b542e\nretn                                                                   ; +0x2f, 0x1005b542f", "xrefs": ["PlayLayer::addObject @ 0x1000b21ed", "LevelEditorLayer::copyObjectState @ 0x1000f3a13", "EffectGameObject::customSetup @ 0x100196d22", "GameObject::setupCustomSprites @ 0x100445a1b", "GameObject::setupCustomSprites @ 0x1004463fc"], "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"}