; ; cocos2d::CCRenderTexture::draw from 0x180061d70 to 0x180061f7b (523 bytes) ; ; 5 xrefs: ; > @ 0x180100448 ; > @ 0x1801427e4 ; > @ 0x180142818 ; > @ 0x18014cf68 ; > @ 0x1801bd6cc ; ; 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:21:51 +0000 ; push rdi ; +0x0, 0x180061d70 sub rsp, 40h ; +0x2, 0x180061d72 mov rax, cs:__security_cookie ; +0x6, 0x180061d76 xor rax, rsp ; +0xd, 0x180061d7d mov [rsp+48h+var_10], rax ; +0x10, 0x180061d80 cmp byte ptr [rcx+190h], 0 ; +0x15, 0x180061d85 mov rdi, rcx ; +0x1c, 0x180061d8c jz loc_180061F68 ; +0x1f, 0x180061d8f mov [rsp+48h+arg_8], rbx ; +0x25, 0x180061d95 call ?begin@CCRenderTexture@cocos2d@@QEAAXXZ; cocos2d::CCRenderTexture::begin(void) ; +0x2a, 0x180061d9a mov eax, [rdi+174h] ; +0x2f, 0x180061d9f test eax, eax ; +0x35, 0x180061da5 jz loc_180061EBD ; +0x37, 0x180061da7 mov [rsp+48h+var_28], 0 ; +0x3d, 0x180061dad xorps xmm0, xmm0 ; +0x45, 0x180061db5 mov [rsp+48h+s], 0 ; +0x48, 0x180061db8 movups xmmword ptr [rsp+48h+params], xmm0 ; +0x50, 0x180061dc0 bt eax, 0Eh ; +0x55, 0x180061dc5 jnb short loc_180061E01 ; +0x59, 0x180061dc9 lea rdx, [rsp+48h+params]; params ; +0x5b, 0x180061dcb mov ecx, 0C22h; pname ; +0x60, 0x180061dd0 call cs:glGetFloatv ; +0x65, 0x180061dd5 movss xmm3, dword ptr [rdi+184h]; alpha ; +0x6b, 0x180061ddb movss xmm2, dword ptr [rdi+180h]; blue ; +0x73, 0x180061de3 movss xmm1, dword ptr [rdi+17Ch]; green ; +0x7b, 0x180061deb movss xmm0, dword ptr [rdi+178h]; red ; +0x83, 0x180061df3 call cs:glClearColor ; +0x8b, 0x180061dfb test dword ptr [rdi+174h], 100h ; +0x91, 0x180061e01 jz short loc_180061E2E ; +0x9b, 0x180061e0b lea rdx, [rsp+48h+var_28]; params ; +0x9d, 0x180061e0d mov ecx, 0B73h; pname ; +0xa2, 0x180061e12 call cs:glGetFloatv ; +0xa7, 0x180061e17 movss xmm0, dword ptr [rdi+188h] ; +0xad, 0x180061e1d cvtps2pd xmm0, xmm0; depth ; +0xb5, 0x180061e25 call cs:glClearDepth ; +0xb8, 0x180061e28 test dword ptr [rdi+174h], 400h ; +0xbe, 0x180061e2e jz short loc_180061E56 ; +0xc8, 0x180061e38 lea rdx, [rsp+48h+s]; params ; +0xca, 0x180061e3a mov ecx, 0B91h; pname ; +0xcf, 0x180061e3f call cs:glGetIntegerv ; +0xd4, 0x180061e44 mov ecx, [rdi+18Ch]; s ; +0xda, 0x180061e4a call cs:glClearStencil ; +0xe0, 0x180061e50 mov ecx, [rdi+174h]; mask ; +0xe6, 0x180061e56 call cs:glClear ; +0xec, 0x180061e5c test dword ptr [rdi+174h], 4000h ; +0xf2, 0x180061e62 jz short loc_180061E8C ; +0xfc, 0x180061e6c movss xmm3, [rsp+48h+params+0Ch]; alpha ; +0xfe, 0x180061e6e movss xmm2, [rsp+48h+params+8]; blue ; +0x104, 0x180061e74 movss xmm1, [rsp+48h+params+4]; green ; +0x10a, 0x180061e7a movss xmm0, [rsp+48h+params]; red ; +0x110, 0x180061e80 call cs:glClearColor ; +0x116, 0x180061e86 test dword ptr [rdi+174h], 100h ; +0x11c, 0x180061e8c jz short loc_180061EA7 ; +0x126, 0x180061e96 movss xmm0, [rsp+48h+var_28] ; +0x128, 0x180061e98 cvtps2pd xmm0, xmm0; depth ; +0x12e, 0x180061e9e call cs:glClearDepth ; +0x131, 0x180061ea1 test dword ptr [rdi+174h], 400h ; +0x137, 0x180061ea7 jz short loc_180061EBD ; +0x141, 0x180061eb1 mov ecx, [rsp+48h+s]; s ; +0x143, 0x180061eb3 call cs:glClearStencil ; +0x147, 0x180061eb7 mov rax, [rdi] ; +0x14d, 0x180061ebd mov rcx, rdi ; +0x150, 0x180061ec0 call qword ptr [rax+250h] ; +0x153, 0x180061ec3 mov rax, [rdi+0D0h] ; +0x159, 0x180061ec9 test rax, rax ; +0x160, 0x180061ed0 jz short loc_180061F1D ; +0x163, 0x180061ed3 mov rbx, [rax+38h] ; +0x165, 0x180061ed5 mov eax, [rbx] ; +0x169, 0x180061ed9 test eax, eax ; +0x16b, 0x180061edb jz short loc_180061F1D ; +0x16d, 0x180061edd mov rbx, [rbx+10h] ; +0x16f, 0x180061edf mov [rsp+48h+arg_10], rsi ; +0x173, 0x180061ee3 lea rsi, [rax-1] ; +0x178, 0x180061ee8 lea rsi, [rbx+rsi*8] ; +0x17c, 0x180061eec cmp rbx, rsi ; +0x180, 0x180061ef0 ja short loc_180061F18 ; +0x183, 0x180061ef3 mov rcx, [rbx] ; +0x185, 0x180061ef5 test rcx, rcx ; +0x188, 0x180061ef8 jz short loc_180061F18 ; +0x18b, 0x180061efb cmp rcx, [rdi+140h] ; +0x18d, 0x180061efd jz short loc_180061F0F ; +0x194, 0x180061f04 mov rax, [rcx] ; +0x196, 0x180061f06 call qword ptr [rax+2E8h] ; +0x199, 0x180061f09 add rbx, 8 ; +0x19f, 0x180061f0f cmp rbx, rsi ; +0x1a3, 0x180061f13 jbe short loc_180061EF5 ; +0x1a6, 0x180061f16 mov rsi, [rsp+48h+arg_10] ; +0x1a8, 0x180061f18 call ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1ad, 0x180061f1d mov rcx, cs:__glewBindFramebuffer ; +0x1b2, 0x180061f22 mov rbx, rax ; +0x1b9, 0x180061f29 mov edx, [rdi+150h] ; +0x1bc, 0x180061f2c mov r8, [rcx] ; +0x1c2, 0x180061f32 mov ecx, 8D40h ; +0x1c5, 0x180061f35 call r8 ; +0x1ca, 0x180061f3a mov rcx, rbx; this ; +0x1cd, 0x180061f3d call ?setViewport@CCDirector@cocos2d@@QEAAXXZ; cocos2d::CCDirector::setViewport(void) ; +0x1d0, 0x180061f40 mov ecx, 1701h ; +0x1d5, 0x180061f45 call kmGLMatrixMode ; +0x1da, 0x180061f4a call kmGLPopMatrix ; +0x1df, 0x180061f4f mov ecx, 1700h ; +0x1e4, 0x180061f54 call kmGLMatrixMode ; +0x1e9, 0x180061f59 call kmGLPopMatrix ; +0x1ee, 0x180061f5e mov rbx, [rsp+48h+arg_8] ; +0x1f3, 0x180061f63 mov rcx, [rsp+48h+var_10] ; +0x1f8, 0x180061f68 xor rcx, rsp; StackCookie ; +0x1fd, 0x180061f6d call __security_check_cookie ; +0x200, 0x180061f70 add rsp, 40h ; +0x205, 0x180061f75 pop rdi ; +0x209, 0x180061f79 retn ; +0x20a, 0x180061f7a