{"type": "func", "start": 4300873824, "end": 4300874220, "name": "GameObject::commonSetup", "pseudocode": "// \n// GameObject::commonSetup from 0x1005a2060 to 0x1005a21ec (396 bytes)\n// \n// 7 xrefs:\n// > TextGameObject::create @ 0x1005a1e58\n// > EnhancedGameObject::create @ 0x1005a1f6b\n// > GameObject::createWithFrame @ 0x1005a1ff1\n// > GameObject::init @ 0x1005a2049\n// > GameObject::initWithTexture @ 0x1005a2207\n// > EnhancedGameObject::init @ 0x1005cbd89\n// > TextGameObject::init @ 0x1005d17b7\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::commonSetup(GameObject *a1)\n{\n  bool m_editorEnabled; // al\n  _QWORD *p_m_colorID; // rax\n  int v3; // eax\n\n  m_editorEnabled = GameManager::sharedState()->m_editorEnabled;\n  a1->m_editorEnabled = m_editorEnabled;\n  if ( !m_editorEnabled && GameManager::sharedState()->m_playLayer )\n    a1->m_goEffectManager = GameManager::sharedState()->m_playLayer->m_effectManager;\n  p_m_colorID = &a1->m_baseColor->m_colorID;\n  if ( !p_m_colorID )\n  {\n    p_m_colorID = operator new(0x28u);\n    *p_m_colorID = 0;\n    p_m_colorID[1] = 0x3F8000003F800000LL;\n    *((_OWORD *)p_m_colorID + 1) = xmmword_1009A2C90;\n    *((_DWORD *)p_m_colorID + 8) = -65536;\n    *((_BYTE *)p_m_colorID + 36) = -1;\n    a1->m_baseColor = (GJSpriteColor *)p_m_colorID;\n  }\n  *p_m_colorID = 0x3EC00000000LL;\n  a1->m_opacityMod = 1.0;\n  a1->m_defaultZOrder = 2;\n  *(_DWORD *)&a1->m_enterType = -1;\n  a1->m_unk3E8 = 1;\n  qword_1009A2CA8 = 214013 * qword_1009A2CA8 + 2531011;\n  a1->m_varianceIndex = (int)(float)((float)((float)(WORD1(qword_1009A2CA8) & 0x7FFF) / 32767.0) * 1900.0);\n  *(cocos2d::CCSize *)&a1->m_width = a1->m_obRect.size;\n  *(_QWORD *)&a1->m_spriteWidthScale = 0x3F8000003F800000LL;\n  v3 = dword_10099E600;\n  a1->m_uniqueID = dword_10099E600;\n  a1->m_unknown5 = v3;\n  dword_10099E600 = v3 + 1;\n  *(_OWORD *)&a1->m_startRotationX = xmmword_100815DE0;\n  ((void (__fastcall *)(GameObject *, float))a1->setScaleX)(a1, 1.0);\n  ((void (__fastcall *)(GameObject *, float))a1->setScaleY)(a1, 1.0);\n  a1->m_isActivated = 0;\n  a1->m_isDirty = 1;\n  a1->m_isObjectRectDirty = 1;\n}", "assembly": "; \n; GameObject::commonSetup from 0x1005a2060 to 0x1005a21ec (396 bytes)\n; \n; 7 xrefs:\n; > TextGameObject::create @ 0x1005a1e58\n; > EnhancedGameObject::create @ 0x1005a1f6b\n; > GameObject::createWithFrame @ 0x1005a1ff1\n; > GameObject::init @ 0x1005a2049\n; > GameObject::initWithTexture @ 0x1005a2207\n; > EnhancedGameObject::init @ 0x1005cbd89\n; > TextGameObject::init @ 0x1005d17b7\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\npush    rbp                                                            ; +0x0, 0x1005a2060\nmov     rbp, rsp                                                       ; +0x1, 0x1005a2061\npush    rbx                                                            ; +0x4, 0x1005a2064\npush    rax                                                            ; +0x5, 0x1005a2065\nmov     rbx, rdi                                                       ; +0x6, 0x1005a2066\ncall    GameManager__sharedState                                       ; +0x9, 0x1005a2069\nmovzx   eax, byte ptr [rax+29Ah]                                       ; +0xe, 0x1005a206e\nmov     [rbx+289h], al                                                 ; +0x15, 0x1005a2075\ntest    al, al                                                         ; +0x1b, 0x1005a207b\njnz     short loc_1005A20A8                                            ; +0x1d, 0x1005a207d\ncall    GameManager__sharedState                                       ; +0x1f, 0x1005a207f\ncmp     qword ptr [rax+1F8h], 0                                        ; +0x24, 0x1005a2084\njz      short loc_1005A20A8                                            ; +0x2c, 0x1005a208c\ncall    GameManager__sharedState                                       ; +0x2e, 0x1005a208e\nmov     rax, [rax+1F8h]                                                ; +0x33, 0x1005a2093\nmov     rax, [rax+850h]                                                ; +0x3a, 0x1005a209a\nmov     [rbx+500h], rax                                                ; +0x41, 0x1005a20a1\nmov     rax, [rbx+448h]                                                ; +0x48, 0x1005a20a8\ntest    rax, rax                                                       ; +0x4f, 0x1005a20af\njnz     short loc_1005A20EF                                            ; +0x52, 0x1005a20b2\nmov     edi, 28h ; '('; __sz                                           ; +0x54, 0x1005a20b4\ncall    __Znwm; operator new(ulong)                                    ; +0x59, 0x1005a20b9\nmov     qword ptr [rax], 0                                             ; +0x5e, 0x1005a20be\nmovsd   xmm0, qword ptr cs:xmmword_1008154E0                           ; +0x65, 0x1005a20c5\nmovsd   qword ptr [rax+8], xmm0                                        ; +0x6d, 0x1005a20cd\nmovups  xmm0, cs:xmmword_1009A2C90                                     ; +0x72, 0x1005a20d2\nmovups  xmmword ptr [rax+10h], xmm0                                    ; +0x79, 0x1005a20d9\nmov     dword ptr [rax+20h], 0FFFF0000h                                ; +0x7d, 0x1005a20dd\nmov     byte ptr [rax+24h], 0FFh                                       ; +0x84, 0x1005a20e4\nmov     [rbx+448h], rax                                                ; +0x88, 0x1005a20e8\nmov     rcx, 3EC00000000h                                              ; +0x8f, 0x1005a20ef\nmov     [rax], rcx                                                     ; +0x99, 0x1005a20f9\nmov     dword ptr [rbx+434h], 3F800000h                                ; +0x9c, 0x1005a20fc\nmov     dword ptr [rbx+418h], 2                                        ; +0xa6, 0x1005a2106\nmov     dword ptr [rbx+3F0h], 0FFFFFFFFh                               ; +0xb0, 0x1005a2110\nmov     byte ptr [rbx+3F8h], 1                                         ; +0xba, 0x1005a211a\nimul    rax, cs:qword_1009A2CA8, 343FDh                                ; +0xc1, 0x1005a2121\nadd     rax, 269EC3h                                                   ; +0xcc, 0x1005a212c\nmov     cs:qword_1009A2CA8, rax                                        ; +0xd2, 0x1005a2132\nshr     eax, 10h                                                       ; +0xd9, 0x1005a2139\nand     eax, 7FFFh                                                     ; +0xdc, 0x1005a213c\nxorps   xmm0, xmm0                                                     ; +0xe1, 0x1005a2141\ncvtsi2ss xmm0, eax                                                     ; +0xe4, 0x1005a2144\ndivss   xmm0, cs:dword_100816868                                       ; +0xe8, 0x1005a2148\nmulss   xmm0, cs:dword_10081F440                                       ; +0xf0, 0x1005a2150\ncvttss2si eax, xmm0                                                    ; +0xf8, 0x1005a2158\nmov     [rbx+3ECh], ax                                                 ; +0xfc, 0x1005a215c\nmovsd   xmm0, qword ptr [rbx+1B0h]                                     ; +0x103, 0x1005a2163\nmovsd   qword ptr [rbx+2FCh], xmm0                                     ; +0x10b, 0x1005a216b\nmovsd   xmm0, qword ptr cs:xmmword_1008154E0                           ; +0x113, 0x1005a2173\nmovsd   qword ptr [rbx+38Ch], xmm0                                     ; +0x11b, 0x1005a217b\nmov     eax, cs:dword_10099E600                                        ; +0x123, 0x1005a2183\nmov     [rbx+394h], eax                                                ; +0x129, 0x1005a2189\nmov     [rbx+34h], eax                                                 ; +0x12f, 0x1005a218f\ninc     eax                                                            ; +0x132, 0x1005a2192\nmov     cs:dword_10099E600, eax                                        ; +0x134, 0x1005a2194\nmovaps  xmm0, cs:xmmword_100815DE0                                     ; +0x13a, 0x1005a219a\nmovups  xmmword ptr [rbx+3CCh], xmm0                                   ; +0x141, 0x1005a21a1\nmov     rax, [rbx]                                                     ; +0x148, 0x1005a21a8\nmovss   xmm0, cs:alpha                                                 ; +0x14b, 0x1005a21ab\nmov     rdi, rbx                                                       ; +0x153, 0x1005a21b3\ncall    qword ptr [rax+80h]                                            ; +0x156, 0x1005a21b6\nmov     rax, [rbx]                                                     ; +0x15c, 0x1005a21bc\nmov     rdi, rbx                                                       ; +0x15f, 0x1005a21bf\nmovss   xmm0, cs:alpha                                                 ; +0x162, 0x1005a21c2\ncall    qword ptr [rax+90h]                                            ; +0x16a, 0x1005a21ca\nmov     byte ptr [rbx+305h], 0                                         ; +0x170, 0x1005a21d0\nmov     byte ptr [rbx+348h], 1                                         ; +0x177, 0x1005a21d7\nmov     byte ptr [rbx+360h], 1                                         ; +0x17e, 0x1005a21de\nadd     rsp, 8                                                         ; +0x185, 0x1005a21e5\npop     rbx                                                            ; +0x189, 0x1005a21e9\npop     rbp                                                            ; +0x18a, 0x1005a21ea\nretn                                                                   ; +0x18b, 0x1005a21eb", "xrefs": ["TextGameObject::create @ 0x1005a1e58", "EnhancedGameObject::create @ 0x1005a1f6b", "GameObject::createWithFrame @ 0x1005a1ff1", "GameObject::init @ 0x1005a2049", "GameObject::initWithTexture @ 0x1005a2207", "EnhancedGameObject::init @ 0x1005cbd89", "TextGameObject::init @ 0x1005d17b7"], "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"}