; ; CCSpriteWithHue::draw from 0x14004ccf0 to 0x14004cf10 (544 bytes) ; ; 5 xrefs: ; > @ 0x14070bb98 ; > @ 0x14070c0e8 ; > @ 0x140886228 ; > @ 0x140886238 ; > @ 0x1409100d0 ; ; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! ; ; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA ; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings ; Generated at Fri, 27 Nov 2026 11:25:33 +0000 ; push rsi ; +0x0, 0x14004ccf0 sub rsp, 60h ; +0x2, 0x14004ccf2 cmp byte ptr [rcx+22Fh], 0 ; +0x6, 0x14004ccf6 mov rsi, rcx ; +0xd, 0x14004ccfd jnz loc_14004CF0A ; +0x10, 0x14004cd00 cmp byte ptr [rcx+149h], 0 ; +0x16, 0x14004cd06 jz loc_14004CF0A ; +0x1d, 0x14004cd0d mov ecx, [rcx+0F8h] ; +0x23, 0x14004cd13 mov [rsp+68h+arg_0], rbx ; +0x29, 0x14004cd19 mov [rsp+68h+arg_8], rdi ; +0x2e, 0x14004cd1e movaps [rsp+68h+var_18], xmm6 ; +0x33, 0x14004cd23 movaps [rsp+68h+var_28], xmm7 ; +0x38, 0x14004cd28 movaps [rsp+68h+var_38], xmm8 ; +0x3d, 0x14004cd2d call cs:?ccGLEnable@cocos2d@@YAXW4ccGLServerState@1@@Z; cocos2d::ccGLEnable(cocos2d::ccGLServerState) ; +0x43, 0x14004cd33 mov rax, [rsi] ; +0x49, 0x14004cd39 mov rcx, rsi ; +0x4c, 0x14004cd3c call qword ptr [rax+288h] ; +0x4f, 0x14004cd3f mov rax, [rsi] ; +0x55, 0x14004cd45 mov rcx, rsi ; +0x58, 0x14004cd48 call qword ptr [rax+288h] ; +0x5b, 0x14004cd4b mov rcx, rax ; +0x61, 0x14004cd51 call cs:?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x64, 0x14004cd54 mov rax, [rsi] ; +0x6a, 0x14004cd5a mov rcx, rsi ; +0x6d, 0x14004cd5d call qword ptr [rax+288h] ; +0x70, 0x14004cd60 mov rcx, rax ; +0x76, 0x14004cd66 call cs:?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x79, 0x14004cd69 mov edx, [rsi+198h] ; +0x7f, 0x14004cd6f mov ecx, [rsi+194h] ; +0x85, 0x14004cd75 call cs:?ccGLBlendFunc@cocos2d@@YAXII@Z; cocos2d::ccGLBlendFunc(uint,uint) ; +0x8b, 0x14004cd7b mov rcx, [rsi+1A0h] ; +0x91, 0x14004cd81 mov rax, [rcx] ; +0x98, 0x14004cd88 call qword ptr [rax+60h] ; +0x9b, 0x14004cd8b mov ecx, eax ; +0x9e, 0x14004cd8e call cs:?ccGLBindTexture2D@cocos2d@@YAXI@Z; cocos2d::ccGLBindTexture2D(uint) ; +0xa0, 0x14004cd90 mov ecx, 7 ; +0xa6, 0x14004cd96 call cs:?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0xab, 0x14004cd9b mov rax, [rsi] ; +0xb1, 0x14004cda1 mov rcx, rsi ; +0xb4, 0x14004cda4 mov edi, [rsi+28Ch] ; +0xb7, 0x14004cda7 call qword ptr [rax+288h] ; +0xbd, 0x14004cdad mov r9d, 1 ; +0xc3, 0x14004cdb3 lea r8, [rsi+268h] ; +0xc9, 0x14004cdb9 mov rcx, rax ; +0xd0, 0x14004cdc0 mov edx, edi ; +0xd3, 0x14004cdc3 call cs:?setUniformLocationWithMatrix3fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWithMatrix3fv(int,float *,uint) ; +0xd5, 0x14004cdc5 movzx eax, byte ptr [rsi+148h] ; +0xdb, 0x14004cdcb mov rcx, rsi ; +0xe2, 0x14004cdd2 mov ebx, [rsi+290h] ; +0xe5, 0x14004cdd5 movd xmm6, eax ; +0xeb, 0x14004cddb mov rax, [rsi] ; +0xef, 0x14004cddf cvtdq2ps xmm6, xmm6 ; +0xf2, 0x14004cde2 divss xmm6, cs:dword_140835964 ; +0xf5, 0x14004cde5 call qword ptr [rax+288h] ; +0xfd, 0x14004cded movaps xmm2, xmm6 ; +0x103, 0x14004cdf3 mov edx, ebx ; +0x106, 0x14004cdf6 mov rcx, rax ; +0x108, 0x14004cdf8 call cs:?setUniformLocationWith1f@CCGLProgram@cocos2d@@QEAAXHM@Z; cocos2d::CCGLProgram::setUniformLocationWith1f(int,float) ; +0x10b, 0x14004cdfb mov rax, [rsi] ; +0x111, 0x14004ce01 mov rcx, rsi ; +0x114, 0x14004ce04 movss xmm6, dword ptr [rsi+264h] ; +0x117, 0x14004ce07 movss xmm7, dword ptr [rsi+260h] ; +0x11f, 0x14004ce0f movss xmm8, dword ptr [rsi+25Ch] ; +0x127, 0x14004ce17 mov ebx, [rsi+294h] ; +0x130, 0x14004ce20 call qword ptr [rax+288h] ; +0x136, 0x14004ce26 movaps xmm3, xmm7 ; +0x13c, 0x14004ce2c movss [rsp+68h+var_48], xmm6 ; +0x13f, 0x14004ce2f mov rcx, rax ; +0x145, 0x14004ce35 movaps xmm2, xmm8 ; +0x148, 0x14004ce38 mov edx, ebx ; +0x14c, 0x14004ce3c call cs:?setUniformLocationWith3f@CCGLProgram@cocos2d@@QEAAXHMMM@Z; cocos2d::CCGLProgram::setUniformLocationWith3f(int,float,float,float) ; +0x14e, 0x14004ce3e mov rax, cs:__glewVertexAttribPointer ; +0x154, 0x14004ce44 lea rbx, [rsi+1CCh] ; +0x15b, 0x14004ce4b mov [rsp+68h+var_40], rbx ; +0x162, 0x14004ce52 xor r9d, r9d ; +0x167, 0x14004ce57 mov edx, 3 ; +0x16a, 0x14004ce5a mov [rsp+68h+var_48], 18h ; +0x16f, 0x14004ce5f xor ecx, ecx ; +0x177, 0x14004ce67 mov r8d, 1406h ; +0x179, 0x14004ce69 mov r10, [rax] ; +0x17f, 0x14004ce6f call r10 ; +0x182, 0x14004ce72 mov rax, cs:__glewVertexAttribPointer ; +0x185, 0x14004ce75 lea rcx, [rbx+10h] ; +0x18c, 0x14004ce7c mov [rsp+68h+var_40], rcx ; +0x190, 0x14004ce80 xor r9d, r9d ; +0x195, 0x14004ce85 mov [rsp+68h+var_48], 18h ; +0x198, 0x14004ce88 mov edx, 2 ; +0x1a0, 0x14004ce90 mov r10, [rax] ; +0x1a5, 0x14004ce95 mov ecx, edx ; +0x1a8, 0x14004ce98 mov r8d, 1406h ; +0x1aa, 0x14004ce9a call r10 ; +0x1b0, 0x14004cea0 mov rax, cs:__glewVertexAttribPointer ; +0x1b3, 0x14004cea3 lea rdx, [rbx+0Ch] ; +0x1ba, 0x14004ceaa mov [rsp+68h+var_40], rdx ; +0x1be, 0x14004ceae mov r9b, 1 ; +0x1c3, 0x14004ceb3 mov edx, 4 ; +0x1c6, 0x14004ceb6 mov [rsp+68h+var_48], 18h ; +0x1cb, 0x14004cebb mov ecx, 1 ; +0x1d3, 0x14004cec3 mov r8d, 1401h ; +0x1d8, 0x14004cec8 mov r10, [rax] ; +0x1de, 0x14004cece call r10 ; +0x1e1, 0x14004ced1 xor edx, edx; first ; +0x1e4, 0x14004ced4 mov ecx, 5; mode ; +0x1e6, 0x14004ced6 mov r8d, 4; count ; +0x1eb, 0x14004cedb call cs:glDrawArrays ; +0x1f1, 0x14004cee1 mov rax, cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws ; +0x1f7, 0x14004cee7 movaps xmm8, [rsp+68h+var_38] ; +0x1fe, 0x14004ceee movaps xmm7, [rsp+68h+var_28] ; +0x204, 0x14004cef4 movaps xmm6, [rsp+68h+var_18] ; +0x209, 0x14004cef9 inc dword ptr [rax] ; +0x20e, 0x14004cefe mov rdi, [rsp+68h+arg_8] ; +0x210, 0x14004cf00 mov rbx, [rsp+68h+arg_0] ; +0x215, 0x14004cf05 add rsp, 60h ; +0x21a, 0x14004cf0a pop rsi ; +0x21e, 0x14004cf0e retn ; +0x21f, 0x14004cf0f