{"type": "func", "start": 5369023728, "end": 5369024272, "name": "CCSpriteWithHue::draw", "pseudocode": "// \n// CCSpriteWithHue::draw from 0x14004ccf0 to 0x14004cf10 (544 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x14070bb98\n// > <???> @ 0x14070c0e8\n// > <???> @ 0x140886228\n// > <???> @ 0x140886238\n// > <???> @ 0x1409100d0\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:25:33 +0000\n// \n\n// write access to const memory has been detected, the output may be wrong!\nvoid __fastcall CCSpriteWithHue::draw(__int64 a1)\n{\n  cocos2d::CCGLProgram *v2; // rax\n  cocos2d::CCGLProgram *v3; // rax\n  unsigned int v4; // r8d\n  unsigned int v5; // eax\n  unsigned int v6; // edx\n  unsigned int v7; // edx\n  int v8; // edi\n  cocos2d::CCGLProgram *v9; // rax\n  int v10; // ebx\n  float v11; // xmm6_4\n  cocos2d::CCGLProgram *v12; // rax\n  float v13; // xmm6_4\n  float v14; // xmm7_4\n  float v15; // xmm8_4\n  int v16; // ebx\n  cocos2d::CCGLProgram *v17; // rax\n  __int64 v18; // r9\n\n  if ( !*(_BYTE *)(a1 + 559) )\n  {\n    if ( *(_BYTE *)(a1 + 329) )\n    {\n      cocos2d::ccGLEnable(*(unsigned int *)(a1 + 248));\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 648LL))(a1);\n      v2 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 648LL))(a1);\n      cocos2d::CCGLProgram::use(v2);\n      v3 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 648LL))(a1);\n      cocos2d::CCGLProgram::setUniformsForBuiltins(v3);\n      cocos2d::ccGLBlendFunc((cocos2d *)*(unsigned int *)(a1 + 404), *(_DWORD *)(a1 + 408), v4);\n      v5 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 416) + 96LL))(*(_QWORD *)(a1 + 416));\n      cocos2d::ccGLBindTexture2D((cocos2d *)v5, v6);\n      cocos2d::ccGLEnableVertexAttribs((cocos2d *)7, v7);\n      v8 = *(_DWORD *)(a1 + 652);\n      v9 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 648LL))(a1);\n      cocos2d::CCGLProgram::setUniformLocationWithMatrix3fv(v9, v8, (float *)(a1 + 616), 1u);\n      v10 = *(_DWORD *)(a1 + 656);\n      v11 = (float)*(unsigned __int8 *)(a1 + 328) / 255.0;\n      v12 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 648LL))(a1);\n      cocos2d::CCGLProgram::setUniformLocationWith1f(v12, v10, v11);\n      v13 = *(float *)(a1 + 612);\n      v14 = *(float *)(a1 + 608);\n      v15 = *(float *)(a1 + 604);\n      v16 = *(_DWORD *)(a1 + 660);\n      v17 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 648LL))(a1);\n      cocos2d::CCGLProgram::setUniformLocationWith3f(v17, v16, v15, v14, v13);\n      _glewVertexAttribPointer(0, 3, 5126, 0, 24, a1 + 460);\n      _glewVertexAttribPointer(2, 2, 5126, 0, 24, a1 + 476);\n      LOBYTE(v18) = 1;\n      _glewVertexAttribPointer(1, 4, 5121, v18, 24, a1 + 472);\n      glDrawArrays(5u, 0, 4);\n      ++g_uNumberOfDraws;\n    }\n  }\n}", "assembly": "; \n; CCSpriteWithHue::draw from 0x14004ccf0 to 0x14004cf10 (544 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x14070bb98\n; > <???> @ 0x14070c0e8\n; > <???> @ 0x140886228\n; > <???> @ 0x140886238\n; > <???> @ 0x1409100d0\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:25:33 +0000\n; \npush    rsi                                                            ; +0x0, 0x14004ccf0\nsub     rsp, 60h                                                       ; +0x2, 0x14004ccf2\ncmp     byte ptr [rcx+22Fh], 0                                         ; +0x6, 0x14004ccf6\nmov     rsi, rcx                                                       ; +0xd, 0x14004ccfd\njnz     loc_14004CF0A                                                  ; +0x10, 0x14004cd00\ncmp     byte ptr [rcx+149h], 0                                         ; +0x16, 0x14004cd06\njz      loc_14004CF0A                                                  ; +0x1d, 0x14004cd0d\nmov     ecx, [rcx+0F8h]                                                ; +0x23, 0x14004cd13\nmov     [rsp+68h+arg_0], rbx                                           ; +0x29, 0x14004cd19\nmov     [rsp+68h+arg_8], rdi                                           ; +0x2e, 0x14004cd1e\nmovaps  [rsp+68h+var_18], xmm6                                         ; +0x33, 0x14004cd23\nmovaps  [rsp+68h+var_28], xmm7                                         ; +0x38, 0x14004cd28\nmovaps  [rsp+68h+var_38], xmm8                                         ; +0x3d, 0x14004cd2d\ncall    cs:?ccGLEnable@cocos2d@@YAXW4ccGLServerState@1@@Z; cocos2d::ccGLEnable(cocos2d::ccGLServerState) ; +0x43, 0x14004cd33\nmov     rax, [rsi]                                                     ; +0x49, 0x14004cd39\nmov     rcx, rsi                                                       ; +0x4c, 0x14004cd3c\ncall    qword ptr [rax+288h]                                           ; +0x4f, 0x14004cd3f\nmov     rax, [rsi]                                                     ; +0x55, 0x14004cd45\nmov     rcx, rsi                                                       ; +0x58, 0x14004cd48\ncall    qword ptr [rax+288h]                                           ; +0x5b, 0x14004cd4b\nmov     rcx, rax                                                       ; +0x61, 0x14004cd51\ncall    cs:?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x64, 0x14004cd54\nmov     rax, [rsi]                                                     ; +0x6a, 0x14004cd5a\nmov     rcx, rsi                                                       ; +0x6d, 0x14004cd5d\ncall    qword ptr [rax+288h]                                           ; +0x70, 0x14004cd60\nmov     rcx, rax                                                       ; +0x76, 0x14004cd66\ncall    cs:?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x79, 0x14004cd69\nmov     edx, [rsi+198h]                                                ; +0x7f, 0x14004cd6f\nmov     ecx, [rsi+194h]                                                ; +0x85, 0x14004cd75\ncall    cs:?ccGLBlendFunc@cocos2d@@YAXII@Z; cocos2d::ccGLBlendFunc(uint,uint) ; +0x8b, 0x14004cd7b\nmov     rcx, [rsi+1A0h]                                                ; +0x91, 0x14004cd81\nmov     rax, [rcx]                                                     ; +0x98, 0x14004cd88\ncall    qword ptr [rax+60h]                                            ; +0x9b, 0x14004cd8b\nmov     ecx, eax                                                       ; +0x9e, 0x14004cd8e\ncall    cs:?ccGLBindTexture2D@cocos2d@@YAXI@Z; cocos2d::ccGLBindTexture2D(uint) ; +0xa0, 0x14004cd90\nmov     ecx, 7                                                         ; +0xa6, 0x14004cd96\ncall    cs:?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0xab, 0x14004cd9b\nmov     rax, [rsi]                                                     ; +0xb1, 0x14004cda1\nmov     rcx, rsi                                                       ; +0xb4, 0x14004cda4\nmov     edi, [rsi+28Ch]                                                ; +0xb7, 0x14004cda7\ncall    qword ptr [rax+288h]                                           ; +0xbd, 0x14004cdad\nmov     r9d, 1                                                         ; +0xc3, 0x14004cdb3\nlea     r8, [rsi+268h]                                                 ; +0xc9, 0x14004cdb9\nmov     rcx, rax                                                       ; +0xd0, 0x14004cdc0\nmov     edx, edi                                                       ; +0xd3, 0x14004cdc3\ncall    cs:?setUniformLocationWithMatrix3fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWithMatrix3fv(int,float *,uint) ; +0xd5, 0x14004cdc5\nmovzx   eax, byte ptr [rsi+148h]                                       ; +0xdb, 0x14004cdcb\nmov     rcx, rsi                                                       ; +0xe2, 0x14004cdd2\nmov     ebx, [rsi+290h]                                                ; +0xe5, 0x14004cdd5\nmovd    xmm6, eax                                                      ; +0xeb, 0x14004cddb\nmov     rax, [rsi]                                                     ; +0xef, 0x14004cddf\ncvtdq2ps xmm6, xmm6                                                    ; +0xf2, 0x14004cde2\ndivss   xmm6, cs:dword_140835964                                       ; +0xf5, 0x14004cde5\ncall    qword ptr [rax+288h]                                           ; +0xfd, 0x14004cded\nmovaps  xmm2, xmm6                                                     ; +0x103, 0x14004cdf3\nmov     edx, ebx                                                       ; +0x106, 0x14004cdf6\nmov     rcx, rax                                                       ; +0x108, 0x14004cdf8\ncall    cs:?setUniformLocationWith1f@CCGLProgram@cocos2d@@QEAAXHM@Z; cocos2d::CCGLProgram::setUniformLocationWith1f(int,float) ; +0x10b, 0x14004cdfb\nmov     rax, [rsi]                                                     ; +0x111, 0x14004ce01\nmov     rcx, rsi                                                       ; +0x114, 0x14004ce04\nmovss   xmm6, dword ptr [rsi+264h]                                     ; +0x117, 0x14004ce07\nmovss   xmm7, dword ptr [rsi+260h]                                     ; +0x11f, 0x14004ce0f\nmovss   xmm8, dword ptr [rsi+25Ch]                                     ; +0x127, 0x14004ce17\nmov     ebx, [rsi+294h]                                                ; +0x130, 0x14004ce20\ncall    qword ptr [rax+288h]                                           ; +0x136, 0x14004ce26\nmovaps  xmm3, xmm7                                                     ; +0x13c, 0x14004ce2c\nmovss   [rsp+68h+var_48], xmm6                                         ; +0x13f, 0x14004ce2f\nmov     rcx, rax                                                       ; +0x145, 0x14004ce35\nmovaps  xmm2, xmm8                                                     ; +0x148, 0x14004ce38\nmov     edx, ebx                                                       ; +0x14c, 0x14004ce3c\ncall    cs:?setUniformLocationWith3f@CCGLProgram@cocos2d@@QEAAXHMMM@Z; cocos2d::CCGLProgram::setUniformLocationWith3f(int,float,float,float) ; +0x14e, 0x14004ce3e\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x154, 0x14004ce44\nlea     rbx, [rsi+1CCh]                                                ; +0x15b, 0x14004ce4b\nmov     [rsp+68h+var_40], rbx                                          ; +0x162, 0x14004ce52\nxor     r9d, r9d                                                       ; +0x167, 0x14004ce57\nmov     edx, 3                                                         ; +0x16a, 0x14004ce5a\nmov     [rsp+68h+var_48], 18h                                          ; +0x16f, 0x14004ce5f\nxor     ecx, ecx                                                       ; +0x177, 0x14004ce67\nmov     r8d, 1406h                                                     ; +0x179, 0x14004ce69\nmov     r10, [rax]                                                     ; +0x17f, 0x14004ce6f\ncall    r10                                                            ; +0x182, 0x14004ce72\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x185, 0x14004ce75\nlea     rcx, [rbx+10h]                                                 ; +0x18c, 0x14004ce7c\nmov     [rsp+68h+var_40], rcx                                          ; +0x190, 0x14004ce80\nxor     r9d, r9d                                                       ; +0x195, 0x14004ce85\nmov     [rsp+68h+var_48], 18h                                          ; +0x198, 0x14004ce88\nmov     edx, 2                                                         ; +0x1a0, 0x14004ce90\nmov     r10, [rax]                                                     ; +0x1a5, 0x14004ce95\nmov     ecx, edx                                                       ; +0x1a8, 0x14004ce98\nmov     r8d, 1406h                                                     ; +0x1aa, 0x14004ce9a\ncall    r10                                                            ; +0x1b0, 0x14004cea0\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x1b3, 0x14004cea3\nlea     rdx, [rbx+0Ch]                                                 ; +0x1ba, 0x14004ceaa\nmov     [rsp+68h+var_40], rdx                                          ; +0x1be, 0x14004ceae\nmov     r9b, 1                                                         ; +0x1c3, 0x14004ceb3\nmov     edx, 4                                                         ; +0x1c6, 0x14004ceb6\nmov     [rsp+68h+var_48], 18h                                          ; +0x1cb, 0x14004cebb\nmov     ecx, 1                                                         ; +0x1d3, 0x14004cec3\nmov     r8d, 1401h                                                     ; +0x1d8, 0x14004cec8\nmov     r10, [rax]                                                     ; +0x1de, 0x14004cece\ncall    r10                                                            ; +0x1e1, 0x14004ced1\nxor     edx, edx; first                                                ; +0x1e4, 0x14004ced4\nmov     ecx, 5; mode                                                   ; +0x1e6, 0x14004ced6\nmov     r8d, 4; count                                                  ; +0x1eb, 0x14004cedb\ncall    cs:glDrawArrays                                                ; +0x1f1, 0x14004cee1\nmov     rax, cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws          ; +0x1f7, 0x14004cee7\nmovaps  xmm8, [rsp+68h+var_38]                                         ; +0x1fe, 0x14004ceee\nmovaps  xmm7, [rsp+68h+var_28]                                         ; +0x204, 0x14004cef4\nmovaps  xmm6, [rsp+68h+var_18]                                         ; +0x209, 0x14004cef9\ninc     dword ptr [rax]                                                ; +0x20e, 0x14004cefe\nmov     rdi, [rsp+68h+arg_8]                                           ; +0x210, 0x14004cf00\nmov     rbx, [rsp+68h+arg_0]                                           ; +0x215, 0x14004cf05\nadd     rsp, 60h                                                       ; +0x21a, 0x14004cf0a\npop     rsi                                                            ; +0x21e, 0x14004cf0e\nretn                                                                   ; +0x21f, 0x14004cf0f", "xrefs": ["<???> @ 0x14070bb98", "<???> @ 0x14070c0e8", "<???> @ 0x140886228", "<???> @ 0x140886238", "<???> @ 0x1409100d0"], "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"}