; ; cocos2d::CCGLProgram::setUniformsForBuiltins from 0x180087660 to 0x180087919 (697 bytes) ; ; 30 xrefs: ; > cocos2d::CCAtlasNode::draw @ 0x180001ad2 ; > cocos2d::ccDrawCardinalSpline @ 0x180010944 ; > cocos2d::ccDrawCircle @ 0x180010baf ; > cocos2d::ccDrawCircleSegment @ 0x180010ddf ; > cocos2d::ccDrawCubicBezier @ 0x180011175 ; > cocos2d::ccDrawFilledCircle @ 0x18001134c ; > cocos2d::ccDrawLine @ 0x180011482 ; > cocos2d::ccDrawLines @ 0x180011536 ; > cocos2d::ccDrawPoint @ 0x180011630 ; > cocos2d::ccDrawPoints @ 0x1800116f6 ; > cocos2d::ccDrawPoly @ 0x1800117e0 ; > cocos2d::ccDrawQuadBezier @ 0x180011a10 ; > cocos2d::ccDrawSolidPoly @ 0x180011bf8 ; > cocos2d::ccDrawSolidRect @ 0x180011d10 ; > cocos2d::CCDrawNode::draw @ 0x1800120c3 ; > cocos2d::CCGrid3D::blit @ 0x180022702 ; > cocos2d::CCTiledGrid3D::blit @ 0x1800227b8 ; > cocos2d::CCLayerColor::draw @ 0x18004fcb3 ; > cocos2d::CCMotionStreak::draw @ 0x18005cd00 ; > cocos2d::CCProgressTimer::draw @ 0x18005db94 ; > cocos2d::CCParticleBatchNode::draw @ 0x180061554 ; > cocos2d::CCParticleSystemQuad::draw @ 0x18006a63e ; > cocos2d::CCSprite::draw @ 0x18008b9bd ; > cocos2d::CCSpriteBatchNode::draw @ 0x18008e3fd ; > cocos2d::CCTexture2D::drawAtPoint @ 0x1800a4fdc ; > cocos2d::CCTexture2D::drawInRect @ 0x1800a5113 ; > @ 0x18013cc7c ; > @ 0x18013ccb0 ; > @ 0x1801438a8 ; > @ 0x1801b5820 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; push rbx ; +0x0, 0x180087660 sub rsp, 140h ; +0x2, 0x180087662 mov rax, cs:__security_cookie ; +0x9, 0x180087669 xor rax, rsp ; +0x10, 0x180087670 mov [rsp+148h+var_58], rax ; +0x13, 0x180087673 mov rbx, rcx ; +0x1b, 0x18008767b mov [rsp+148h+arg_8], rdi ; +0x1e, 0x18008767e mov ecx, 1701h ; +0x26, 0x180087686 lea rdx, [rsp+148h+var_118] ; +0x2b, 0x18008768b call kmGLGetMatrix ; +0x30, 0x180087690 lea rdx, [rsp+148h+var_D8] ; +0x35, 0x180087695 mov ecx, 1700h ; +0x3a, 0x18008769a call kmGLGetMatrix ; +0x3f, 0x18008769f lea r8, [rsp+148h+var_D8] ; +0x44, 0x1800876a4 lea rdx, [rsp+148h+var_118] ; +0x49, 0x1800876a9 lea rcx, [rsp+148h+var_98] ; +0x4e, 0x1800876ae call kmMat4Multiply ; +0x56, 0x1800876b6 mov edi, [rbx+44h] ; +0x5b, 0x1800876bb lea r8, [rsp+148h+var_118]; void * ; +0x5e, 0x1800876be mov r9d, 40h ; '@'; unsigned int ; +0x63, 0x1800876c3 mov edx, edi; int ; +0x69, 0x1800876c9 mov rcx, rbx; this ; +0x6b, 0x1800876cb call ?updateUniformLocation@CCGLProgram@cocos2d@@AEAA_NHPEAXI@Z; cocos2d::CCGLProgram::updateUniformLocation(int,void *,uint) ; +0x6e, 0x1800876ce test al, al ; +0x73, 0x1800876d3 jz short loc_1800876EE ; +0x75, 0x1800876d5 mov rax, cs:__glewUniformMatrix4fv ; +0x77, 0x1800876d7 lea r9, [rsp+148h+var_118] ; +0x7e, 0x1800876de xor r8d, r8d ; +0x83, 0x1800876e3 mov ecx, edi ; +0x86, 0x1800876e6 lea edx, [r8+1] ; +0x88, 0x1800876e8 call qword ptr [rax] ; +0x8c, 0x1800876ec mov edi, [rbx+48h] ; +0x8e, 0x1800876ee lea r8, [rsp+148h+var_D8]; void * ; +0x91, 0x1800876f1 mov edx, edi; int ; +0x96, 0x1800876f6 mov r9d, 40h ; '@'; unsigned int ; +0x98, 0x1800876f8 mov rcx, rbx; this ; +0x9e, 0x1800876fe call ?updateUniformLocation@CCGLProgram@cocos2d@@AEAA_NHPEAXI@Z; cocos2d::CCGLProgram::updateUniformLocation(int,void *,uint) ; +0xa1, 0x180087701 test al, al ; +0xa6, 0x180087706 jz short loc_180087721 ; +0xa8, 0x180087708 mov rax, cs:__glewUniformMatrix4fv ; +0xaa, 0x18008770a lea r9, [rsp+148h+var_D8] ; +0xb1, 0x180087711 xor r8d, r8d ; +0xb6, 0x180087716 mov ecx, edi ; +0xb9, 0x180087719 lea edx, [r8+1] ; +0xbb, 0x18008771b call qword ptr [rax] ; +0xbf, 0x18008771f mov edi, [rbx+4Ch] ; +0xc1, 0x180087721 lea r8, [rsp+148h+var_98]; void * ; +0xc4, 0x180087724 mov edx, edi; int ; +0xcc, 0x18008772c mov r9d, 40h ; '@'; unsigned int ; +0xce, 0x18008772e mov rcx, rbx; this ; +0xd4, 0x180087734 call ?updateUniformLocation@CCGLProgram@cocos2d@@AEAA_NHPEAXI@Z; cocos2d::CCGLProgram::updateUniformLocation(int,void *,uint) ; +0xd7, 0x180087737 test al, al ; +0xdc, 0x18008773c jz short loc_18008775A ; +0xde, 0x18008773e mov rax, cs:__glewUniformMatrix4fv ; +0xe0, 0x180087740 lea r9, [rsp+148h+var_98] ; +0xe7, 0x180087747 xor r8d, r8d ; +0xef, 0x18008774f mov ecx, edi ; +0xf2, 0x180087752 lea edx, [r8+1] ; +0xf4, 0x180087754 call qword ptr [rax] ; +0xf8, 0x180087758 cmp byte ptr [rbx+70h], 0 ; +0xfa, 0x18008775a movaps [rsp+148h+var_18], xmm6 ; +0xfe, 0x18008775e movaps [rsp+148h+var_28], xmm7 ; +0x106, 0x180087766 movaps [rsp+148h+var_38], xmm8 ; +0x10e, 0x18008776e movaps [rsp+148h+var_48], xmm9 ; +0x117, 0x180087777 mov rdi, [rsp+148h+arg_8] ; +0x120, 0x180087780 jz loc_18008786A ; +0x128, 0x180087788 call ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x12e, 0x18008778e mov edx, [rbx+50h]; int ; +0x133, 0x180087793 xorps xmm0, xmm0 ; +0x136, 0x180087796 mov ecx, [rax+0FCh] ; +0x139, 0x180087799 cvtsi2sd xmm0, rcx ; +0x13f, 0x18008779f mov rcx, rbx; this ; +0x144, 0x1800877a4 mulsd xmm0, qword ptr [rax+0C0h] ; +0x147, 0x1800877a7 cvtpd2ps xmm9, xmm0 ; +0x14f, 0x1800877af cvtps2pd xmm6, xmm9 ; +0x154, 0x1800877b4 movaps xmm3, xmm9 ; +0x158, 0x1800877b8 movaps xmm1, xmm9 ; +0x15c, 0x1800877bc mulss xmm3, cs:dword_1800E7310 ; +0x160, 0x1800877c0 addss xmm1, xmm9 ; +0x168, 0x1800877c8 movaps xmm0, xmm6 ; +0x16d, 0x1800877cd divsd xmm0, cs:qword_1801017A0 ; +0x170, 0x1800877d0 movss [rsp+148h+var_120], xmm3; float ; +0x178, 0x1800877d8 movaps xmm3, xmm9; float ; +0x17e, 0x1800877de cvtpd2ps xmm2, xmm0; float ; +0x182, 0x1800877e2 movss [rsp+148h+var_128], xmm1; float ; +0x186, 0x1800877e6 call ?setUniformLocationWith4f@CCGLProgram@cocos2d@@QEAAXHMMMM@Z; cocos2d::CCGLProgram::setUniformLocationWith4f(int,float,float,float,float) ; +0x18c, 0x1800877ec movaps xmm0, xmm6 ; +0x191, 0x1800877f1 movaps xmm1, xmm6 ; +0x194, 0x1800877f4 mulsd xmm0, cs:qword_1800E6558 ; +0x197, 0x1800877f7 mulsd xmm1, cs:qword_180101798 ; +0x19f, 0x1800877ff mulsd xmm6, cs:qword_180101790 ; +0x1a7, 0x180087807 cvtpd2ps xmm8, xmm0 ; +0x1af, 0x18008780f movaps xmm0, xmm9; X ; +0x1b4, 0x180087814 cvtpd2ps xmm7, xmm1 ; +0x1b8, 0x180087818 cvtpd2ps xmm6, xmm6 ; +0x1bc, 0x18008781c call sinf ; +0x1c0, 0x180087820 mov edx, [rbx+54h]; int ; +0x1c5, 0x180087825 mov rcx, rbx; this ; +0x1c8, 0x180087828 movss [rsp+148h+var_120], xmm0; float ; +0x1cb, 0x18008782b movaps xmm3, xmm7; float ; +0x1d1, 0x180087831 movaps xmm2, xmm6; float ; +0x1d4, 0x180087834 movss [rsp+148h+var_128], xmm8; float ; +0x1d7, 0x180087837 call ?setUniformLocationWith4f@CCGLProgram@cocos2d@@QEAAXHMMMM@Z; cocos2d::CCGLProgram::setUniformLocationWith4f(int,float,float,float,float) ; +0x1de, 0x18008783e movaps xmm0, xmm9; X ; +0x1e3, 0x180087843 call cosf ; +0x1e7, 0x180087847 mov edx, [rbx+58h]; int ; +0x1ec, 0x18008784c movaps xmm3, xmm7; float ; +0x1ef, 0x18008784f movss [rsp+148h+var_120], xmm0; float ; +0x1f2, 0x180087852 movaps xmm2, xmm6; float ; +0x1f8, 0x180087858 mov rcx, rbx; this ; +0x1fb, 0x18008785b movss [rsp+148h+var_128], xmm8; float ; +0x1fe, 0x18008785e call ?setUniformLocationWith4f@CCGLProgram@cocos2d@@QEAAXHMMMM@Z; cocos2d::CCGLProgram::setUniformLocationWith4f(int,float,float,float,float) ; +0x205, 0x180087865 cmp dword ptr [rbx+5Ch], 0FFFFFFFFh ; +0x20a, 0x18008786a jz short loc_1800878DE ; +0x20e, 0x18008786e call cs:rand ; +0x210, 0x180087870 movss xmm8, cs:dword_1800E630C ; +0x216, 0x180087876 movd xmm9, eax ; +0x21f, 0x18008787f cvtdq2ps xmm9, xmm9 ; +0x224, 0x180087884 divss xmm9, xmm8 ; +0x228, 0x180087888 call cs:rand ; +0x22d, 0x18008788d movd xmm7, eax ; +0x233, 0x180087893 cvtdq2ps xmm7, xmm7 ; +0x237, 0x180087897 divss xmm7, xmm8 ; +0x23a, 0x18008789a call cs:rand ; +0x23f, 0x18008789f movd xmm6, eax ; +0x245, 0x1800878a5 cvtdq2ps xmm6, xmm6 ; +0x249, 0x1800878a9 divss xmm6, xmm8 ; +0x24c, 0x1800878ac call cs:rand ; +0x251, 0x1800878b1 mov edx, [rbx+5Ch]; int ; +0x257, 0x1800878b7 movaps xmm3, xmm6; float ; +0x25a, 0x1800878ba movss [rsp+148h+var_120], xmm9; float ; +0x25d, 0x1800878bd mov rcx, rbx; this ; +0x264, 0x1800878c4 movss [rsp+148h+var_128], xmm7; float ; +0x267, 0x1800878c7 movd xmm2, eax ; +0x26d, 0x1800878cd cvtdq2ps xmm2, xmm2 ; +0x271, 0x1800878d1 divss xmm2, xmm8; float ; +0x274, 0x1800878d4 call ?setUniformLocationWith4f@CCGLProgram@cocos2d@@QEAAXHMMMM@Z; cocos2d::CCGLProgram::setUniformLocationWith4f(int,float,float,float,float) ; +0x279, 0x1800878d9 movaps xmm9, [rsp+148h+var_48] ; +0x27e, 0x1800878de movaps xmm8, [rsp+148h+var_38] ; +0x287, 0x1800878e7 movaps xmm7, [rsp+148h+var_28] ; +0x290, 0x1800878f0 movaps xmm6, [rsp+148h+var_18] ; +0x298, 0x1800878f8 mov rcx, [rsp+148h+var_58] ; +0x2a0, 0x180087900 xor rcx, rsp; StackCookie ; +0x2a8, 0x180087908 call __security_check_cookie ; +0x2ab, 0x18008790b add rsp, 140h ; +0x2b0, 0x180087910 pop rbx ; +0x2b7, 0x180087917 retn ; +0x2b8, 0x180087918