{"type": "func", "start": 6443146864, "end": 6443147250, "name": "cocos2d::CCTextureAtlas::drawNumberOfQuads", "pseudocode": "// \n// cocos2d::CCTextureAtlas::drawNumberOfQuads from 0x1800a9e70 to 0x1800a9ff2 (386 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCAtlasNode::draw @ 0x180001b3b\n// > cocos2d::CCTextureAtlas::drawNumberOfQuads @ 0x1800a9e63\n// > cocos2d::CCTextureAtlas::drawQuads @ 0x1800aa006\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c1fbc\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:17 +0000\n// \n\nvoid __fastcall cocos2d::CCTextureAtlas::drawNumberOfQuads(\n        cocos2d::CCTextureAtlas *this,\n        unsigned int a2,\n        unsigned int a3)\n{\n  __int64 v4; // rsi\n  __int64 v5; // rdi\n  unsigned int v6; // eax\n  __int64 v7; // r9\n\n  if ( a2 )\n  {\n    v4 = a3;\n    v5 = a2;\n    v6 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 11) + 96LL))(*((_QWORD *)this + 11));\n    cocos2d::ccGLBindTexture2D((cocos2d *)v6);\n    _glewBindBuffer(34962, *((unsigned int *)this + 16));\n    if ( *((_BYTE *)this + 72) )\n    {\n      _glewBufferSubData(34962, 96 * v4, 96 * v5, 96 * v4 + *((_QWORD *)this + 12));\n      *((_BYTE *)this + 72) = 0;\n    }\n    cocos2d::ccGLEnableVertexAttribs((cocos2d *)7);\n    _glewVertexAttribPointer(0, 3, 5126, 0, 24, 0);\n    LOBYTE(v7) = 1;\n    _glewVertexAttribPointer(1, 4, 5121, v7, 24, 12);\n    _glewVertexAttribPointer(2, 2, 5126, 0, 24, 16);\n    _glewBindBuffer(34963, *((unsigned int *)this + 17));\n    glDrawElements(4u, 6 * v5, 0x1403u, (const GLvoid *)(2LL * (unsigned int)(6 * v4)));\n    _glewBindBuffer(34962, 0);\n    _glewBindBuffer(34963, 0);\n    ++g_uNumberOfDraws;\n  }\n}", "assembly": "; \n; cocos2d::CCTextureAtlas::drawNumberOfQuads from 0x1800a9e70 to 0x1800a9ff2 (386 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCAtlasNode::draw @ 0x180001b3b\n; > cocos2d::CCTextureAtlas::drawNumberOfQuads @ 0x1800a9e63\n; > cocos2d::CCTextureAtlas::drawQuads @ 0x1800aa006\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c1fbc\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:17 +0000\n; \ntest    edx, edx                                                       ; +0x0, 0x1800a9e70\njz      locret_1800A9FF1                                               ; +0x2, 0x1800a9e72\nmov     [rsp+arg_0], rbx                                               ; +0x8, 0x1800a9e78\nmov     [rsp+arg_8], rsi                                               ; +0xd, 0x1800a9e7d\npush    rdi                                                            ; +0x12, 0x1800a9e82\nsub     rsp, 30h                                                       ; +0x13, 0x1800a9e83\nmov     rbx, rcx                                                       ; +0x17, 0x1800a9e87\nmov     esi, r8d                                                       ; +0x1a, 0x1800a9e8a\nmov     rcx, [rcx+58h]                                                 ; +0x1d, 0x1800a9e8d\nmov     edi, edx                                                       ; +0x21, 0x1800a9e91\nmov     rax, [rcx]                                                     ; +0x23, 0x1800a9e93\ncall    qword ptr [rax+60h]                                            ; +0x26, 0x1800a9e96\nmov     ecx, eax; this                                                 ; +0x29, 0x1800a9e99\ncall    ?ccGLBindTexture2D@cocos2d@@YAXI@Z; cocos2d::ccGLBindTexture2D(uint) ; +0x2b, 0x1800a9e9b\nmov     rax, cs:__glewBindBuffer                                       ; +0x30, 0x1800a9ea0\nmov     ecx, 8892h                                                     ; +0x37, 0x1800a9ea7\nmov     edx, [rbx+40h]                                                 ; +0x3c, 0x1800a9eac\nmov     r8, [rax]                                                      ; +0x3f, 0x1800a9eaf\ncall    r8                                                             ; +0x42, 0x1800a9eb2\ncmp     byte ptr [rbx+48h], 0                                          ; +0x45, 0x1800a9eb5\njz      short loc_1800A9EE8                                            ; +0x49, 0x1800a9eb9\nmov     rax, cs:__glewBufferSubData                                    ; +0x4b, 0x1800a9ebb\nlea     rdx, [rsi+rsi*2]                                               ; +0x52, 0x1800a9ec2\nmov     r9, [rbx+60h]                                                  ; +0x56, 0x1800a9ec6\nlea     r8, [rdi+rdi*2]                                                ; +0x5a, 0x1800a9eca\nshl     rdx, 5                                                         ; +0x5e, 0x1800a9ece\nmov     ecx, 8892h                                                     ; +0x62, 0x1800a9ed2\nadd     r9, rdx                                                        ; +0x67, 0x1800a9ed7\nshl     r8, 5                                                          ; +0x6a, 0x1800a9eda\nmov     r10, [rax]                                                     ; +0x6e, 0x1800a9ede\ncall    r10                                                            ; +0x71, 0x1800a9ee1\nmov     byte ptr [rbx+48h], 0                                          ; +0x74, 0x1800a9ee4\nmov     ecx, 7; this                                                   ; +0x78, 0x1800a9ee8\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x7d, 0x1800a9eed\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x82, 0x1800a9ef2\nxor     r9d, r9d                                                       ; +0x89, 0x1800a9ef9\nmov     [rsp+38h+var_10], 0                                            ; +0x8c, 0x1800a9efc\nmov     edx, 3                                                         ; +0x95, 0x1800a9f05\nxor     ecx, ecx                                                       ; +0x9a, 0x1800a9f0a\nmov     [rsp+38h+var_18], 18h                                          ; +0x9c, 0x1800a9f0c\nmov     r8d, 1406h                                                     ; +0xa4, 0x1800a9f14\nmov     r10, [rax]                                                     ; +0xaa, 0x1800a9f1a\ncall    r10                                                            ; +0xad, 0x1800a9f1d\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xb0, 0x1800a9f20\nmov     r9b, 1                                                         ; +0xb7, 0x1800a9f27\nmov     [rsp+38h+var_10], 0Ch                                          ; +0xba, 0x1800a9f2a\nmov     edx, 4                                                         ; +0xc3, 0x1800a9f33\nmov     ecx, 1                                                         ; +0xc8, 0x1800a9f38\nmov     [rsp+38h+var_18], 18h                                          ; +0xcd, 0x1800a9f3d\nmov     r8d, 1401h                                                     ; +0xd5, 0x1800a9f45\nmov     r10, [rax]                                                     ; +0xdb, 0x1800a9f4b\ncall    r10                                                            ; +0xde, 0x1800a9f4e\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xe1, 0x1800a9f51\nmov     edx, 2                                                         ; +0xe8, 0x1800a9f58\nmov     [rsp+38h+var_10], 10h                                          ; +0xed, 0x1800a9f5d\nxor     r9d, r9d                                                       ; +0xf6, 0x1800a9f66\nmov     ecx, edx                                                       ; +0xf9, 0x1800a9f69\nmov     [rsp+38h+var_18], 18h                                          ; +0xfb, 0x1800a9f6b\nmov     r8d, 1406h                                                     ; +0x103, 0x1800a9f73\nmov     r10, [rax]                                                     ; +0x109, 0x1800a9f79\ncall    r10                                                            ; +0x10c, 0x1800a9f7c\nmov     rax, cs:__glewBindBuffer                                       ; +0x10f, 0x1800a9f7f\nmov     ecx, 8893h                                                     ; +0x116, 0x1800a9f86\nmov     edx, [rbx+44h]                                                 ; +0x11b, 0x1800a9f8b\nmov     r8, [rax]                                                      ; +0x11e, 0x1800a9f8e\ncall    r8                                                             ; +0x121, 0x1800a9f91\nlea     eax, [rsi+rsi*2]                                               ; +0x124, 0x1800a9f94\nmov     ecx, 4; mode                                                   ; +0x127, 0x1800a9f97\nlea     edx, [rdi+rdi*2]                                               ; +0x12c, 0x1800a9f9c\nmov     r8d, 1403h; type                                               ; +0x12f, 0x1800a9f9f\nadd     edx, edx; count                                                ; +0x135, 0x1800a9fa5\nlea     r9d, [rax+rax]                                                 ; +0x137, 0x1800a9fa7\nadd     r9, r9; indices                                                ; +0x13b, 0x1800a9fab\ncall    cs:glDrawElements                                              ; +0x13e, 0x1800a9fae\nmov     rax, cs:__glewBindBuffer                                       ; +0x144, 0x1800a9fb4\nxor     edx, edx                                                       ; +0x14b, 0x1800a9fbb\nmov     ecx, 8892h                                                     ; +0x14d, 0x1800a9fbd\nmov     r8, [rax]                                                      ; +0x152, 0x1800a9fc2\ncall    r8                                                             ; +0x155, 0x1800a9fc5\nmov     rax, cs:__glewBindBuffer                                       ; +0x158, 0x1800a9fc8\nxor     edx, edx                                                       ; +0x15f, 0x1800a9fcf\nmov     ecx, 8893h                                                     ; +0x161, 0x1800a9fd1\nmov     r8, [rax]                                                      ; +0x166, 0x1800a9fd6\ncall    r8                                                             ; +0x169, 0x1800a9fd9\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x16c, 0x1800a9fdc\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x172, 0x1800a9fe2\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x177, 0x1800a9fe7\nadd     rsp, 30h                                                       ; +0x17c, 0x1800a9fec\npop     rdi                                                            ; +0x180, 0x1800a9ff0\nretn                                                                   ; +0x181, 0x1800a9ff1", "xrefs": ["cocos2d::CCAtlasNode::draw @ 0x180001b3b", "cocos2d::CCTextureAtlas::drawNumberOfQuads @ 0x1800a9e63", "cocos2d::CCTextureAtlas::drawQuads @ 0x1800aa006", "<???> @ 0x18014cf68", "<???> @ 0x1801c1fbc"], "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"}