{"type": "func", "start": 6443145040, "end": 6443145409, "name": "cocos2d::CCTexture2D::initWithString", "pseudocode": "// \n// cocos2d::CCTexture2D::initWithString from 0x1800a9750 to 0x1800a98c1 (369 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCLabelTTF::updateTexture @ 0x18005077b\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c1f38\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:22:17 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nchar __fastcall cocos2d::CCTexture2D::initWithString(\n        cocos2d::CCTexture2D *a1,\n        const char *a2,\n        char *a3,\n        float a4,\n        float *a5,\n        int a6,\n        int a7)\n{\n  char v10; // si\n  unsigned __int16 *v11; // rdi\n  int v12; // ebx\n  cocos2d::CCImage *v13; // rax\n  unsigned int v14; // esi\n  unsigned int v15; // ebx\n  cocos2d::CCInteger *v16; // rax\n  unsigned int Value; // eax\n  char inited; // si\n\n  v10 = 0;\n  v11 = nullptr;\n  if ( a7 )\n  {\n    if ( a7 == 1 )\n    {\n      if ( a6 == 1 )\n        v12 = 51;\n      else\n        v12 = (a6 != 0) + 49;\n    }\n    else\n    {\n      if ( a7 != 2 )\n        return 0;\n      if ( a6 == 1 )\n        v12 = 35;\n      else\n        v12 = (a6 != 0) + 33;\n    }\n  }\n  else if ( a6 == 1 )\n  {\n    v12 = 19;\n  }\n  else\n  {\n    v12 = (a6 != 0) + 17;\n  }\n  v13 = (cocos2d::CCImage *)sub_1800E4AC0(0x50u);\n  if ( v13 )\n    v11 = (unsigned __int16 *)cocos2d::CCImage::CCImage(v13);\n  if ( v11 )\n  {\n    v10 = cocos2d::CCImage::initWithString((__int64)v11, a2, (int)*a5, (int)a5[1], v12, a3, (int)a4);\n    if ( v10 )\n    {\n      v14 = v11[28];\n      v15 = v11[29];\n      v16 = cocos2d::CCConfiguration::sharedConfiguration();\n      Value = cocos2d::CCInteger::getValue(v16);\n      if ( v14 <= Value && v15 <= Value )\n      {\n        inited = cocos2d::CCTexture2D::initPremultipliedATextureWithImage(a1, (struct cocos2d::CCImage *)v11, v14, v15);\n        cocos2d::CCObject::release((cocos2d::CCObject *)v11);\n        return inited;\n      }\n      v10 = 0;\n      cocos2d::CCObject::release((cocos2d::CCObject *)v11);\n    }\n  }\n  return v10;\n}", "assembly": "; \n; cocos2d::CCTexture2D::initWithString from 0x1800a9750 to 0x1800a98c1 (369 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCLabelTTF::updateTexture @ 0x18005077b\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c1f38\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:22:17 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800a9750\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800a9755\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800a975a\npush    rdi                                                            ; +0xf, 0x1800a975f\npush    r14                                                            ; +0x10, 0x1800a9760\npush    r15                                                            ; +0x12, 0x1800a9762\nsub     rsp, 60h                                                       ; +0x14, 0x1800a9764\nmovaps  [rsp+78h+var_28], xmm6                                         ; +0x18, 0x1800a9768\nmovaps  xmm6, xmm3                                                     ; +0x1d, 0x1800a976d\nmov     r14, r8                                                        ; +0x20, 0x1800a9770\nmov     r15, rdx                                                       ; +0x23, 0x1800a9773\nmov     rbp, rcx                                                       ; +0x26, 0x1800a9776\nxor     sil, sil                                                       ; +0x29, 0x1800a9779\nxor     edi, edi                                                       ; +0x2c, 0x1800a977c\nmov     eax, [rsp+78h+arg_30]                                          ; +0x2e, 0x1800a977e\ntest    eax, eax                                                       ; +0x35, 0x1800a9785\njnz     short loc_1800A97A8                                            ; +0x37, 0x1800a9787\nmov     eax, [rsp+78h+arg_28]                                          ; +0x39, 0x1800a9789\ncmp     eax, 1                                                         ; +0x40, 0x1800a9790\njnz     short loc_1800A979C                                            ; +0x43, 0x1800a9793\nmov     ebx, 13h                                                       ; +0x45, 0x1800a9795\njmp     short loc_1800A97F2                                            ; +0x4a, 0x1800a979a\nmov     ebx, edi                                                       ; +0x4c, 0x1800a979c\ntest    eax, eax                                                       ; +0x4e, 0x1800a979e\nsetnz   bl                                                             ; +0x50, 0x1800a97a0\nadd     ebx, 11h                                                       ; +0x53, 0x1800a97a3\njmp     short loc_1800A97F2                                            ; +0x56, 0x1800a97a6\ncmp     eax, 1                                                         ; +0x58, 0x1800a97a8\njnz     short loc_1800A97CC                                            ; +0x5b, 0x1800a97ab\nmov     eax, [rsp+78h+arg_28]                                          ; +0x5d, 0x1800a97ad\ncmp     eax, 1                                                         ; +0x64, 0x1800a97b4\njnz     short loc_1800A97C0                                            ; +0x67, 0x1800a97b7\nmov     ebx, 33h ; '3'                                                 ; +0x69, 0x1800a97b9\njmp     short loc_1800A97F2                                            ; +0x6e, 0x1800a97be\nmov     ebx, edi                                                       ; +0x70, 0x1800a97c0\ntest    eax, eax                                                       ; +0x72, 0x1800a97c2\nsetnz   bl                                                             ; +0x74, 0x1800a97c4\nadd     ebx, 31h ; '1'                                                 ; +0x77, 0x1800a97c7\njmp     short loc_1800A97F2                                            ; +0x7a, 0x1800a97ca\ncmp     eax, 2                                                         ; +0x7c, 0x1800a97cc\njnz     loc_1800A98A0                                                  ; +0x7f, 0x1800a97cf\nmov     eax, [rsp+78h+arg_28]                                          ; +0x85, 0x1800a97d5\ncmp     eax, 1                                                         ; +0x8c, 0x1800a97dc\njnz     short loc_1800A97E8                                            ; +0x8f, 0x1800a97df\nmov     ebx, 23h ; '#'                                                 ; +0x91, 0x1800a97e1\njmp     short loc_1800A97F2                                            ; +0x96, 0x1800a97e6\nmov     ebx, edi                                                       ; +0x98, 0x1800a97e8\ntest    eax, eax                                                       ; +0x9a, 0x1800a97ea\nsetnz   bl                                                             ; +0x9c, 0x1800a97ec\nadd     ebx, 21h ; '!'                                                 ; +0x9f, 0x1800a97ef\nmov     ecx, 50h ; 'P'; Size                                           ; +0xa2, 0x1800a97f2\ncall    sub_1800E4AC0                                                  ; +0xa7, 0x1800a97f7\nmov     [rsp+78h+var_38], rax                                          ; +0xac, 0x1800a97fc\ntest    rax, rax                                                       ; +0xb1, 0x1800a9801\njz      short loc_1800A9811                                            ; +0xb4, 0x1800a9804\nmov     rcx, rax; this                                                 ; +0xb6, 0x1800a9806\ncall    ??0CCImage@cocos2d@@QEAA@XZ; cocos2d::CCImage::CCImage(void)   ; +0xb9, 0x1800a9809\nmov     rdi, rax                                                       ; +0xbe, 0x1800a980e\ntest    rdi, rdi                                                       ; +0xc1, 0x1800a9811\njz      loc_1800A989A                                                  ; +0xc4, 0x1800a9814\ncvttss2si ecx, xmm6                                                    ; +0xca, 0x1800a981a\nmov     rax, [rsp+78h+arg_20]                                          ; +0xce, 0x1800a981e\ncvttss2si r9d, dword ptr [rax+4]                                       ; +0xd6, 0x1800a9826\ncvttss2si r8d, dword ptr [rax]                                         ; +0xdc, 0x1800a982c\nmov     [rsp+78h+var_48], ecx                                          ; +0xe1, 0x1800a9831\nmov     [rsp+78h+var_50], r14                                          ; +0xe5, 0x1800a9835\nmov     [rsp+78h+var_58], ebx                                          ; +0xea, 0x1800a983a\nmov     rdx, r15                                                       ; +0xee, 0x1800a983e\nmov     rcx, rdi                                                       ; +0xf1, 0x1800a9841\ncall    ?initWithString@CCImage@cocos2d@@QEAA_NPEBDHHW4ETextAlign@12@0H@Z; cocos2d::CCImage::initWithString(char const *,int,int,cocos2d::CCImage::ETextAlign,char const *,int) ; +0xf4, 0x1800a9844\nmovzx   esi, al                                                        ; +0xf9, 0x1800a9849\ntest    al, al                                                         ; +0xfc, 0x1800a984c\njz      short loc_1800A989A                                            ; +0xfe, 0x1800a984e\nmovzx   esi, word ptr [rdi+38h]                                        ; +0x100, 0x1800a9850\nmovzx   ebx, word ptr [rdi+3Ah]                                        ; +0x104, 0x1800a9854\ncall    ?sharedConfiguration@CCConfiguration@cocos2d@@SAPEAV12@XZ; cocos2d::CCConfiguration::sharedConfiguration(void) ; +0x108, 0x1800a9858\nmov     rcx, rax; this                                                 ; +0x10d, 0x1800a985d\ncall    ?getValue@CCInteger@cocos2d@@QEBAHXZ; cocos2d::CCInteger::getValue(void) ; +0x110, 0x1800a9860\ncmp     esi, eax                                                       ; +0x115, 0x1800a9865\nja      short loc_1800A988F                                            ; +0x117, 0x1800a9867\ncmp     ebx, eax                                                       ; +0x119, 0x1800a9869\nja      short loc_1800A988F                                            ; +0x11b, 0x1800a986b\nmov     r9d, ebx; unsigned int                                         ; +0x11d, 0x1800a986d\nmov     r8d, esi; unsigned int                                         ; +0x120, 0x1800a9870\nmov     rdx, rdi; struct cocos2d::CCImage *                            ; +0x123, 0x1800a9873\nmov     rcx, rbp; this                                                 ; +0x126, 0x1800a9876\ncall    ?initPremultipliedATextureWithImage@CCTexture2D@cocos2d@@AEAA_NPEAVCCImage@2@II@Z; cocos2d::CCTexture2D::initPremultipliedATextureWithImage(cocos2d::CCImage *,uint,uint) ; +0x129, 0x1800a9879\nmovzx   esi, al                                                        ; +0x12e, 0x1800a987e\nmov     rcx, rdi; this                                                 ; +0x131, 0x1800a9881\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x134, 0x1800a9884\nmovzx   eax, sil                                                       ; +0x139, 0x1800a9889\njmp     short loc_1800A98A2                                            ; +0x13d, 0x1800a988d\nxor     sil, sil                                                       ; +0x13f, 0x1800a988f\nmov     rcx, rdi; this                                                 ; +0x142, 0x1800a9892\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x145, 0x1800a9895\nmovzx   eax, sil                                                       ; +0x14a, 0x1800a989a\njmp     short loc_1800A98A2                                            ; +0x14e, 0x1800a989e\nxor     al, al                                                         ; +0x150, 0x1800a98a0\nlea     r11, [rsp+78h+var_18]                                          ; +0x152, 0x1800a98a2\nmov     rbx, [r11+20h]                                                 ; +0x157, 0x1800a98a7\nmov     rbp, [r11+28h]                                                 ; +0x15b, 0x1800a98ab\nmov     rsi, [r11+30h]                                                 ; +0x15f, 0x1800a98af\nmovaps  xmm6, [rsp+78h+var_28]                                         ; +0x163, 0x1800a98b3\nmov     rsp, r11                                                       ; +0x168, 0x1800a98b8\npop     r15                                                            ; +0x16b, 0x1800a98bb\npop     r14                                                            ; +0x16d, 0x1800a98bd\npop     rdi                                                            ; +0x16f, 0x1800a98bf\nretn                                                                   ; +0x170, 0x1800a98c0", "xrefs": ["cocos2d::CCLabelTTF::updateTexture @ 0x18005077b", "<???> @ 0x18014cf68", "<???> @ 0x1801c1f38"], "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"}