{"type": "func", "start": 5375347120, "end": 5375347604, "name": "LabelGameObject::createLabel", "pseudocode": "// \n// LabelGameObject::createLabel from 0x1406549b0 to 0x140654b94 (484 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::updateLevelFont @ 0x1403fdeb4\n// > LabelGameObject::setupCustomSprites @ 0x140654985\n// > <???> @ 0x140931664\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:35:44 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall LabelGameObject::createLabel(__int64 a1, const char *a2)\n{\n  __int64 v4; // rcx\n  __int64 v5; // rbx\n  int v6; // eax\n  int v7; // ebx\n  cocos2d::CCString *v8; // rax\n  __int64 *CString; // rax\n  const char *v10; // rcx\n  struct cocos2d::CCLabelBMFont *v11; // rdi\n  __int64 v12; // rbx\n  __int64 v13; // rax\n  int v14; // eax\n  __int64 *v15; // rdi\n  float v16; // xmm1_4\n  __int64 v17; // rdi\n  __int64 v18; // rbx\n  __int64 v19; // rax\n  __int64 v20[2]; // [rsp+20h] [rbp-48h] BYREF\n\n  v20[1] = (__int64)a2;\n  if ( *(_QWORD *)(a1 + 1856) )\n    LabelGameObject::removeLabel(a1);\n  v4 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v20[0] = (__int64)operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v20[0]);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v4 = qword_14090BFD0;\n  }\n  v5 = v4;\n  if ( !v4 )\n  {\n    v20[0] = (__int64)operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v20[0]);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v4 = qword_14090BFD0;\n  }\n  v6 = *(_DWORD *)(v5 + 1024);\n  v7 = 59;\n  if ( v6 < 59 )\n    v7 = v6;\n  if ( v7 <= 0 )\n  {\n    GameManager::loadFont(v4, 0);\n    CString = &qword_140704F78;\n  }\n  else\n  {\n    GameManager::loadFont(v4, v7);\n    v8 = cocos2d::CCString::createWithFormat(\"gjFont%02d.fnt\", v7);\n    CString = (__int64 *)cocos2d::CCString::getCString(v8);\n  }\n  v10 = a2;\n  if ( *((_QWORD *)a2 + 3) > 0xFu )\n    v10 = *(const char **)a2;\n  v11 = cocos2d::CCLabelBMFont::create(v10, CString);\n  *(_QWORD *)(a1 + 1856) = v11;\n  v12 = *(_QWORD *)v11;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, *(float *)(a1 + 432) * 0.5, *(float *)(a1 + 436) * 0.5);\n  (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v12 + 184))(v11, v13);\n  (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 1856));\n  v14 = *(_DWORD *)(a1 + 1908);\n  v15 = *(__int64 **)(a1 + 1856);\n  if ( v15 )\n  {\n    if ( v14 == 1 )\n    {\n      v16 = 0.0;\n    }\n    else if ( v14 == 2 )\n    {\n      v16 = 1.0;\n    }\n    else\n    {\n      v16 = 0.5;\n    }\n    v17 = *v15;\n    v18 = *(_QWORD *)(a1 + 1856);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v16, 0.5);\n    (*(void (__fastcall **)(__int64, __int64))(v17 + 288))(v18, v19);\n  }\n  *(_BYTE *)(a1 + 1864) = 0;\n  sub_14003D310((__int64)a2);\n}", "assembly": "; \n; LabelGameObject::createLabel from 0x1406549b0 to 0x140654b94 (484 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::updateLevelFont @ 0x1403fdeb4\n; > LabelGameObject::setupCustomSprites @ 0x140654985\n; > <???> @ 0x140931664\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:35:44 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1406549b0\npush    rsi                                                            ; +0x5, 0x1406549b5\npush    rdi                                                            ; +0x6, 0x1406549b6\npush    r14                                                            ; +0x7, 0x1406549b7\nsub     rsp, 50h                                                       ; +0x9, 0x1406549b9\nmovaps  [rsp+68h+var_28], xmm6                                         ; +0xd, 0x1406549bd\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x1406549c2\nxor     rax, rsp                                                       ; +0x19, 0x1406549c9\nmov     [rsp+68h+var_38], rax                                          ; +0x1c, 0x1406549cc\nmov     r14, rdx                                                       ; +0x21, 0x1406549d1\nmov     rsi, rcx                                                       ; +0x24, 0x1406549d4\nmov     [rsp+68h+var_40], rdx                                          ; +0x27, 0x1406549d7\ncmp     qword ptr [rcx+740h], 0                                        ; +0x2c, 0x1406549dc\njz      short loc_1406549EB                                            ; +0x34, 0x1406549e4\ncall    LabelGameObject__removeLabel                                   ; +0x36, 0x1406549e6\nmov     rcx, cs:qword_14090BFD0                                        ; +0x3b, 0x1406549eb\ntest    rcx, rcx                                                       ; +0x42, 0x1406549f2\njnz     short loc_140654A26                                            ; +0x45, 0x1406549f5\nmov     ecx, 6E8h; Size                                                ; +0x47, 0x1406549f7\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x4c, 0x1406549fc\nmov     [rsp+68h+var_48], rax                                          ; +0x51, 0x140654a01\nmov     rcx, rax                                                       ; +0x56, 0x140654a06\ncall    GameManager__GameManager                                       ; +0x59, 0x140654a09\nnop                                                                    ; +0x5e, 0x140654a0e\nmov     cs:qword_14090BFD0, rax                                        ; +0x5f, 0x140654a0f\nmov     rdx, [rax]                                                     ; +0x66, 0x140654a16\nmov     rcx, rax                                                       ; +0x69, 0x140654a19\ncall    qword ptr [rdx+48h]                                            ; +0x6c, 0x140654a1c\nmov     rcx, cs:qword_14090BFD0                                        ; +0x6f, 0x140654a1f\nmov     rbx, rcx                                                       ; +0x76, 0x140654a26\ntest    rcx, rcx                                                       ; +0x79, 0x140654a29\njnz     short loc_140654A60                                            ; +0x7c, 0x140654a2c\nmov     ecx, 6E8h; Size                                                ; +0x7e, 0x140654a2e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x83, 0x140654a33\nmov     [rsp+68h+var_48], rax                                          ; +0x88, 0x140654a38\nmov     rcx, rax                                                       ; +0x8d, 0x140654a3d\ncall    GameManager__GameManager                                       ; +0x90, 0x140654a40\nnop                                                                    ; +0x95, 0x140654a45\nmov     cs:qword_14090BFD0, rax                                        ; +0x96, 0x140654a46\nmov     rcx, [rax]                                                     ; +0x9d, 0x140654a4d\nmov     rdx, [rcx+48h]                                                 ; +0xa0, 0x140654a50\nmov     rcx, rax                                                       ; +0xa4, 0x140654a54\ncall    rdx                                                            ; +0xa7, 0x140654a57\nmov     rcx, cs:qword_14090BFD0                                        ; +0xa9, 0x140654a59\nmov     eax, [rbx+400h]                                                ; +0xb0, 0x140654a60\nmov     ebx, 3Bh ; ';'                                                 ; +0xb6, 0x140654a66\ncmp     eax, ebx                                                       ; +0xbb, 0x140654a6b\ncmovl   ebx, eax                                                       ; +0xbd, 0x140654a6d\ntest    ebx, ebx                                                       ; +0xc0, 0x140654a70\njle     short loc_140654A95                                            ; +0xc2, 0x140654a72\nmov     edx, ebx                                                       ; +0xc4, 0x140654a74\ncall    GameManager__loadFont                                          ; +0xc6, 0x140654a76\nmov     edx, ebx                                                       ; +0xcb, 0x140654a7b\nlea     rcx, aGjfont02dFnt; \"gjFont%02d.fnt\"                           ; +0xcd, 0x140654a7d\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xd4, 0x140654a84\nmov     rcx, rax                                                       ; +0xda, 0x140654a8a\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xdd, 0x140654a8d\njmp     short loc_140654AA3                                            ; +0xe3, 0x140654a93\nxor     edx, edx                                                       ; +0xe5, 0x140654a95\ncall    GameManager__loadFont                                          ; +0xe7, 0x140654a97\nlea     rax, qword_140704F78                                           ; +0xec, 0x140654a9c\nmov     rcx, r14                                                       ; +0xf3, 0x140654aa3\ncmp     qword ptr [r14+18h], 0Fh                                       ; +0xf6, 0x140654aa6\njbe     short loc_140654AB0                                            ; +0xfb, 0x140654aab\nmov     rcx, [r14]                                                     ; +0xfd, 0x140654aad\nmov     rdx, rax                                                       ; +0x100, 0x140654ab0\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x103, 0x140654ab3\nmov     rdi, rax                                                       ; +0x109, 0x140654ab9\nmov     [rsi+740h], rax                                                ; +0x10c, 0x140654abc\nmov     rbx, [rax]                                                     ; +0x113, 0x140654ac3\nmovss   xmm2, dword ptr [rsi+1B4h]                                     ; +0x116, 0x140654ac6\nmovss   xmm6, cs:dword_140834F20                                       ; +0x11e, 0x140654ace\nmulss   xmm2, xmm6                                                     ; +0x126, 0x140654ad6\nmovss   xmm1, dword ptr [rsi+1B0h]                                     ; +0x12a, 0x140654ada\nmulss   xmm1, xmm6                                                     ; +0x132, 0x140654ae2\nlea     rcx, [rsp+68h+var_48]                                          ; +0x136, 0x140654ae6\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x13b, 0x140654aeb\nmov     rdx, rax                                                       ; +0x141, 0x140654af1\nmov     rcx, rdi                                                       ; +0x144, 0x140654af4\ncall    qword ptr [rbx+0B8h]                                           ; +0x147, 0x140654af7\nmov     rax, [rsi]                                                     ; +0x14d, 0x140654afd\nmov     rdx, [rsi+740h]                                                ; +0x150, 0x140654b00\nmov     rcx, rsi                                                       ; +0x157, 0x140654b07\ncall    qword ptr [rax+1D0h]                                           ; +0x15a, 0x140654b0a\nmov     eax, [rsi+774h]                                                ; +0x160, 0x140654b10\nmov     rdi, [rsi+740h]                                                ; +0x166, 0x140654b16\ntest    rdi, rdi                                                       ; +0x16d, 0x140654b1d\njz      short loc_140654B62                                            ; +0x170, 0x140654b20\ncmp     eax, 1                                                         ; +0x172, 0x140654b22\njnz     short loc_140654B2C                                            ; +0x175, 0x140654b25\nxorps   xmm1, xmm1                                                     ; +0x177, 0x140654b27\njmp     short loc_140654B3E                                            ; +0x17a, 0x140654b2a\ncmp     eax, 2                                                         ; +0x17c, 0x140654b2c\njnz     short loc_140654B3B                                            ; +0x17f, 0x140654b2f\nmovss   xmm1, cs:flt_140835080                                         ; +0x181, 0x140654b31\njmp     short loc_140654B3E                                            ; +0x189, 0x140654b39\nmovaps  xmm1, xmm6                                                     ; +0x18b, 0x140654b3b\nmov     rdi, [rdi]                                                     ; +0x18e, 0x140654b3e\nmov     rbx, [rsi+740h]                                                ; +0x191, 0x140654b41\nmovaps  xmm2, xmm6                                                     ; +0x198, 0x140654b48\nlea     rcx, [rsp+68h+var_48]                                          ; +0x19b, 0x140654b4b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1a0, 0x140654b50\nmov     rdx, rax                                                       ; +0x1a6, 0x140654b56\nmov     rcx, rbx                                                       ; +0x1a9, 0x140654b59\ncall    qword ptr [rdi+120h]                                           ; +0x1ac, 0x140654b5c\nmov     byte ptr [rsi+748h], 0                                         ; +0x1b2, 0x140654b62\nmov     rcx, r14                                                       ; +0x1b9, 0x140654b69\ncall    sub_14003D310                                                  ; +0x1bc, 0x140654b6c\nmov     rcx, [rsp+68h+var_38]                                          ; +0x1c1, 0x140654b71\nxor     rcx, rsp; StackCookie                                          ; +0x1c6, 0x140654b76\ncall    __security_check_cookie                                        ; +0x1c9, 0x140654b79\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x1ce, 0x140654b7e\nmovaps  xmm6, [rsp+68h+var_28]                                         ; +0x1d6, 0x140654b86\nadd     rsp, 50h                                                       ; +0x1db, 0x140654b8b\npop     r14                                                            ; +0x1df, 0x140654b8f\npop     rdi                                                            ; +0x1e1, 0x140654b91\npop     rsi                                                            ; +0x1e2, 0x140654b92\nretn                                                                   ; +0x1e3, 0x140654b93", "xrefs": ["LevelEditorLayer::updateLevelFont @ 0x1403fdeb4", "LabelGameObject::setupCustomSprites @ 0x140654985", "<???> @ 0x140931664"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}