{"type": "func", "start": 5373637936, "end": 5373638341, "name": "LabelGameObject::createLabel", "pseudocode": "// \n// LabelGameObject::createLabel from 0x1404b3530 to 0x1404b36c5 (405 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::updateLevelFont @ 0x1402df555\n// > LabelGameObject::setupCustomSprites @ 0x1404b3505\n// > <???> @ 0x1406dcaa0\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// Hidden C++ exception states: #wind=3\nvoid __fastcall LabelGameObject::createLabel(LabelGameObject *a1, const char *a2)\n{\n  float v2; // xmm0_4\n  GameManager *v5; // rcx\n  GameManager *v6; // rbx\n  int m_loadedFont; // eax\n  int v8; // ebx\n  cocos2d::CCString *v9; // rax\n  __int64 *CString; // rax\n  const char *v11; // rcx\n  struct cocos2d::CCLabelBMFont *v12; // rax\n  cocos2d::CCLabelBMFont_vtbl *v13; // rbx\n  const cocos2d::CCPoint *v14; // rax\n  void *v15; // [rsp+20h] [rbp-28h]\n  void *v16; // [rsp+20h] [rbp-28h]\n\n  if ( a1->m_label )\n    LabelGameObject::removeLabel(a1);\n  v5 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v15 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v15);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = (GameManager *)qword_1406C2ED8;\n  }\n  v6 = v5;\n  if ( !v5 )\n  {\n    v16 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v16);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = (GameManager *)qword_1406C2ED8;\n  }\n  m_loadedFont = v6->m_loadedFont;\n  v8 = 59;\n  if ( m_loadedFont < 59 )\n    v8 = m_loadedFont;\n  if ( v8 <= 0 )\n  {\n    GameManager::loadFont(v5, 0);\n    CString = &qword_14052A4D8;\n  }\n  else\n  {\n    GameManager::loadFont(v5, v8);\n    v9 = cocos2d::CCString::createWithFormat(\"gjFont%02d.fnt\", v8);\n    CString = (__int64 *)cocos2d::CCString::getCString(v9);\n  }\n  v11 = a2;\n  if ( *((_QWORD *)a2 + 3) > 0xFu )\n    v11 = *(const char **)a2;\n  v12 = cocos2d::CCLabelBMFont::create(v11, CString);\n  a1->m_label = v12;\n  v13 = v12->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  cocos2d::CCPoint::CCPoint(v2, a1->m_obRect.size.width * 0.5);\n  v13->setPosition_0(a1->m_label, v14);\n  a1->addChild_1(a1, a1->m_label);\n  LabelGameObject::updateLabelAlign(a1, a1->m_alignment);\n  a1->m_labelDirty = 0;\n  sub_14003A830((__int64)a2);\n}", "assembly": "; \n; LabelGameObject::createLabel from 0x1404b3530 to 0x1404b36c5 (405 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::updateLevelFont @ 0x1402df555\n; > LabelGameObject::setupCustomSprites @ 0x1404b3505\n; > <???> @ 0x1406dcaa0\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     [rsp+arg_10], rbx                                              ; +0x0, 0x1404b3530\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1404b3535\npush    rdi                                                            ; +0xa, 0x1404b353a\nsub     rsp, 40h                                                       ; +0xb, 0x1404b353b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1404b353f\nxor     rax, rsp                                                       ; +0x16, 0x1404b3546\nmov     [rsp+48h+var_18], rax                                          ; +0x19, 0x1404b3549\nmov     rdi, rdx                                                       ; +0x1e, 0x1404b354e\nmov     rsi, rcx                                                       ; +0x21, 0x1404b3551\nmov     [rsp+48h+var_20], rdx                                          ; +0x24, 0x1404b3554\ncmp     qword ptr [rcx+740h], 0                                        ; +0x29, 0x1404b3559\njz      short loc_1404B3568                                            ; +0x31, 0x1404b3561\ncall    LabelGameObject__removeLabel                                   ; +0x33, 0x1404b3563\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x38, 0x1404b3568\ntest    rcx, rcx                                                       ; +0x3f, 0x1404b356f\njnz     short loc_1404B35A3                                            ; +0x42, 0x1404b3572\nmov     ecx, 668h; Size                                                ; +0x44, 0x1404b3574\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x49, 0x1404b3579\nmov     [rsp+48h+var_28], rax                                          ; +0x4e, 0x1404b357e\nmov     rcx, rax                                                       ; +0x53, 0x1404b3583\ncall    sub_14017AB00                                                  ; +0x56, 0x1404b3586\nnop                                                                    ; +0x5b, 0x1404b358b\nmov     cs:qword_1406C2ED8, rax                                        ; +0x5c, 0x1404b358c\nmov     rdx, [rax]                                                     ; +0x63, 0x1404b3593\nmov     rcx, rax                                                       ; +0x66, 0x1404b3596\ncall    qword ptr [rdx+48h]                                            ; +0x69, 0x1404b3599\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x6c, 0x1404b359c\nmov     rbx, rcx                                                       ; +0x73, 0x1404b35a3\ntest    rcx, rcx                                                       ; +0x76, 0x1404b35a6\njnz     short loc_1404B35DA                                            ; +0x79, 0x1404b35a9\nmov     ecx, 668h; Size                                                ; +0x7b, 0x1404b35ab\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x80, 0x1404b35b0\nmov     [rsp+48h+var_28], rax                                          ; +0x85, 0x1404b35b5\nmov     rcx, rax                                                       ; +0x8a, 0x1404b35ba\ncall    sub_14017AB00                                                  ; +0x8d, 0x1404b35bd\nnop                                                                    ; +0x92, 0x1404b35c2\nmov     cs:qword_1406C2ED8, rax                                        ; +0x93, 0x1404b35c3\nmov     rdx, [rax]                                                     ; +0x9a, 0x1404b35ca\nmov     rcx, rax                                                       ; +0x9d, 0x1404b35cd\ncall    qword ptr [rdx+48h]                                            ; +0xa0, 0x1404b35d0\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xa3, 0x1404b35d3\nmov     eax, [rbx+3CCh]                                                ; +0xaa, 0x1404b35da\nmov     ebx, 3Bh ; ';'                                                 ; +0xb0, 0x1404b35e0\ncmp     eax, ebx                                                       ; +0xb5, 0x1404b35e5\ncmovl   ebx, eax                                                       ; +0xb7, 0x1404b35e7\ntest    ebx, ebx                                                       ; +0xba, 0x1404b35ea\njle     short loc_1404B360F                                            ; +0xbc, 0x1404b35ec\nmov     edx, ebx                                                       ; +0xbe, 0x1404b35ee\ncall    GameManager__loadFont                                          ; +0xc0, 0x1404b35f0\nmov     edx, ebx                                                       ; +0xc5, 0x1404b35f5\nlea     rcx, aGjfont02dFnt; \"gjFont%02d.fnt\"                           ; +0xc7, 0x1404b35f7\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xce, 0x1404b35fe\nmov     rcx, rax                                                       ; +0xd4, 0x1404b3604\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xd7, 0x1404b3607\njmp     short loc_1404B361D                                            ; +0xdd, 0x1404b360d\nxor     edx, edx                                                       ; +0xdf, 0x1404b360f\ncall    GameManager__loadFont                                          ; +0xe1, 0x1404b3611\nlea     rax, qword_14052A4D8                                           ; +0xe6, 0x1404b3616\nmov     rcx, rdi                                                       ; +0xed, 0x1404b361d\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0xf0, 0x1404b3620\njbe     short loc_1404B362A                                            ; +0xf5, 0x1404b3625\nmov     rcx, [rdi]                                                     ; +0xf7, 0x1404b3627\nmov     rdx, rax                                                       ; +0xfa, 0x1404b362a\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0xfd, 0x1404b362d\nmov     [rsi+740h], rax                                                ; +0x103, 0x1404b3633\nmov     rbx, [rax]                                                     ; +0x10a, 0x1404b363a\nmovss   xmm2, dword ptr [rsi+1B4h]                                     ; +0x10d, 0x1404b363d\nmulss   xmm2, cs:dword_140622B08                                       ; +0x115, 0x1404b3645\nmovss   xmm1, dword ptr [rsi+1B0h]                                     ; +0x11d, 0x1404b364d\nmulss   xmm1, cs:dword_140622B08                                       ; +0x125, 0x1404b3655\nlea     rcx, [rsp+48h+var_28]                                          ; +0x12d, 0x1404b365d\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x132, 0x1404b3662\nmov     rdx, rax                                                       ; +0x138, 0x1404b3668\nmov     rcx, [rsi+740h]                                                ; +0x13b, 0x1404b366b\ncall    qword ptr [rbx+0B8h]                                           ; +0x142, 0x1404b3672\nmov     rax, [rsi]                                                     ; +0x148, 0x1404b3678\nmov     rdx, [rsi+740h]                                                ; +0x14b, 0x1404b367b\nmov     rcx, rsi                                                       ; +0x152, 0x1404b3682\ncall    qword ptr [rax+1C0h]                                           ; +0x155, 0x1404b3685\nmov     edx, [rsi+774h]                                                ; +0x15b, 0x1404b368b\nmov     rcx, rsi                                                       ; +0x161, 0x1404b3691\ncall    LabelGameObject__updateLabelAlign                              ; +0x164, 0x1404b3694\nmov     byte ptr [rsi+748h], 0                                         ; +0x169, 0x1404b3699\nmov     rcx, rdi                                                       ; +0x170, 0x1404b36a0\ncall    sub_14003A830                                                  ; +0x173, 0x1404b36a3\nmov     rcx, [rsp+48h+var_18]                                          ; +0x178, 0x1404b36a8\nxor     rcx, rsp; StackCookie                                          ; +0x17d, 0x1404b36ad\ncall    __security_check_cookie                                        ; +0x180, 0x1404b36b0\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x185, 0x1404b36b5\nmov     rsi, [rsp+48h+arg_18]                                          ; +0x18a, 0x1404b36ba\nadd     rsp, 40h                                                       ; +0x18f, 0x1404b36bf\npop     rdi                                                            ; +0x193, 0x1404b36c3\nretn                                                                   ; +0x194, 0x1404b36c4", "xrefs": ["LevelEditorLayer::updateLevelFont @ 0x1402df555", "LabelGameObject::setupCustomSprites @ 0x1404b3505", "<???> @ 0x1406dcaa0"], "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"}