{"type": "func", "start": 4302061952, "end": 4302062143, "name": "CCSpriteGrayscale::createWithSpriteFrame", "pseudocode": "// \n// CCSpriteGrayscale::createWithSpriteFrame from 0x1006c4180 to 0x1006c423f (191 bytes)\n// \n// 1 xrefs:\n// > CCSpriteGrayscale::createWithSpriteFrameName @ 0x1006c4290\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:35:33 +0000\n// \n\n__int64 (__fastcall ***__fastcall CCSpriteGrayscale::createWithSpriteFrame(__int64 a1))()\n{\n  __int64 (__fastcall ***v1)(); // rax\n  __int64 (__fastcall ***v2)(); // rbx\n  __int64 (__fastcall **v3)(); // rax\n  __int64 Texture; // rax\n  char v5; // r15\n\n  v1 = (__int64 (__fastcall ***)())operator new(0x298u, &std::nothrow);\n  if ( !v1 )\n    return nullptr;\n  v2 = v1;\n  __bzero(v1, 664);\n  cocos2d::CCSprite::CCSprite((__int64)v2);\n  v3 = off_100B8DBB8;\n  *v2 = off_100B8DBB8;\n  v2[40] = off_100B8E0B8;\n  v2[43] = off_100B8E138;\n  if ( !a1 )\n  {\nLABEL_6:\n    ((void (__fastcall *)(__int64 (__fastcall ***)()))v3[2])(v2);\n    return nullptr;\n  }\n  Texture = cocos2d::CCSpriteFrame::getTexture(a1);\n  v5 = ((__int64 (__fastcall *)(__int64 (__fastcall ***)(), __int64, __int64))(*v2)[127])(v2, Texture, a1 + 92);\n  ((void (__fastcall *)(__int64 (__fastcall ***)(), __int64))(*v2)[145])(v2, a1);\n  if ( !v5 )\n  {\n    v3 = *v2;\n    goto LABEL_6;\n  }\n  cocos2d::CCObject::autorelease((__int64)v2);\n  return v2;\n}", "assembly": "; \n; CCSpriteGrayscale::createWithSpriteFrame from 0x1006c4180 to 0x1006c423f (191 bytes)\n; \n; 1 xrefs:\n; > CCSpriteGrayscale::createWithSpriteFrameName @ 0x1006c4290\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:35:33 +0000\n; \npush    rbp                                                            ; +0x0, 0x1006c4180\nmov     rbp, rsp                                                       ; +0x1, 0x1006c4181\npush    r15                                                            ; +0x4, 0x1006c4184\npush    r14                                                            ; +0x6, 0x1006c4186\npush    rbx                                                            ; +0x8, 0x1006c4188\npush    rax                                                            ; +0x9, 0x1006c4189\nmov     r14, rdi                                                       ; +0xa, 0x1006c418a\nmov     rsi, cs:__ZSt7nothrow_ptr; std::nothrow_t *                    ; +0xd, 0x1006c418d\nmov     edi, 298h; __sz                                                ; +0x14, 0x1006c4194\ncall    __ZnwmRKSt9nothrow_t; operator new(ulong,std::nothrow_t const&) ; +0x19, 0x1006c4199\ntest    rax, rax                                                       ; +0x1e, 0x1006c419e\njz      loc_1006C422F                                                  ; +0x21, 0x1006c41a1\nmov     rbx, rax                                                       ; +0x27, 0x1006c41a7\nmov     esi, 298h                                                      ; +0x2a, 0x1006c41aa\nmov     rdi, rax                                                       ; +0x2f, 0x1006c41af\ncall    ___bzero                                                       ; +0x32, 0x1006c41b2\nmov     rdi, rbx                                                       ; +0x37, 0x1006c41b7\ncall    cocos2d__CCSprite__CCSprite                                    ; +0x3a, 0x1006c41ba\nlea     rax, off_100B8DBB8                                             ; +0x3f, 0x1006c41bf\nmov     [rbx], rax                                                     ; +0x46, 0x1006c41c6\nlea     rcx, off_100B8E0B8                                             ; +0x49, 0x1006c41c9\nmov     [rbx+140h], rcx                                                ; +0x50, 0x1006c41d0\nlea     rcx, off_100B8E138                                             ; +0x57, 0x1006c41d7\nmov     [rbx+158h], rcx                                                ; +0x5e, 0x1006c41de\ntest    r14, r14                                                       ; +0x65, 0x1006c41e5\njz      short loc_1006C4229                                            ; +0x68, 0x1006c41e8\nmov     rdi, r14                                                       ; +0x6a, 0x1006c41ea\ncall    cocos2d__CCSpriteFrame__getTexture                             ; +0x6d, 0x1006c41ed\nlea     rdx, [r14+5Ch]                                                 ; +0x72, 0x1006c41f2\nmov     rcx, [rbx]                                                     ; +0x76, 0x1006c41f6\nmov     rdi, rbx                                                       ; +0x79, 0x1006c41f9\nmov     rsi, rax                                                       ; +0x7c, 0x1006c41fc\ncall    qword ptr [rcx+3F8h]                                           ; +0x7f, 0x1006c41ff\nmov     r15d, eax                                                      ; +0x85, 0x1006c4205\nmov     rax, [rbx]                                                     ; +0x88, 0x1006c4208\nmov     rdi, rbx                                                       ; +0x8b, 0x1006c420b\nmov     rsi, r14                                                       ; +0x8e, 0x1006c420e\ncall    qword ptr [rax+488h]                                           ; +0x91, 0x1006c4211\ntest    r15b, r15b                                                     ; +0x97, 0x1006c4217\njz      short loc_1006C4226                                            ; +0x9a, 0x1006c421a\nmov     rdi, rbx                                                       ; +0x9c, 0x1006c421c\ncall    cocos2d__CCObject__autorelease                                 ; +0x9f, 0x1006c421f\njmp     short loc_1006C4231                                            ; +0xa4, 0x1006c4224\nmov     rax, [rbx]                                                     ; +0xa6, 0x1006c4226\nmov     rdi, rbx                                                       ; +0xa9, 0x1006c4229\ncall    qword ptr [rax+10h]                                            ; +0xac, 0x1006c422c\nxor     ebx, ebx                                                       ; +0xaf, 0x1006c422f\nmov     rax, rbx                                                       ; +0xb1, 0x1006c4231\nadd     rsp, 8                                                         ; +0xb4, 0x1006c4234\npop     rbx                                                            ; +0xb8, 0x1006c4238\npop     r14                                                            ; +0xb9, 0x1006c4239\npop     r15                                                            ; +0xbb, 0x1006c423b\npop     rbp                                                            ; +0xbd, 0x1006c423d\nretn                                                                   ; +0xbe, 0x1006c423e", "xrefs": ["CCSpriteGrayscale::createWithSpriteFrameName @ 0x1006c4290"], "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"}