{"type": "func", "start": 4298496272, "end": 4298496612, "name": "CCSpritePart::createWithSpriteFrameName", "pseudocode": "// \n// CCSpritePart::createWithSpriteFrameName from 0x10035d910 to 0x10035da64 (340 bytes)\n// \n// 1 xrefs:\n// > CCPartAnimSprite::initWithAnimDesc @ 0x10035d492\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 12:28:55 +0000\n// \n\nchar *__fastcall CCSpritePart::createWithSpriteFrameName(char *__s)\n{\n  char *v1; // r15\n  char *v2; // r14\n  char *v3; // rbx\n  size_t v4; // rax\n  std::string::size_type v5; // r12\n  std::string *v6; // r14\n  char *data; // r13\n  size_t v8; // r15\n  std::string __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n\n  v1 = __s;\n  v2 = (char *)operator new(0x290u);\n  v3 = v2;\n  cocos2d::CCSprite::CCSprite((__int64)v2);\n  *(_OWORD *)(v2 + 600) = 0;\n  *(_DWORD *)(v2 + 615) = 0;\n  *(_QWORD *)v2 = off_100B25F48;\n  *((_QWORD *)v2 + 40) = off_100B26440;\n  *((_QWORD *)v2 + 43) = off_100B264C0;\n  v2[619] = 0;\n  *((_OWORD *)v2 + 39) = 0;\n  *((_OWORD *)v2 + 40) = 0;\n  if ( !(unsigned __int8)CCSpritePlus::initWithSpriteFrameName(v2, __s) )\n  {\n    (*(void (__fastcall **)(char *))(*(_QWORD *)v2 + 16LL))(v2);\n    return nullptr;\n  }\n  v4 = strlen(__s);\n  if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v5 = v4;\n  v6 = (std::string *)(v2 + 624);\n  if ( v4 >= 0x17 )\n  {\n    v8 = 26;\n    if ( (v4 | 7) != 0x17 )\n      v8 = (v4 | 7) + 1;\n    data = (char *)operator new(v8);\n    __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;\n    __dst[0].__r_.__value_.__r.__words[0] = v8 + 1;\n    v1 = __s;\n    __dst[0].__r_.__value_.__l.__size_ = v5;\n  }\n  else\n  {\n    __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v4);\n    data = __dst[0].__r_.__value_.__s.__data_;\n    if ( !v4 )\n      goto LABEL_11;\n  }\n  memcpy(data, v1, v5);\nLABEL_11:\n  data[v5] = 0;\n  std::string::operator=(v6, __dst);\n  if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )\n    operator delete(__dst[0].__r_.__value_.__l.__data_);\n  cocos2d::CCObject::autorelease(v3);\n  return v3;\n}", "assembly": "; \n; CCSpritePart::createWithSpriteFrameName from 0x10035d910 to 0x10035da64 (340 bytes)\n; \n; 1 xrefs:\n; > CCPartAnimSprite::initWithAnimDesc @ 0x10035d492\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 12:28:55 +0000\n; \npush    rbp                                                            ; +0x0, 0x10035d910\nmov     rbp, rsp                                                       ; +0x1, 0x10035d911\npush    r15                                                            ; +0x4, 0x10035d914\npush    r14                                                            ; +0x6, 0x10035d916\npush    r13                                                            ; +0x8, 0x10035d918\npush    r12                                                            ; +0xa, 0x10035d91a\npush    rbx                                                            ; +0xc, 0x10035d91c\nsub     rsp, 28h                                                       ; +0xd, 0x10035d91d\nmov     r15, rdi                                                       ; +0x11, 0x10035d921\nmov     edi, 290h; __sz                                                ; +0x14, 0x10035d924\ncall    __Znwm; operator new(ulong)                                    ; +0x19, 0x10035d929\nmov     r14, rax                                                       ; +0x1e, 0x10035d92e\nmov     rbx, rax                                                       ; +0x21, 0x10035d931\nmov     rdi, rax                                                       ; +0x24, 0x10035d934\ncall    cocos2d__CCSprite__CCSprite                                    ; +0x27, 0x10035d937\nxorps   xmm0, xmm0                                                     ; +0x2c, 0x10035d93c\nmovups  xmmword ptr [rbx+258h], xmm0                                   ; +0x2f, 0x10035d93f\nmov     dword ptr [rbx+267h], 0                                        ; +0x36, 0x10035d946\nlea     rax, off_100B25F48                                             ; +0x40, 0x10035d950\nmov     [rbx], rax                                                     ; +0x47, 0x10035d957\nlea     rax, off_100B26440                                             ; +0x4a, 0x10035d95a\nmov     [rbx+140h], rax                                                ; +0x51, 0x10035d961\nlea     rax, off_100B264C0                                             ; +0x58, 0x10035d968\nmov     [rbx+158h], rax                                                ; +0x5f, 0x10035d96f\nmov     byte ptr [rbx+26Bh], 0                                         ; +0x66, 0x10035d976\nmovups  xmmword ptr [rbx+270h], xmm0                                   ; +0x6d, 0x10035d97d\nmovups  xmmword ptr [rbx+280h], xmm0                                   ; +0x74, 0x10035d984\nmov     rdi, rbx                                                       ; +0x7b, 0x10035d98b\nmov     rsi, r15                                                       ; +0x7e, 0x10035d98e\ncall    CCSpritePlus__initWithSpriteFrameName                          ; +0x81, 0x10035d991\ntest    al, al                                                         ; +0x86, 0x10035d996\njz      short loc_10035D9CE                                            ; +0x88, 0x10035d998\nmov     rdi, r15; __s                                                  ; +0x8a, 0x10035d99a\ncall    _strlen                                                        ; +0x8d, 0x10035d99d\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x92, 0x10035d9a2\njnb     loc_10035DA5F                                                  ; +0x96, 0x10035d9a6\nmov     r12, rax                                                       ; +0x9c, 0x10035d9ac\nadd     r14, 270h                                                      ; +0x9f, 0x10035d9af\ncmp     rax, 17h                                                       ; +0xa6, 0x10035d9b6\njnb     short loc_10035D9DB                                            ; +0xaa, 0x10035d9ba\nlea     eax, [r12+r12]                                                 ; +0xac, 0x10035d9bc\nmov     byte ptr [rbp+__dst], al                                       ; +0xb0, 0x10035d9c0\nlea     r13, [rbp+__dst+1]                                             ; +0xb3, 0x10035d9c3\ntest    r12, r12                                                       ; +0xb7, 0x10035d9c7\njnz     short loc_10035DA16                                            ; +0xba, 0x10035d9ca\njmp     short loc_10035DA24                                            ; +0xbc, 0x10035d9cc\nmov     rax, [rbx]                                                     ; +0xbe, 0x10035d9ce\nmov     rdi, rbx                                                       ; +0xc1, 0x10035d9d1\ncall    qword ptr [rax+10h]                                            ; +0xc4, 0x10035d9d4\nxor     ebx, ebx                                                       ; +0xc7, 0x10035d9d7\njmp     short loc_10035DA4D                                            ; +0xc9, 0x10035d9d9\nmov     rax, r12                                                       ; +0xcb, 0x10035d9db\nor      rax, 7                                                         ; +0xce, 0x10035d9de\nlea     rcx, [rax+1]                                                   ; +0xd2, 0x10035d9e2\ncmp     rax, 17h                                                       ; +0xd6, 0x10035d9e6\nmov     [rbp+var_48], r15                                              ; +0xda, 0x10035d9ea\nmov     r15d, 1Ah                                                      ; +0xde, 0x10035d9ee\ncmovnz  r15, rcx                                                       ; +0xe4, 0x10035d9f4\nmov     rdi, r15; __sz                                                 ; +0xe8, 0x10035d9f8\ncall    __Znwm; operator new(ulong)                                    ; +0xeb, 0x10035d9fb\nmov     r13, rax                                                       ; +0xf0, 0x10035da00\nmov     [rbp+__p], rax                                                 ; +0xf3, 0x10035da03\ninc     r15                                                            ; +0xf7, 0x10035da07\nmov     [rbp+__dst], r15                                               ; +0xfa, 0x10035da0a\nmov     r15, [rbp+var_48]                                              ; +0xfe, 0x10035da0e\nmov     [rbp+var_38], r12                                              ; +0x102, 0x10035da12\nmov     rdi, r13; __dst                                                ; +0x106, 0x10035da16\nmov     rsi, r15; __src                                                ; +0x109, 0x10035da19\nmov     rdx, r12; __n                                                  ; +0x10c, 0x10035da1c\ncall    _memcpy                                                        ; +0x10f, 0x10035da1f\nmov     byte ptr [r13+r12+0], 0                                        ; +0x114, 0x10035da24\nlea     rsi, [rbp+__dst]; __str                                        ; +0x11a, 0x10035da2a\nmov     rdi, r14; this                                                 ; +0x11e, 0x10035da2e\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x121, 0x10035da31\ntest    byte ptr [rbp+__dst], 1                                        ; +0x126, 0x10035da36\njz      short loc_10035DA45                                            ; +0x12a, 0x10035da3a\nmov     rdi, [rbp+__p]; __p                                            ; +0x12c, 0x10035da3c\ncall    __ZdlPv; operator delete(void *)                               ; +0x130, 0x10035da40\nmov     rdi, rbx                                                       ; +0x135, 0x10035da45\ncall    cocos2d__CCObject__autorelease                                 ; +0x138, 0x10035da48\nmov     rax, rbx                                                       ; +0x13d, 0x10035da4d\nadd     rsp, 28h                                                       ; +0x140, 0x10035da50\npop     rbx                                                            ; +0x144, 0x10035da54\npop     r12                                                            ; +0x145, 0x10035da55\npop     r13                                                            ; +0x147, 0x10035da57\npop     r14                                                            ; +0x149, 0x10035da59\npop     r15                                                            ; +0x14b, 0x10035da5b\npop     rbp                                                            ; +0x14d, 0x10035da5d\nretn                                                                   ; +0x14e, 0x10035da5e\ncall    sub_100003630                                                  ; +0x14f, 0x10035da5f", "xrefs": ["CCPartAnimSprite::initWithAnimDesc @ 0x10035d492"], "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"}