{"type": "func", "start": 6443023600, "end": 6443023991, "name": "cocos2d::CCSprite::initWithTexture", "pseudocode": "// \n// cocos2d::CCSprite::initWithTexture from 0x18008bcf0 to 0x18008be77 (391 bytes)\n// \n// 9 xrefs:\n// > <???> @ 0x1800ebbe8\n// > <???> @ 0x1800ec0c0\n// > <???> @ 0x1800ecc40\n// > <???> @ 0x180103af8\n// > <???> @ 0x180106af0\n// > <???> @ 0x18013d328\n// > <???> @ 0x18013d338\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b5bbc\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\nchar __fastcall cocos2d::CCSprite::initWithTexture(\n        cocos2d::CCSprite *this,\n        struct cocos2d::CCTexture2D *a2,\n        const struct cocos2d::CCRect *a3,\n        unsigned __int8 a4)\n{\n  cocos2d::CCSprite_vtbl *v8; // rax\n  cocos2d::CCSprite_vtbl *v9; // rbx\n  float *v10; // rax\n  cocos2d::CCSprite_vtbl *v11; // rbx\n  cocos2d::CCShaderCache *v12; // rax\n  struct cocos2d::CCGLProgram *v13; // rax\n  float v15[6]; // [rsp+20h] [rbp-18h] BYREF\n\n  if ( !(unsigned __int8)cocos2d::CCNodeRGBA::init(this) )\n    return 0;\n  v8 = this->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  this->m_pobBatchNode = nullptr;\n  this->m_bRecursiveDirty = 0;\n  ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))v8->setDirty)(this, 0);\n  v9 = this->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  *(_WORD *)&this->m_bOpacityModifyRGB = 1;\n  this->m_sBlendFunc.src = 1;\n  this->m_sBlendFunc.dst = 771;\n  this->m_bFlipY = 0;\n  v10 = kmVec2Fill(v15, 0.5, 0.5);\n  ((void (__fastcall *)(cocos2d::CCSprite *, float *))v9->setAnchorPoint)(this, v10);\n  cocos2d::CCSize::operator=(&this->m_obOffsetPosition, dword_1801A87E0);\n  this->m_bHasChildren = 0;\n  *(_OWORD *)&this->m_sQuad.tl.vertices.x = 0;\n  v15[0] = NAN;\n  *(_OWORD *)&this->m_sQuad.tl.texCoords.u = 0;\n  *(_OWORD *)&this->m_sQuad.bl.vertices.z = 0;\n  *(_OWORD *)&this->m_sQuad.tr.vertices.x = 0;\n  *(_OWORD *)&this->m_sQuad.tr.texCoords.u = 0;\n  *(_OWORD *)&this->m_sQuad.br.vertices.z = 0;\n  v11 = this->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  this->m_sQuad.bl.colors = (cocos2d::ccColor4B)-1;\n  this->m_sQuad.br.colors = (cocos2d::ccColor4B)-1;\n  this->m_sQuad.tl.colors = (cocos2d::ccColor4B)-1;\n  this->m_sQuad.tr.colors = (cocos2d::ccColor4B)-1;\n  v12 = cocos2d::CCShaderCache::sharedShaderCache();\n  v13 = cocos2d::CCShaderCache::programForKey(v12, \"ShaderPositionTextureColor\");\n  ((void (__fastcall *)(cocos2d::CCSprite *, struct cocos2d::CCGLProgram *))v11->setShaderProgram)(this, v13);\n  ((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(\n    &this->cocos2d::CCTextureProtocol,\n    a2);\n  ((void (__fastcall *)(cocos2d::CCSprite *, const struct cocos2d::CCRect *, _QWORD, cocos2d::CCSize *))this->setTextureRect)(\n    this,\n    a3,\n    a4,\n    &a3->size);\n  ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))this->setBatchNode)(this, 0);\n  this->m_bDontDraw = 0;\n  return 1;\n}", "assembly": "; \n; cocos2d::CCSprite::initWithTexture from 0x18008bcf0 to 0x18008be77 (391 bytes)\n; \n; 9 xrefs:\n; > <???> @ 0x1800ebbe8\n; > <???> @ 0x1800ec0c0\n; > <???> @ 0x1800ecc40\n; > <???> @ 0x180103af8\n; > <???> @ 0x180106af0\n; > <???> @ 0x18013d328\n; > <???> @ 0x18013d338\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b5bbc\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_8], rbp                                               ; +0x0, 0x18008bcf0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x18008bcf5\nmov     [rsp+arg_18], rdi                                              ; +0xa, 0x18008bcfa\npush    r14                                                            ; +0xf, 0x18008bcff\nsub     rsp, 30h                                                       ; +0x11, 0x18008bd01\nmovzx   ebp, r9b                                                       ; +0x15, 0x18008bd05\nmov     rsi, r8                                                        ; +0x19, 0x18008bd09\nmov     r14, rdx                                                       ; +0x1c, 0x18008bd0c\nmov     rdi, rcx                                                       ; +0x1f, 0x18008bd0f\ncall    ?init@CCNodeRGBA@cocos2d@@UEAA_NXZ; cocos2d::CCNodeRGBA::init(void) ; +0x22, 0x18008bd12\ntest    al, al                                                         ; +0x27, 0x18008bd17\njz      loc_18008BE5F                                                  ; +0x29, 0x18008bd19\nmov     rax, [rdi]                                                     ; +0x2f, 0x18008bd1f\nxor     edx, edx                                                       ; +0x32, 0x18008bd22\nmov     rcx, rdi                                                       ; +0x34, 0x18008bd24\nmov     [rsp+38h+arg_0], rbx                                           ; +0x37, 0x18008bd27\nmov     qword ptr [rdi+170h], 0                                        ; +0x3c, 0x18008bd2c\nmov     byte ptr [rdi+179h], 0                                         ; +0x47, 0x18008bd37\ncall    qword ptr [rax+408h]                                           ; +0x4e, 0x18008bd3e\nmovss   xmm1, cs:dword_1800E6308                                       ; +0x54, 0x18008bd44\nlea     rcx, [rsp+38h+var_18]                                          ; +0x5c, 0x18008bd4c\nmov     rbx, [rdi]                                                     ; +0x61, 0x18008bd51\nmovaps  xmm2, xmm1                                                     ; +0x64, 0x18008bd54\nmov     word ptr [rdi+22Ch], 1                                         ; +0x67, 0x18008bd57\nmov     dword ptr [rdi+194h], 1                                        ; +0x70, 0x18008bd60\nmov     dword ptr [rdi+198h], 303h                                     ; +0x7a, 0x18008bd6a\nmov     byte ptr [rdi+22Eh], 0                                         ; +0x84, 0x18008bd74\ncall    kmVec2Fill                                                     ; +0x8b, 0x18008bd7b\nmov     rdx, rax                                                       ; +0x90, 0x18008bd80\nmov     rcx, rdi                                                       ; +0x93, 0x18008bd83\ncall    qword ptr [rbx+110h]                                           ; +0x96, 0x18008bd86\nlea     rcx, [rdi+1BCh]                                                ; +0x9c, 0x18008bd8c\nlea     rdx, dword_1801A87E0                                           ; +0xa3, 0x18008bd93\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xaa, 0x18008bd9a\nxorps   xmm0, xmm0                                                     ; +0xaf, 0x18008bd9f\nmov     byte ptr [rdi+17Ah], 0                                         ; +0xb2, 0x18008bda2\nmovups  xmmword ptr [rdi+1CCh], xmm0                                   ; +0xb9, 0x18008bda9\nmov     [rsp+38h+var_18], 0FFFFFFFFh                                   ; +0xc0, 0x18008bdb0\nmov     eax, [rsp+38h+var_18]                                          ; +0xc8, 0x18008bdb8\nmovups  xmmword ptr [rdi+1DCh], xmm0                                   ; +0xcc, 0x18008bdbc\nmovups  xmmword ptr [rdi+1ECh], xmm0                                   ; +0xd3, 0x18008bdc3\nmovups  xmmword ptr [rdi+1FCh], xmm0                                   ; +0xda, 0x18008bdca\nmovups  xmmword ptr [rdi+20Ch], xmm0                                   ; +0xe1, 0x18008bdd1\nmovups  xmmword ptr [rdi+21Ch], xmm0                                   ; +0xe8, 0x18008bdd8\nmov     rbx, [rdi]                                                     ; +0xef, 0x18008bddf\nmov     [rdi+1F0h], eax                                                ; +0xf2, 0x18008bde2\nmov     [rdi+220h], eax                                                ; +0xf8, 0x18008bde8\nmov     [rdi+1D8h], eax                                                ; +0xfe, 0x18008bdee\nmov     [rdi+208h], eax                                                ; +0x104, 0x18008bdf4\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0x10a, 0x18008bdfa\nmov     rcx, rax; this                                                 ; +0x10f, 0x18008bdff\nlea     rdx, aShaderposition_3; \"ShaderPositionTextureColor\"           ; +0x112, 0x18008be02\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x119, 0x18008be09\nmov     rdx, rax                                                       ; +0x11e, 0x18008be0e\nmov     rcx, rdi                                                       ; +0x121, 0x18008be11\ncall    qword ptr [rbx+280h]                                           ; +0x124, 0x18008be14\nlea     rcx, [rdi+158h]                                                ; +0x12a, 0x18008be1a\nmov     rdx, r14                                                       ; +0x131, 0x18008be21\nmov     rax, [rcx]                                                     ; +0x134, 0x18008be24\ncall    qword ptr [rax+18h]                                            ; +0x137, 0x18008be27\nmov     rax, [rdi]                                                     ; +0x13a, 0x18008be2a\nlea     r9, [rsi+8]                                                    ; +0x13d, 0x18008be2d\nmovzx   r8d, bpl                                                       ; +0x141, 0x18008be31\nmov     rdx, rsi                                                       ; +0x145, 0x18008be35\nmov     rcx, rdi                                                       ; +0x148, 0x18008be38\ncall    qword ptr [rax+3C8h]                                           ; +0x14b, 0x18008be3b\nmov     rax, [rdi]                                                     ; +0x151, 0x18008be41\nxor     edx, edx                                                       ; +0x154, 0x18008be44\nmov     rcx, rdi                                                       ; +0x156, 0x18008be46\ncall    qword ptr [rax+3B8h]                                           ; +0x159, 0x18008be49\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x15f, 0x18008be4f\nmov     al, 1                                                          ; +0x164, 0x18008be54\nmov     byte ptr [rdi+22Fh], 0                                         ; +0x166, 0x18008be56\njmp     short loc_18008BE61                                            ; +0x16d, 0x18008be5d\nxor     al, al                                                         ; +0x16f, 0x18008be5f\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x171, 0x18008be61\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x176, 0x18008be66\nmov     rdi, [rsp+38h+arg_18]                                          ; +0x17b, 0x18008be6b\nadd     rsp, 30h                                                       ; +0x180, 0x18008be70\npop     r14                                                            ; +0x184, 0x18008be74\nretn                                                                   ; +0x186, 0x18008be76", "xrefs": ["<???> @ 0x1800ebbe8", "<???> @ 0x1800ec0c0", "<???> @ 0x1800ecc40", "<???> @ 0x180103af8", "<???> @ 0x180106af0", "<???> @ 0x18013d328", "<???> @ 0x18013d338", "<???> @ 0x1801438a8", "<???> @ 0x1801b5bbc"], "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"}