{"type": "func", "start": 6442517984, "end": 6442518137, "name": "cocos2d::CCString::initWithFormatAndValist", "pseudocode": "// \n// cocos2d::CCString::initWithFormatAndValist from 0x1800105e0 to 0x180010679 (153 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCString::createWithFormat @ 0x18001051f\n// > cocos2d::CCString::initWithFormat @ 0x1800105d6\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ae134\n// > <???> @ 0x1801ae140\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\nbool __fastcall cocos2d::CCString::initWithFormatAndValist(cocos2d::CCString *this, const char *a2, va_list a3)\n{\n  char *v6; // rax\n  char *v7; // rbx\n  _QWORD *v8; // rax\n  size_t v9; // r8\n\n  v6 = (char *)malloc(0x19000u);\n  v7 = v6;\n  if ( v6 )\n  {\n    v8 = sub_180009520();\n    _stdio_common_vsprintf(*v8 | 2LL, v7, 0x19000u, a2, nullptr, a3);\n    v9 = -1;\n    do\n      ++v9;\n    while ( v7[v9] );\n    sub_180010050((void **)&this->m_sString, v7, v9);\n    free(v7);\n    LOBYTE(v6) = 1;\n  }\n  return (char)v6;\n}", "assembly": "; \n; cocos2d::CCString::initWithFormatAndValist from 0x1800105e0 to 0x180010679 (153 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCString::createWithFormat @ 0x18001051f\n; > cocos2d::CCString::initWithFormat @ 0x1800105d6\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ae134\n; > <???> @ 0x1801ae140\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, 0x1800105e0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800105e5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800105ea\npush    rdi                                                            ; +0xf, 0x1800105ef\nsub     rsp, 30h                                                       ; +0x10, 0x1800105f0\nmov     rdi, rcx                                                       ; +0x14, 0x1800105f4\nmov     rsi, r8                                                        ; +0x17, 0x1800105f7\nmov     ecx, 19000h; Size                                              ; +0x1a, 0x1800105fa\nmov     rbp, rdx                                                       ; +0x1f, 0x1800105ff\ncall    cs:__imp_malloc                                                ; +0x22, 0x180010602\nmov     rbx, rax                                                       ; +0x28, 0x180010608\ntest    rax, rax                                                       ; +0x2b, 0x18001060b\njz      short loc_180010664                                            ; +0x2e, 0x18001060e\ncall    sub_180009520                                                  ; +0x30, 0x180010610\nmov     [rsp+38h+ArgList], rsi; ArgList                                ; +0x35, 0x180010615\nmov     r9, rbp; Format                                                ; +0x3a, 0x18001061a\nmov     r8d, 19000h; BufferCount                                       ; +0x3d, 0x18001061d\nmov     [rsp+38h+Locale], 0; Locale                                    ; +0x43, 0x180010623\nmov     rdx, rbx; Buffer                                               ; +0x4c, 0x18001062c\nmov     rcx, [rax]                                                     ; +0x4f, 0x18001062f\nor      rcx, 2; Options                                                ; +0x52, 0x180010632\ncall    cs:__stdio_common_vsprintf                                     ; +0x56, 0x180010636\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x5c, 0x18001063c\ninc     r8; Size                                                       ; +0x63, 0x180010643\ncmp     byte ptr [rbx+r8], 0                                           ; +0x66, 0x180010646\njnz     short loc_180010643                                            ; +0x6b, 0x18001064b\nlea     rcx, [rdi+38h]; void *                                         ; +0x6d, 0x18001064d\nmov     rdx, rbx; Src                                                  ; +0x71, 0x180010651\ncall    sub_180010050                                                  ; +0x74, 0x180010654\nmov     rcx, rbx; Block                                                ; +0x79, 0x180010659\ncall    cs:__imp_free                                                  ; +0x7c, 0x18001065c\nmov     al, 1                                                          ; +0x82, 0x180010662\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x84, 0x180010664\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x89, 0x180010669\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x8e, 0x18001066e\nadd     rsp, 30h                                                       ; +0x93, 0x180010673\npop     rdi                                                            ; +0x97, 0x180010677\nretn                                                                   ; +0x98, 0x180010678", "xrefs": ["cocos2d::CCString::createWithFormat @ 0x18001051f", "cocos2d::CCString::initWithFormat @ 0x1800105d6", "<???> @ 0x1801438a8", "<???> @ 0x1801ae134", "<???> @ 0x1801ae140"], "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"}