{"type": "func", "start": 6443197184, "end": 6443197559, "name": "cocos2d::CCTextFieldTTF::textFieldWithPlaceHolder", "pseudocode": "// \n// cocos2d::CCTextFieldTTF::textFieldWithPlaceHolder from 0x1800b6300 to 0x1800b6477 (375 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b8b14\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=2\ncocos2d::CCTextFieldTTF *__fastcall cocos2d::CCTextFieldTTF::textFieldWithPlaceHolder(\n        const char *a1,\n        const struct cocos2d::CCSize *a2,\n        enum cocos2d::CCTextAlignment a3,\n        const char *a4,\n        float a5)\n{\n  cocos2d::CCTextFieldTTF *v9; // rax\n  cocos2d::CCTextFieldTTF *v10; // rbx\n  std::string *m_pPlaceHolder; // rdi\n  unsigned __int64 m_capacity; // rdx\n  char *m_bigStorage; // rcx\n  std::string *v14; // rax\n\n  v9 = (cocos2d::CCTextFieldTTF *)operator new(0x300u);\n  if ( v9 )\n    v10 = cocos2d::CCTextFieldTTF::CCTextFieldTTF(v9);\n  else\n    v10 = nullptr;\n  if ( !v10 )\n    return nullptr;\n  m_pPlaceHolder = v10->m_pPlaceHolder;\n  if ( m_pPlaceHolder )\n  {\n    m_capacity = m_pPlaceHolder->m_data.m_capacity;\n    if ( m_capacity > 0xF )\n    {\n      m_bigStorage = m_pPlaceHolder->m_data.m_bigStorage;\n      if ( m_capacity + 1 >= 0x1000 )\n      {\n        if ( (unsigned __int64)&m_bigStorage[-*((_QWORD *)m_bigStorage - 1) - 8] > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n        m_bigStorage = *((char **)m_bigStorage - 1);\n      }\n      j_j_free_0(m_bigStorage);\n    }\n    m_pPlaceHolder->m_data.m_size = 0;\n    m_pPlaceHolder->m_data.m_capacity = 15;\n    m_pPlaceHolder->m_data.m_smallStorage._Elems[0] = 0;\n    j_j_free_0(m_pPlaceHolder);\n    v10->m_pPlaceHolder = nullptr;\n  }\n  v14 = (std::string *)operator new(0x20u);\n  if ( v14 )\n  {\n    v14->m_data.0 = 0;\n    v14->m_data.m_size = 0;\n    v14->m_data.m_capacity = 15;\n    v14->m_data.m_smallStorage._Elems[0] = 0;\n  }\n  else\n  {\n    v14 = nullptr;\n  }\n  v10->m_pPlaceHolder = v14;\n  if ( v14->m_data.m_capacity > 0xF )\n    v14 = (std::string *)v14->m_data.m_bigStorage;\n  if ( !cocos2d::CCLabelTTF::initWithString(v10, v14->m_data.m_smallStorage._Elems, a4, a5, a2, a3) )\n  {\n    ((void (__fastcall *)(cocos2d::CCTextFieldTTF *, __int64))v10->~CCTextFieldTTF)(v10, 1);\n    return nullptr;\n  }\n  cocos2d::CCObject::autorelease(v10);\n  if ( a1 )\n    ((void (__fastcall *)(cocos2d::CCTextFieldTTF *, const char *))v10->setColorSpaceHolder)(v10, a1);\n  return v10;\n}", "assembly": "; \n; cocos2d::CCTextFieldTTF::textFieldWithPlaceHolder from 0x1800b6300 to 0x1800b6477 (375 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b8b14\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, 0x1800b6300\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800b6305\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800b630a\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x1800b630f\npush    r12                                                            ; +0x14, 0x1800b6314\npush    r14                                                            ; +0x16, 0x1800b6316\npush    r15                                                            ; +0x18, 0x1800b6318\nsub     rsp, 40h                                                       ; +0x1a, 0x1800b631a\nmov     rbp, r9                                                        ; +0x1e, 0x1800b631e\nmov     r14d, r8d                                                      ; +0x21, 0x1800b6321\nmov     r15, rdx                                                       ; +0x24, 0x1800b6324\nmov     rsi, rcx                                                       ; +0x27, 0x1800b6327\nmov     ecx, 300h; Size                                                ; +0x2a, 0x1800b632a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2f, 0x1800b632f\nmov     [rsp+58h+var_28], rax                                          ; +0x34, 0x1800b6334\nxor     r12d, r12d                                                     ; +0x39, 0x1800b6339\ntest    rax, rax                                                       ; +0x3c, 0x1800b633c\njz      short loc_1800B634E                                            ; +0x3f, 0x1800b633f\nmov     rcx, rax; this                                                 ; +0x41, 0x1800b6341\ncall    ??0CCTextFieldTTF@cocos2d@@QEAA@XZ; cocos2d::CCTextFieldTTF::CCTextFieldTTF(void) ; +0x44, 0x1800b6344\nmov     rbx, rax                                                       ; +0x49, 0x1800b6349\njmp     short loc_1800B6351                                            ; +0x4c, 0x1800b634c\nmov     rbx, r12                                                       ; +0x4e, 0x1800b634e\ntest    rbx, rbx                                                       ; +0x51, 0x1800b6351\njz      loc_1800B6456                                                  ; +0x54, 0x1800b6354\nmov     rdi, [rbx+2E0h]                                                ; +0x5a, 0x1800b635a\ntest    rdi, rdi                                                       ; +0x61, 0x1800b6361\njz      short loc_1800B63BF                                            ; +0x64, 0x1800b6364\nmov     rdx, [rdi+18h]                                                 ; +0x66, 0x1800b6366\ncmp     rdx, 0Fh                                                       ; +0x6a, 0x1800b636a\njbe     short loc_1800B639C                                            ; +0x6e, 0x1800b636e\nmov     rcx, [rdi]                                                     ; +0x70, 0x1800b6370\ninc     rdx                                                            ; +0x73, 0x1800b6373\ncmp     rdx, 1000h                                                     ; +0x76, 0x1800b6376\njb      short loc_1800B6397                                            ; +0x7d, 0x1800b637d\nadd     rdx, 27h ; '''                                                 ; +0x7f, 0x1800b637f\nmov     r8, [rcx-8]                                                    ; +0x83, 0x1800b6383\nsub     rcx, r8                                                        ; +0x87, 0x1800b6387\nlea     rax, [rcx-8]                                                   ; +0x8a, 0x1800b638a\ncmp     rax, 1Fh                                                       ; +0x8e, 0x1800b638e\nja      short loc_1800B63EA                                            ; +0x92, 0x1800b6392\nmov     rcx, r8; Block                                                 ; +0x94, 0x1800b6394\ncall    j_j_free_0                                                     ; +0x97, 0x1800b6397\nmov     [rdi+10h], r12                                                 ; +0x9c, 0x1800b639c\nmov     qword ptr [rdi+18h], 0Fh                                       ; +0xa0, 0x1800b63a0\nmov     byte ptr [rdi], 0                                              ; +0xa8, 0x1800b63a8\nmov     edx, 20h ; ' '                                                 ; +0xab, 0x1800b63ab\nmov     rcx, rdi; Block                                                ; +0xb0, 0x1800b63b0\ncall    j_j_free_0                                                     ; +0xb3, 0x1800b63b3\nmov     [rbx+2E0h], r12                                                ; +0xb8, 0x1800b63b8\nmov     ecx, 20h ; ' '; Size                                           ; +0xbf, 0x1800b63bf\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xc4, 0x1800b63c4\nmov     [rsp+58h+var_28], rax                                          ; +0xc9, 0x1800b63c9\ntest    rax, rax                                                       ; +0xce, 0x1800b63ce\njz      short loc_1800B63F1                                            ; +0xd1, 0x1800b63d1\nxorps   xmm0, xmm0                                                     ; +0xd3, 0x1800b63d3\nmovups  xmmword ptr [rax], xmm0                                        ; +0xd6, 0x1800b63d6\nmov     [rax+10h], r12                                                 ; +0xd9, 0x1800b63d9\nmov     qword ptr [rax+18h], 0Fh                                       ; +0xdd, 0x1800b63dd\nmov     byte ptr [rax], 0                                              ; +0xe5, 0x1800b63e5\njmp     short loc_1800B63F4                                            ; +0xe8, 0x1800b63e8\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xea, 0x1800b63ea\ndb 90h                                                                 ; +0xf0, 0x1800b63f0\nmov     rax, r12                                                       ; +0xf1, 0x1800b63f1\nmov     [rbx+2E0h], rax                                                ; +0xf4, 0x1800b63f4\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xfb, 0x1800b63fb\njbe     short loc_1800B6405                                            ; +0x100, 0x1800b6400\nmov     rax, [rax]                                                     ; +0x102, 0x1800b6402\nmov     [rsp+58h+var_30], r14d                                         ; +0x105, 0x1800b6405\nmov     [rsp+58h+var_38], r15                                          ; +0x10a, 0x1800b640a\nmovss   xmm3, [rsp+58h+arg_20]                                         ; +0x10f, 0x1800b640f\nmov     r8, rbp                                                        ; +0x118, 0x1800b6418\nmov     rdx, rax                                                       ; +0x11b, 0x1800b641b\nmov     rcx, rbx                                                       ; +0x11e, 0x1800b641e\ncall    ?initWithString@CCLabelTTF@cocos2d@@QEAA_NPEBD0MAEBVCCSize@2@W4CCTextAlignment@2@@Z; cocos2d::CCLabelTTF::initWithString(char const *,char const *,float,cocos2d::CCSize const &,cocos2d::CCTextAlignment) ; +0x121, 0x1800b6421\nmov     rcx, rbx; this                                                 ; +0x126, 0x1800b6426\ntest    al, al                                                         ; +0x129, 0x1800b6429\njz      short loc_1800B644B                                            ; +0x12b, 0x1800b642b\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x12d, 0x1800b642d\ntest    rsi, rsi                                                       ; +0x132, 0x1800b6432\njz      short loc_1800B6446                                            ; +0x135, 0x1800b6435\nmov     rax, [rbx]                                                     ; +0x137, 0x1800b6437\nmov     rdx, rsi                                                       ; +0x13a, 0x1800b643a\nmov     rcx, rbx                                                       ; +0x13d, 0x1800b643d\ncall    qword ptr [rax+440h]                                           ; +0x140, 0x1800b6440\nmov     rax, rbx                                                       ; +0x146, 0x1800b6446\njmp     short loc_1800B6458                                            ; +0x149, 0x1800b6449\nmov     rax, [rbx]                                                     ; +0x14b, 0x1800b644b\nmov     edx, 1                                                         ; +0x14e, 0x1800b644e\ncall    qword ptr [rax+8]                                              ; +0x153, 0x1800b6453\nxor     eax, eax                                                       ; +0x156, 0x1800b6456\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x158, 0x1800b6458\nmov     rbp, [rsp+58h+arg_8]                                           ; +0x15d, 0x1800b645d\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x162, 0x1800b6462\nmov     rdi, [rsp+58h+arg_18]                                          ; +0x167, 0x1800b6467\nadd     rsp, 40h                                                       ; +0x16c, 0x1800b646c\npop     r15                                                            ; +0x170, 0x1800b6470\npop     r14                                                            ; +0x172, 0x1800b6472\npop     r12                                                            ; +0x174, 0x1800b6474\nretn                                                                   ; +0x176, 0x1800b6476", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b8b14"], "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"}