{"type": "func", "start": 6442771664, "end": 6442771905, "name": "cocos2d::CCLabelTTF::initWithString", "pseudocode": "// \n// cocos2d::CCLabelTTF::initWithString from 0x18004e4d0 to 0x18004e5c1 (241 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCLabelTTF::create @ 0x18004ddcd\n// > cocos2d::CCLabelTTF::create @ 0x18004dea4\n// > cocos2d::CCLabelTTF::initWithString @ 0x18004e48a\n// > cocos2d::CCLabelTTF::initWithString @ 0x18004e4be\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b1c98\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=1\nchar __fastcall cocos2d::CCLabelTTF::initWithString(\n        cocos2d::CCLabelTTF *this,\n        const char *a2,\n        char *a3,\n        float a4,\n        const struct cocos2d::CCSize *a5,\n        enum cocos2d::CCTextAlignment a6,\n        enum cocos2d::CCVerticalTextAlignment a7)\n{\n  cocos2d::CCLabelTTF_vtbl *v10; // rbx\n  cocos2d::CCShaderCache *v11; // rax\n  struct cocos2d::CCGLProgram *v12; // rax\n  float *v13; // rax\n  std::string *v14; // rax\n  std::string *v16; // [rsp+20h] [rbp-28h] BYREF\n\n  if ( !cocos2d::CCSprite::init(this) )\n    return 0;\n  v10 = this->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v11 = cocos2d::CCShaderCache::sharedShaderCache();\n  v12 = cocos2d::CCShaderCache::programForKey(v11, \"ShaderPositionTextureColor\");\n  ((void (__fastcall *)(cocos2d::CCLabelTTF *, struct cocos2d::CCGLProgram *))v10->setShaderProgram)(this, v12);\n  v13 = kmVec2Fill((float *)&v16, a5->width, a5->height);\n  cocos2d::CCSize::operator=(&this->m_tDimensions, v13);\n  this->m_hAlignment = a6;\n  this->m_vAlignment = a7;\n  v14 = (std::string *)operator new(0x20u);\n  v16 = v14;\n  if ( v14 )\n    v14 = (std::string *)sub_180005910(v14, a3);\n  this->m_pFontName = v14;\n  this->m_fFontSize = a4;\n  ((void (__fastcall *)(cocos2d::CCLabelProtocol *, const char *))this->setString)(&this->cocos2d::CCLabelProtocol, a2);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCLabelTTF::initWithString from 0x18004e4d0 to 0x18004e5c1 (241 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCLabelTTF::create @ 0x18004ddcd\n; > cocos2d::CCLabelTTF::create @ 0x18004dea4\n; > cocos2d::CCLabelTTF::initWithString @ 0x18004e48a\n; > cocos2d::CCLabelTTF::initWithString @ 0x18004e4be\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b1c98\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_0], rbx                                               ; +0x0, 0x18004e4d0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x18004e4d5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18004e4da\npush    rdi                                                            ; +0xf, 0x18004e4df\nsub     rsp, 40h                                                       ; +0x10, 0x18004e4e0\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x14, 0x18004e4e4\nmovaps  xmm6, xmm3                                                     ; +0x19, 0x18004e4e9\nmov     rsi, r8                                                        ; +0x1c, 0x18004e4ec\nmov     rbp, rdx                                                       ; +0x1f, 0x18004e4ef\nmov     rdi, rcx                                                       ; +0x22, 0x18004e4f2\ncall    ?init@CCSprite@cocos2d@@UEAA_NXZ; cocos2d::CCSprite::init(void) ; +0x25, 0x18004e4f5\ntest    al, al                                                         ; +0x2a, 0x18004e4fa\njz      loc_18004E5A5                                                  ; +0x2c, 0x18004e4fc\nmov     rbx, [rdi]                                                     ; +0x32, 0x18004e502\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0x35, 0x18004e505\nmov     rcx, rax; this                                                 ; +0x3a, 0x18004e50a\nlea     rdx, aShaderposition_3; \"ShaderPositionTextureColor\"           ; +0x3d, 0x18004e50d\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x44, 0x18004e514\nmov     rdx, rax                                                       ; +0x49, 0x18004e519\nmov     rcx, rdi                                                       ; +0x4c, 0x18004e51c\ncall    qword ptr [rbx+280h]                                           ; +0x4f, 0x18004e51f\nmov     rax, [rsp+48h+arg_20]                                          ; +0x55, 0x18004e525\nmovss   xmm2, dword ptr [rax+4]                                        ; +0x5a, 0x18004e52a\nmovss   xmm1, dword ptr [rax]                                          ; +0x5f, 0x18004e52f\nlea     rcx, [rsp+48h+var_28]                                          ; +0x63, 0x18004e533\ncall    kmVec2Fill                                                     ; +0x68, 0x18004e538\nmov     rdx, rax                                                       ; +0x6d, 0x18004e53d\nlea     rcx, [rdi+260h]                                                ; +0x70, 0x18004e540\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x77, 0x18004e547\nmov     eax, [rsp+48h+arg_28]                                          ; +0x7c, 0x18004e54c\nmov     [rdi+268h], eax                                                ; +0x80, 0x18004e550\nmov     eax, [rsp+48h+arg_30]                                          ; +0x86, 0x18004e556\nmov     [rdi+26Ch], eax                                                ; +0x8d, 0x18004e55d\nmov     ecx, 20h ; ' '; Size                                           ; +0x93, 0x18004e563\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x98, 0x18004e568\nmov     [rsp+48h+var_28], rax                                          ; +0x9d, 0x18004e56d\ntest    rax, rax                                                       ; +0xa2, 0x18004e572\njz      short loc_18004E583                                            ; +0xa5, 0x18004e575\nmov     rdx, rsi                                                       ; +0xa7, 0x18004e577\nmov     rcx, rax                                                       ; +0xaa, 0x18004e57a\ncall    sub_180005910                                                  ; +0xad, 0x18004e57d\nnop                                                                    ; +0xb2, 0x18004e582\nmov     [rdi+270h], rax                                                ; +0xb3, 0x18004e583\nmovss   dword ptr [rdi+278h], xmm6                                     ; +0xba, 0x18004e58a\nlea     rcx, [rdi+258h]                                                ; +0xc2, 0x18004e592\nmov     rax, [rcx]                                                     ; +0xc9, 0x18004e599\nmov     rdx, rbp                                                       ; +0xcc, 0x18004e59c\ncall    qword ptr [rax]                                                ; +0xcf, 0x18004e59f\nmov     al, 1                                                          ; +0xd1, 0x18004e5a1\njmp     short loc_18004E5A7                                            ; +0xd3, 0x18004e5a3\nxor     al, al                                                         ; +0xd5, 0x18004e5a5\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xd7, 0x18004e5a7\nmov     rbp, [rsp+48h+arg_8]                                           ; +0xdc, 0x18004e5ac\nmov     rsi, [rsp+48h+arg_10]                                          ; +0xe1, 0x18004e5b1\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0xe6, 0x18004e5b6\nadd     rsp, 40h                                                       ; +0xeb, 0x18004e5bb\npop     rdi                                                            ; +0xef, 0x18004e5bf\nretn                                                                   ; +0xf0, 0x18004e5c0", "xrefs": ["cocos2d::CCLabelTTF::create @ 0x18004ddcd", "cocos2d::CCLabelTTF::create @ 0x18004dea4", "cocos2d::CCLabelTTF::initWithString @ 0x18004e48a", "cocos2d::CCLabelTTF::initWithString @ 0x18004e4be", "<???> @ 0x1801438a8", "<???> @ 0x1801b1c98"], "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"}