{"type": "func", "start": 6442779408, "end": 6442779649, "name": "cocos2d::CCLabelTTF::initWithString", "pseudocode": "// \n// cocos2d::CCLabelTTF::initWithString from 0x180050310 to 0x180050401 (241 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCLabelTTF::create @ 0x18004fbdd\n// > cocos2d::CCLabelTTF::create @ 0x18004fcb4\n// > cocos2d::CCLabelTTF::initWithString @ 0x1800502ca\n// > cocos2d::CCLabelTTF::initWithString @ 0x1800502fe\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bbf2c\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:21:45 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nchar __fastcall cocos2d::CCLabelTTF::initWithString(\n        cocos2d::CCSprite *a1,\n        __int64 a2,\n        char *a3,\n        float a4,\n        float *a5,\n        int a6,\n        int a7)\n{\n  __int64 v10; // rbx\n  cocos2d::CCShaderCache *v11; // rax\n  struct cocos2d::CCGLProgram *v12; // rax\n  float *v13; // rax\n  _QWORD *v14; // rax\n  float v16[4]; // [rsp+20h] [rbp-28h] BYREF\n\n  if ( !cocos2d::CCSprite::init(a1) )\n    return 0;\n  v10 = *(_QWORD *)a1;\n  v11 = cocos2d::CCShaderCache::sharedShaderCache();\n  v12 = cocos2d::CCShaderCache::programForKey(v11, \"ShaderPositionTextureColor\");\n  (*(void (__fastcall **)(cocos2d::CCSprite *, struct cocos2d::CCGLProgram *))(v10 + 656))(a1, v12);\n  v13 = kmVec2Fill(v16, *a5, a5[1]);\n  cocos2d::CCSize::operator=((_DWORD *)a1 + 152, v13);\n  *((_DWORD *)a1 + 154) = a6;\n  *((_DWORD *)a1 + 155) = a7;\n  v14 = (_QWORD *)sub_1800E4AC0(0x20u);\n  *(_QWORD *)v16 = v14;\n  if ( v14 )\n    v14 = sub_180005A10(v14, a3);\n  *((_QWORD *)a1 + 78) = v14;\n  *((float *)a1 + 158) = a4;\n  (**((void (__fastcall ***)(__int64 *, __int64))a1 + 75))((__int64 *)a1 + 75, a2);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCLabelTTF::initWithString from 0x180050310 to 0x180050401 (241 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCLabelTTF::create @ 0x18004fbdd\n; > cocos2d::CCLabelTTF::create @ 0x18004fcb4\n; > cocos2d::CCLabelTTF::initWithString @ 0x1800502ca\n; > cocos2d::CCLabelTTF::initWithString @ 0x1800502fe\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bbf2c\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:21:45 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180050310\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180050315\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18005031a\npush    rdi                                                            ; +0xf, 0x18005031f\nsub     rsp, 40h                                                       ; +0x10, 0x180050320\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x14, 0x180050324\nmovaps  xmm6, xmm3                                                     ; +0x19, 0x180050329\nmov     rsi, r8                                                        ; +0x1c, 0x18005032c\nmov     rbp, rdx                                                       ; +0x1f, 0x18005032f\nmov     rdi, rcx                                                       ; +0x22, 0x180050332\ncall    ?init@CCSprite@cocos2d@@UEAA_NXZ; cocos2d::CCSprite::init(void) ; +0x25, 0x180050335\ntest    al, al                                                         ; +0x2a, 0x18005033a\njz      loc_1800503E5                                                  ; +0x2c, 0x18005033c\nmov     rbx, [rdi]                                                     ; +0x32, 0x180050342\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0x35, 0x180050345\nmov     rcx, rax; this                                                 ; +0x3a, 0x18005034a\nlea     rdx, aShaderposition_3; \"ShaderPositionTextureColor\"           ; +0x3d, 0x18005034d\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x44, 0x180050354\nmov     rdx, rax                                                       ; +0x49, 0x180050359\nmov     rcx, rdi                                                       ; +0x4c, 0x18005035c\ncall    qword ptr [rbx+290h]                                           ; +0x4f, 0x18005035f\nmov     rax, [rsp+48h+arg_20]                                          ; +0x55, 0x180050365\nmovss   xmm2, dword ptr [rax+4]                                        ; +0x5a, 0x18005036a\nmovss   xmm1, dword ptr [rax]                                          ; +0x5f, 0x18005036f\nlea     rcx, [rsp+48h+var_28]                                          ; +0x63, 0x180050373\ncall    kmVec2Fill                                                     ; +0x68, 0x180050378\nmov     rdx, rax                                                       ; +0x6d, 0x18005037d\nlea     rcx, [rdi+260h]                                                ; +0x70, 0x180050380\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x77, 0x180050387\nmov     eax, [rsp+48h+arg_28]                                          ; +0x7c, 0x18005038c\nmov     [rdi+268h], eax                                                ; +0x80, 0x180050390\nmov     eax, [rsp+48h+arg_30]                                          ; +0x86, 0x180050396\nmov     [rdi+26Ch], eax                                                ; +0x8d, 0x18005039d\nmov     ecx, 20h ; ' '; Size                                           ; +0x93, 0x1800503a3\ncall    sub_1800E4AC0                                                  ; +0x98, 0x1800503a8\nmov     qword ptr [rsp+48h+var_28], rax                                ; +0x9d, 0x1800503ad\ntest    rax, rax                                                       ; +0xa2, 0x1800503b2\njz      short loc_1800503C3                                            ; +0xa5, 0x1800503b5\nmov     rdx, rsi; Str                                                  ; +0xa7, 0x1800503b7\nmov     rcx, rax; void *                                               ; +0xaa, 0x1800503ba\ncall    sub_180005A10                                                  ; +0xad, 0x1800503bd\nnop                                                                    ; +0xb2, 0x1800503c2\nmov     [rdi+270h], rax                                                ; +0xb3, 0x1800503c3\nmovss   dword ptr [rdi+278h], xmm6                                     ; +0xba, 0x1800503ca\nlea     rcx, [rdi+258h]                                                ; +0xc2, 0x1800503d2\nmov     rax, [rcx]                                                     ; +0xc9, 0x1800503d9\nmov     rdx, rbp                                                       ; +0xcc, 0x1800503dc\ncall    qword ptr [rax]                                                ; +0xcf, 0x1800503df\nmov     al, 1                                                          ; +0xd1, 0x1800503e1\njmp     short loc_1800503E7                                            ; +0xd3, 0x1800503e3\nxor     al, al                                                         ; +0xd5, 0x1800503e5\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xd7, 0x1800503e7\nmov     rbp, [rsp+48h+arg_8]                                           ; +0xdc, 0x1800503ec\nmov     rsi, [rsp+48h+arg_10]                                          ; +0xe1, 0x1800503f1\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0xe6, 0x1800503f6\nadd     rsp, 40h                                                       ; +0xeb, 0x1800503fb\npop     rdi                                                            ; +0xef, 0x1800503ff\nretn                                                                   ; +0xf0, 0x180050400", "xrefs": ["cocos2d::CCLabelTTF::create @ 0x18004fbdd", "cocos2d::CCLabelTTF::create @ 0x18004fcb4", "cocos2d::CCLabelTTF::initWithString @ 0x1800502ca", "cocos2d::CCLabelTTF::initWithString @ 0x1800502fe", "<???> @ 0x18014cf68", "<???> @ 0x1801bbf2c"], "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"}