{"type": "func", "start": 4298672864, "end": 4298673068, "name": "LabelGameObject::createLabel", "pseudocode": "// \n// LabelGameObject::createLabel from 0x100388ae0 to 0x100388bac (204 bytes)\n// \n// 2 xrefs:\n// > LevelEditorLayer::updateLevelFont @ 0x10036235c\n// > LabelGameObject::setupCustomSprites @ 0x100388a88\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 LabelGameObject::createLabel(LabelGameObject *a1, const char *a2)\n{\n  GameManager *v4; // x21\n  GameManager *v5; // x0\n  const char *FontFile; // x0\n  cocos2d::CCLabelBMFont *v7; // x20\n  __n128 v8; // q0\n  __n128 v9; // q1\n  int v10; // [xsp+8h] [xbp-28h] BYREF\n\n  if ( a1->m_label )\n    LabelGameObject::removeLabel(a1);\n  if ( a2[23] < 0 )\n    a2 = *(const char **)a2;\n  v4 = GameManager::sharedState();\n  v5 = GameManager::sharedState();\n  FontFile = GameManager::getFontFile(v4, v5->m_loadedFont);\n  v7 = cocos2d::CCLabelBMFont::create_1(a2, FontFile);\n  a1->m_label = v7;\n  v8.n128_f32[0] = a1->m_obRect.size.width * 0.5;\n  v9.n128_f32[0] = a1->m_obRect.size.height * 0.5;\n  sub_100022980(v8, v9, &v10);\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int *))v7->setPosition)(v7, &v10);\n  ((void (__fastcall *)(LabelGameObject *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_label);\n  LabelGameObject::updateLabelAlign(a1, a1->m_alignment);\n  a1->m_labelDirty = 0;\n}", "assembly": "; \n; LabelGameObject::createLabel from 0x100388ae0 to 0x100388bac (204 bytes)\n; \n; 2 xrefs:\n; > LevelEditorLayer::updateLevelFont @ 0x10036235c\n; > LabelGameObject::setupCustomSprites @ 0x100388a88\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x100388ae0\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x100388ae4\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x100388ae8\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x100388aec\nADD             X29, SP, #0x30                                         ; +0x10, 0x100388af0\nMOV             X20, X1                                                ; +0x14, 0x100388af4\nMOV             X19, X0                                                ; +0x18, 0x100388af8\nLDR             X8, [X0,#0x730]                                        ; +0x1c, 0x100388afc\nCBZ             X8, loc_100388B0C                                      ; +0x20, 0x100388b00\nMOV             X0, X19                                                ; +0x24, 0x100388b04\nBL              LabelGameObject__removeLabel                           ; +0x28, 0x100388b08\nLDRSB           W8, [X20,#0x17]                                        ; +0x2c, 0x100388b0c\nTBZ             W8, #0x1F, loc_100388B18                               ; +0x30, 0x100388b10\nLDR             X20, [X20]                                             ; +0x34, 0x100388b14\nBL              GameManager__sharedState                               ; +0x38, 0x100388b18\nMOV             X21, X0                                                ; +0x3c, 0x100388b1c\nBL              GameManager__sharedState                               ; +0x40, 0x100388b20\nLDR             W1, [X0,#0x3AC]                                        ; +0x44, 0x100388b24\nMOV             X0, X21                                                ; +0x48, 0x100388b28\nBL              GameManager__getFontFile                               ; +0x4c, 0x100388b2c\nMOV             X1, X0                                                 ; +0x50, 0x100388b30\nMOV             X0, X20                                                ; +0x54, 0x100388b34\nBL              cocos2d__CCLabelBMFont__create_1                       ; +0x58, 0x100388b38\nMOV             X20, X0                                                ; +0x5c, 0x100388b3c\nSTR             X0, [X19,#0x730]                                       ; +0x60, 0x100388b40\nLDR             S0, [X19,#0x1B0]                                       ; +0x64, 0x100388b44\nFMOV            S1, #0.5                                               ; +0x68, 0x100388b48\nFMUL            S0, S0, S1                                             ; +0x6c, 0x100388b4c\nLDR             S2, [X19,#0x1B4]                                       ; +0x70, 0x100388b50\nFMUL            S1, S2, S1                                             ; +0x74, 0x100388b54\nADD             X0, SP, #0x30+var_28                                   ; +0x78, 0x100388b58\nBL              sub_100022980                                          ; +0x7c, 0x100388b5c\nLDR             X8, [X20]                                              ; +0x80, 0x100388b60\nLDR             X8, [X8,#0xB8]                                         ; +0x84, 0x100388b64\nADD             X1, SP, #0x30+var_28                                   ; +0x88, 0x100388b68\nMOV             X0, X20                                                ; +0x8c, 0x100388b6c\nBLR             X8                                                     ; +0x90, 0x100388b70\nLDR             X1, [X19,#0x730]                                       ; +0x94, 0x100388b74\nLDR             X8, [X19]                                              ; +0x98, 0x100388b78\nLDR             X8, [X8,#0x1B8]                                        ; +0x9c, 0x100388b7c\nMOV             X0, X19                                                ; +0xa0, 0x100388b80\nBLR             X8                                                     ; +0xa4, 0x100388b84\nLDR             W1, [X19,#0x75C]                                       ; +0xa8, 0x100388b88\nMOV             X0, X19                                                ; +0xac, 0x100388b8c\nBL              LabelGameObject__updateLabelAlign                      ; +0xb0, 0x100388b90\nSTRB            WZR, [X19,#0x738]                                      ; +0xb4, 0x100388b94\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xb8, 0x100388b98\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xbc, 0x100388b9c\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xc0, 0x100388ba0\nADD             SP, SP, #0x40 ; '@'                                    ; +0xc4, 0x100388ba4\nRET                                                                    ; +0xc8, 0x100388ba8", "xrefs": ["LevelEditorLayer::updateLevelFont @ 0x10036235c", "LabelGameObject::setupCustomSprites @ 0x100388a88"], "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"}