{"type": "func", "start": 6443048064, "end": 6443048403, "name": "cocos2d::CCSpriteBatchNode::insertQuadFromSprite", "pseudocode": "// \n// cocos2d::CCSpriteBatchNode::insertQuadFromSprite from 0x180091c80 to 0x180091dd3 (339 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800af6fa\n// > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800afd64\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c02f4\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 11:22:08 +0000\n// \n\nvoid __fastcall cocos2d::CCSpriteBatchNode::insertQuadFromSprite(\n        cocos2d::CCSpriteBatchNode *this,\n        struct cocos2d::CCSprite *a2,\n        unsigned int a3)\n{\n  __int64 v6; // rsi\n  int v7; // edi\n  unsigned int v8; // edi\n  __int128 v9; // xmm0\n  __int128 v10; // xmm1\n  cocos2d::CCTextureAtlas *v11; // rcx\n  __int128 v12; // xmm0\n  __int128 v13; // xmm1\n  __int128 v14; // xmm0\n  __int128 v15; // xmm1\n  __int64 v16; // rdx\n  _OWORD v17[6]; // [rsp+20h] [rbp-98h] BYREF\n\n  while ( 1 )\n  {\n    if ( a3 < (*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 80LL))(*((_QWORD *)this + 41)) )\n    {\n      v6 = *((_QWORD *)this + 41);\n      v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 80LL))(v6);\n      if ( v7 != (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v6 + 72LL))(v6) )\n        break;\n    }\n    v8 = (4 * (*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 80LL))(*((_QWORD *)this + 41)) + 4)\n       / 3;\n    if ( (*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 80LL))(*((_QWORD *)this + 41)) < v8 )\n      cocos2d::CCTextureAtlas::resizeCapacity(*((cocos2d::CCTextureAtlas **)this + 41), v8);\n  }\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *, cocos2d::CCSpriteBatchNode *))(*(_QWORD *)a2 + 968LL))(a2, this);\n  v9 = *(_OWORD *)((char *)a2 + 460);\n  *((_DWORD *)a2 + 90) = a3;\n  v10 = *(_OWORD *)((char *)a2 + 476);\n  v11 = *((cocos2d::CCTextureAtlas **)this + 41);\n  v17[0] = v9;\n  v12 = *(_OWORD *)((char *)a2 + 492);\n  v17[1] = v10;\n  v13 = *(_OWORD *)((char *)a2 + 508);\n  v17[2] = v12;\n  v14 = *(_OWORD *)((char *)a2 + 524);\n  v17[3] = v13;\n  v15 = *(_OWORD *)((char *)a2 + 540);\n  v17[4] = v14;\n  v17[5] = v15;\n  cocos2d::CCTextureAtlas::insertQuad(v11, (struct cocos2d::_ccV3F_C4B_T2F_Quad *)v17, a3);\n  LOBYTE(v16) = 1;\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a2 + 1048LL))(a2, v16);\n  (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 784LL))(a2);\n}", "assembly": "; \n; cocos2d::CCSpriteBatchNode::insertQuadFromSprite from 0x180091c80 to 0x180091dd3 (339 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800af6fa\n; > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800afd64\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c02f4\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 11:22:08 +0000\n; \npush    rbx                                                            ; +0x0, 0x180091c80\npush    rbp                                                            ; +0x2, 0x180091c82\npush    rsi                                                            ; +0x3, 0x180091c83\npush    rdi                                                            ; +0x4, 0x180091c84\npush    r14                                                            ; +0x5, 0x180091c85\nsub     rsp, 90h                                                       ; +0x7, 0x180091c87\nmov     rax, cs:__security_cookie                                      ; +0xe, 0x180091c8e\nxor     rax, rsp                                                       ; +0x15, 0x180091c95\nmov     [rsp+0B8h+var_38], rax                                         ; +0x18, 0x180091c98\nmov     ebp, r8d                                                       ; +0x20, 0x180091ca0\nmov     r14, rdx                                                       ; +0x23, 0x180091ca3\nmov     rbx, rcx                                                       ; +0x26, 0x180091ca6\nnop     dword ptr [rax+00000000h]                                      ; +0x29, 0x180091ca9\nmov     rcx, [rbx+148h]                                                ; +0x30, 0x180091cb0\nmov     rax, [rcx]                                                     ; +0x37, 0x180091cb7\ncall    qword ptr [rax+50h]                                            ; +0x3a, 0x180091cba\ncmp     ebp, eax                                                       ; +0x3d, 0x180091cbd\njnb     short loc_180091CE3                                            ; +0x3f, 0x180091cbf\nmov     rsi, [rbx+148h]                                                ; +0x41, 0x180091cc1\nmov     rcx, rsi                                                       ; +0x48, 0x180091cc8\nmov     rax, [rsi]                                                     ; +0x4b, 0x180091ccb\ncall    qword ptr [rax+50h]                                            ; +0x4e, 0x180091cce\nmov     rcx, [rsi]                                                     ; +0x51, 0x180091cd1\nmov     edi, eax                                                       ; +0x54, 0x180091cd4\nmov     rdx, [rcx+48h]                                                 ; +0x56, 0x180091cd6\nmov     rcx, rsi                                                       ; +0x5a, 0x180091cda\ncall    rdx                                                            ; +0x5d, 0x180091cdd\ncmp     edi, eax                                                       ; +0x5f, 0x180091cdf\njnz     short loc_180091D23                                            ; +0x61, 0x180091ce1\nmov     rcx, [rbx+148h]                                                ; +0x63, 0x180091ce3\nmov     rax, [rcx]                                                     ; +0x6a, 0x180091cea\ncall    qword ptr [rax+50h]                                            ; +0x6d, 0x180091ced\nlea     ecx, ds:4[rax*4]                                               ; +0x70, 0x180091cf0\nmov     eax, 0AAAAAAABh                                                ; +0x77, 0x180091cf7\nmul     ecx                                                            ; +0x7c, 0x180091cfc\nmov     rcx, [rbx+148h]                                                ; +0x7e, 0x180091cfe\nmov     edi, edx                                                       ; +0x85, 0x180091d05\nshr     edi, 1                                                         ; +0x87, 0x180091d07\nmov     rax, [rcx]                                                     ; +0x89, 0x180091d09\ncall    qword ptr [rax+50h]                                            ; +0x8c, 0x180091d0c\ncmp     eax, edi                                                       ; +0x8f, 0x180091d0f\njnb     short loc_180091CB0                                            ; +0x91, 0x180091d11\nmov     rcx, [rbx+148h]; this                                          ; +0x93, 0x180091d13\nmov     edx, edi; unsigned int                                         ; +0x9a, 0x180091d1a\ncall    ?resizeCapacity@CCTextureAtlas@cocos2d@@QEAA_NI@Z; cocos2d::CCTextureAtlas::resizeCapacity(uint) ; +0x9c, 0x180091d1c\njmp     short loc_180091CB0                                            ; +0xa1, 0x180091d21\nmov     rax, [r14]                                                     ; +0xa3, 0x180091d23\nmov     rdx, rbx                                                       ; +0xa6, 0x180091d26\nmov     rcx, r14                                                       ; +0xa9, 0x180091d29\ncall    qword ptr [rax+3C8h]                                           ; +0xac, 0x180091d2c\nmovups  xmm0, xmmword ptr [r14+1CCh]                                   ; +0xb2, 0x180091d32\nmov     [r14+168h], ebp                                                ; +0xba, 0x180091d3a\nmov     r8d, ebp; unsigned int                                         ; +0xc1, 0x180091d41\nmovups  xmm1, xmmword ptr [r14+1DCh]                                   ; +0xc4, 0x180091d44\nmov     rcx, [rbx+148h]; this                                          ; +0xcc, 0x180091d4c\nlea     rdx, [rsp+0B8h+var_98]; struct cocos2d::_ccV3F_C4B_T2F_Quad *  ; +0xd3, 0x180091d53\nmovaps  [rsp+0B8h+var_98], xmm0                                        ; +0xd8, 0x180091d58\nmovups  xmm0, xmmword ptr [r14+1ECh]                                   ; +0xdd, 0x180091d5d\nmovaps  [rsp+0B8h+var_88], xmm1                                        ; +0xe5, 0x180091d65\nmovups  xmm1, xmmword ptr [r14+1FCh]                                   ; +0xea, 0x180091d6a\nmovaps  [rsp+0B8h+var_78], xmm0                                        ; +0xf2, 0x180091d72\nmovups  xmm0, xmmword ptr [r14+20Ch]                                   ; +0xf7, 0x180091d77\nmovaps  [rsp+0B8h+var_68], xmm1                                        ; +0xff, 0x180091d7f\nmovups  xmm1, xmmword ptr [r14+21Ch]                                   ; +0x104, 0x180091d84\nmovaps  [rsp+0B8h+var_58], xmm0                                        ; +0x10c, 0x180091d8c\nmovaps  [rsp+0B8h+var_48], xmm1                                        ; +0x111, 0x180091d91\ncall    ?insertQuad@CCTextureAtlas@cocos2d@@QEAAXPEAU_ccV3F_C4B_T2F_Quad@2@I@Z; cocos2d::CCTextureAtlas::insertQuad(cocos2d::_ccV3F_C4B_T2F_Quad *,uint) ; +0x116, 0x180091d96\nmov     rax, [r14]                                                     ; +0x11b, 0x180091d9b\nmov     dl, 1                                                          ; +0x11e, 0x180091d9e\nmov     rcx, r14                                                       ; +0x120, 0x180091da0\ncall    qword ptr [rax+418h]                                           ; +0x123, 0x180091da3\nmov     rax, [r14]                                                     ; +0x129, 0x180091da9\nmov     rcx, r14                                                       ; +0x12c, 0x180091dac\ncall    qword ptr [rax+310h]                                           ; +0x12f, 0x180091daf\nmov     rcx, [rsp+0B8h+var_38]                                         ; +0x135, 0x180091db5\nxor     rcx, rsp; StackCookie                                          ; +0x13d, 0x180091dbd\ncall    __security_check_cookie                                        ; +0x140, 0x180091dc0\nadd     rsp, 90h                                                       ; +0x145, 0x180091dc5\npop     r14                                                            ; +0x14c, 0x180091dcc\npop     rdi                                                            ; +0x14e, 0x180091dce\npop     rsi                                                            ; +0x14f, 0x180091dcf\npop     rbp                                                            ; +0x150, 0x180091dd0\npop     rbx                                                            ; +0x151, 0x180091dd1\nretn                                                                   ; +0x152, 0x180091dd2", "xrefs": ["cocos2d::CCTMXLayer::appendTileForGID @ 0x1800af6fa", "cocos2d::CCTMXLayer::insertTileForGID @ 0x1800afd64", "<???> @ 0x18014cf68", "<???> @ 0x1801c02f4"], "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"}