; ; cocos2d::CCRenderTexture::initWithWidthAndHeight from 0x18005fe40 to 0x1800602a8 (1128 bytes) ; ; 6 xrefs: ; > cocos2d::CCRenderTexture::create @ 0x18005fa1e ; > cocos2d::CCRenderTexture::create @ 0x18005fab6 ; > cocos2d::CCRenderTexture::create @ 0x18005fb4d ; > cocos2d::CCRenderTexture::initWithWidthAndHeight @ 0x18005fe2c ; > @ 0x1801438a8 ; > @ 0x1801b345c ; ; 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 ; mov [rsp+arg_18], rbx ; +0x0, 0x18005fe40 push rbp ; +0x5, 0x18005fe45 push rsi ; +0x6, 0x18005fe46 push rdi ; +0x7, 0x18005fe47 push r12 ; +0x8, 0x18005fe48 push r13 ; +0xa, 0x18005fe4a push r14 ; +0xc, 0x18005fe4c push r15 ; +0xe, 0x18005fe4e sub rsp, 90h ; +0x10, 0x18005fe50 movaps [rsp+0C8h+var_48], xmm6 ; +0x17, 0x18005fe57 movaps [rsp+0C8h+var_58], xmm7 ; +0x1f, 0x18005fe5f mov rax, cs:__security_cookie ; +0x24, 0x18005fe64 xor rax, rsp ; +0x2b, 0x18005fe6b mov [rsp+0C8h+var_60], rax ; +0x2e, 0x18005fe6e mov r13d, r9d ; +0x33, 0x18005fe73 mov edi, r8d ; +0x36, 0x18005fe76 mov ebx, edx ; +0x39, 0x18005fe79 mov rsi, rcx ; +0x3b, 0x18005fe7b mov [rsp+0C8h+var_98], 0 ; +0x3e, 0x18005fe7e call ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x43, 0x18005fe83 mov rcx, rax; this ; +0x48, 0x18005fe88 call ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x4b, 0x18005fe8b movd xmm1, ebx ; +0x50, 0x18005fe90 cvtdq2ps xmm1, xmm1 ; +0x54, 0x18005fe94 mulss xmm0, xmm1 ; +0x57, 0x18005fe97 cvttss2si ebx, xmm0 ; +0x5b, 0x18005fe9b call ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x5f, 0x18005fe9f mov rcx, rax; this ; +0x64, 0x18005fea4 call ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x67, 0x18005fea7 movd xmm1, edi ; +0x6c, 0x18005feac cvtdq2ps xmm1, xmm1 ; +0x70, 0x18005feb0 mulss xmm0, xmm1 ; +0x73, 0x18005feb3 cvttss2si r15d, xmm0 ; +0x77, 0x18005feb7 lea rdx, [rsi+150h]; params ; +0x7c, 0x18005febc mov ecx, 8CA6h; pname ; +0x83, 0x18005fec3 call cs:glGetIntegerv ; +0x88, 0x18005fec8 call ?sharedConfiguration@CCConfiguration@cocos2d@@SAPEAV12@XZ; cocos2d::CCConfiguration::sharedConfiguration(void) ; +0x8e, 0x18005fece mov rcx, rax; this ; +0x93, 0x18005fed3 call ?supportsNPOT@CCConfiguration@cocos2d@@QEBA_NXZ; cocos2d::CCConfiguration::supportsNPOT(void) ; +0x96, 0x18005fed6 test al, al ; +0x9b, 0x18005fedb jz short loc_18005FEE6 ; +0x9d, 0x18005fedd mov ebp, ebx ; +0x9f, 0x18005fedf mov r14d, r15d ; +0xa1, 0x18005fee1 jmp short loc_18005FEFA ; +0xa4, 0x18005fee4 mov ecx, ebx ; +0xa6, 0x18005fee6 call sub_180095970 ; +0xa8, 0x18005fee8 mov ebp, eax ; +0xad, 0x18005feed mov ecx, r15d ; +0xaf, 0x18005feef call sub_180095970 ; +0xb2, 0x18005fef2 mov r14d, eax ; +0xb7, 0x18005fef7 mov ecx, r14d ; +0xba, 0x18005fefa imul ecx, ebp ; +0xbd, 0x18005fefd shl ecx, 2 ; +0xc0, 0x18005ff00 movsxd r12, ecx ; +0xc3, 0x18005ff03 mov rcx, r12; Size ; +0xc6, 0x18005ff06 call cs:__imp_malloc ; +0xc9, 0x18005ff09 mov rdi, rax ; +0xcf, 0x18005ff0f test rax, rax ; +0xd2, 0x18005ff12 jz loc_18006026E ; +0xd5, 0x18005ff15 mov r8, r12; Size ; +0xdb, 0x18005ff1b xor edx, edx; Val ; +0xde, 0x18005ff1e mov rcx, rax; void * ; +0xe0, 0x18005ff20 call memset ; +0xe3, 0x18005ff23 mov [rsi+170h], r13d ; +0xe8, 0x18005ff28 mov [rsi+19Ch], ebx ; +0xef, 0x18005ff2f mov [rsi+1A0h], r15d ; +0xf5, 0x18005ff35 mov ecx, 68h ; 'h'; Size ; +0xfc, 0x18005ff3c call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x101, 0x18005ff41 mov [rsp+0C8h+var_90], rax ; +0x106, 0x18005ff46 test rax, rax ; +0x10b, 0x18005ff4b jz short loc_18005FF59 ; +0x10e, 0x18005ff4e mov rcx, rax; this ; +0x110, 0x18005ff50 call ??0CCTexture2D@cocos2d@@QEAA@XZ; cocos2d::CCTexture2D::CCTexture2D(void) ; +0x113, 0x18005ff53 nop ; +0x118, 0x18005ff58 mov [rsi+158h], rax ; +0x119, 0x18005ff59 test rax, rax ; +0x120, 0x18005ff60 jz loc_180060265 ; +0x123, 0x18005ff63 movd xmm6, r15d ; +0x129, 0x18005ff69 cvtdq2ps xmm6, xmm6 ; +0x12e, 0x18005ff6e movd xmm7, ebx ; +0x131, 0x18005ff71 cvtdq2ps xmm7, xmm7 ; +0x135, 0x18005ff75 movaps xmm2, xmm6 ; +0x138, 0x18005ff78 movaps xmm1, xmm7 ; +0x13b, 0x18005ff7b lea rcx, [rsp+0C8h+var_90] ; +0x13e, 0x18005ff7e call kmVec2Fill ; +0x143, 0x18005ff83 mov [rsp+0C8h+var_A0], rax ; +0x148, 0x18005ff88 mov dword ptr [rsp+0C8h+var_A8], r14d ; +0x14d, 0x18005ff8d mov r9d, ebp ; +0x152, 0x18005ff92 mov r8d, [rsi+170h] ; +0x155, 0x18005ff95 mov rdx, rdi ; +0x15c, 0x18005ff9c mov rcx, [rsi+158h] ; +0x15f, 0x18005ff9f call ?initWithData@CCTexture2D@cocos2d@@QEAA_NPEBXW4CCTexture2DPixelFormat@2@IIAEBVCCSize@2@@Z; cocos2d::CCTexture2D::initWithData(void const *,cocos2d::CCTexture2DPixelFormat,uint,uint,cocos2d::CCSize const &) ; +0x166, 0x18005ffa6 lea rdx, [rsp+0C8h+params]; params ; +0x16b, 0x18005ffab mov ecx, 8CA7h; pname ; +0x170, 0x18005ffb0 call cs:glGetIntegerv ; +0x175, 0x18005ffb5 xorps xmm0, xmm0 ; +0x17b, 0x18005ffbb movups xmmword ptr [rsp+0C8h+Block], xmm0 ; +0x17e, 0x18005ffbe mov [rsp+0C8h+var_70], 7 ; +0x183, 0x18005ffc3 mov [rsp+0C8h+var_68], 0Fh ; +0x18c, 0x18005ffcc mov rax, cs:qword_1800F9FD8 ; +0x195, 0x18005ffd5 mov dword ptr [rsp+0C8h+Block], eax ; +0x19c, 0x18005ffdc movzx eax, word ptr cs:qword_1800F9FD8+4 ; +0x1a0, 0x18005ffe0 mov word ptr [rsp+0C8h+Block+4], ax ; +0x1a7, 0x18005ffe7 movzx eax, byte ptr cs:qword_1800F9FD8+6 ; +0x1ac, 0x18005ffec mov byte ptr [rsp+0C8h+Block+6], al ; +0x1b3, 0x18005fff3 mov byte ptr [rsp+0C8h+Block+7], 0 ; +0x1b7, 0x18005fff7 call ?sharedConfiguration@CCConfiguration@cocos2d@@SAPEAV12@XZ; cocos2d::CCConfiguration::sharedConfiguration(void) ; +0x1bc, 0x18005fffc mov rcx, rax ; +0x1c1, 0x180060001 lea rdx, [rsp+0C8h+Block] ; +0x1c4, 0x180060004 call ?checkForGLExtension@CCConfiguration@cocos2d@@QEBA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCConfiguration::checkForGLExtension(std::string const &) ; +0x1c9, 0x180060009 movzx ebx, al ; +0x1ce, 0x18006000e mov rdx, [rsp+0C8h+var_68] ; +0x1d1, 0x180060011 cmp rdx, 0Fh ; +0x1d6, 0x180060016 jbe short loc_180060051 ; +0x1da, 0x18006001a inc rdx ; +0x1dc, 0x18006001c mov rcx, [rsp+0C8h+Block]; Block ; +0x1df, 0x18006001f mov rax, rcx ; +0x1e4, 0x180060024 cmp rdx, 1000h ; +0x1e7, 0x180060027 jb short loc_18006004C ; +0x1ee, 0x18006002e add rdx, 27h ; ''' ; +0x1f0, 0x180060030 mov rcx, [rcx-8] ; +0x1f4, 0x180060034 sub rax, rcx ; +0x1f8, 0x180060038 add rax, 0FFFFFFFFFFFFFFF8h ; +0x1fb, 0x18006003b cmp rax, 1Fh ; +0x1ff, 0x18006003f jbe short loc_18006004C ; +0x203, 0x180060043 call cs:_invalid_parameter_noinfo_noreturn ; +0x205, 0x180060045 align 4 ; +0x20b, 0x18006004b call j_j_free_0 ; +0x20c, 0x18006004c test bl, bl ; +0x211, 0x180060051 jz short loc_1800600B5 ; +0x213, 0x180060053 mov ecx, 68h ; 'h'; Size ; +0x215, 0x180060055 call ??2@YAPEAX_K@Z; operator new(unsigned __int64) ; +0x21a, 0x18006005a mov [rsp+0C8h+var_90], rax ; +0x21f, 0x18006005f test rax, rax ; +0x224, 0x180060064 jz short loc_180060072 ; +0x227, 0x180060067 mov rcx, rax; this ; +0x229, 0x180060069 call ??0CCTexture2D@cocos2d@@QEAA@XZ; cocos2d::CCTexture2D::CCTexture2D(void) ; +0x22c, 0x18006006c nop ; +0x231, 0x180060071 mov [rsi+160h], rax ; +0x232, 0x180060072 test rax, rax ; +0x239, 0x180060079 jz loc_180060265 ; +0x23c, 0x18006007c movaps xmm2, xmm6 ; +0x242, 0x180060082 movaps xmm1, xmm7 ; +0x245, 0x180060085 lea rcx, [rsp+0C8h+var_90] ; +0x248, 0x180060088 call kmVec2Fill ; +0x24d, 0x18006008d mov [rsp+0C8h+var_A0], rax ; +0x252, 0x180060092 mov dword ptr [rsp+0C8h+var_A8], r14d ; +0x257, 0x180060097 mov r9d, ebp ; +0x25c, 0x18006009c mov r8d, [rsi+170h] ; +0x25f, 0x18006009f mov rdx, rdi ; +0x266, 0x1800600a6 mov rcx, [rsi+160h] ; +0x269, 0x1800600a9 call ?initWithData@CCTexture2D@cocos2d@@QEAA_NPEBXW4CCTexture2DPixelFormat@2@IIAEBVCCSize@2@@Z; cocos2d::CCTexture2D::initWithData(void const *,cocos2d::CCTexture2DPixelFormat,uint,uint,cocos2d::CCSize const &) ; +0x270, 0x1800600b0 lea rdx, [rsi+148h] ; +0x275, 0x1800600b5 mov ecx, 1 ; +0x27c, 0x1800600bc mov rax, cs:__glewGenFramebuffers ; +0x281, 0x1800600c1 call qword ptr [rax] ; +0x288, 0x1800600c8 mov edx, [rsi+148h] ; +0x28a, 0x1800600ca mov ecx, 8D40h ; +0x290, 0x1800600d0 mov rax, cs:__glewBindFramebuffer ; +0x295, 0x1800600d5 call qword ptr [rax] ; +0x29c, 0x1800600dc mov rcx, [rsi+158h] ; +0x29e, 0x1800600de mov rax, [rcx] ; +0x2a5, 0x1800600e5 call qword ptr [rax+60h] ; +0x2a8, 0x1800600e8 mov r9d, eax ; +0x2ab, 0x1800600eb mov dword ptr [rsp+0C8h+var_A8], 0 ; +0x2ae, 0x1800600ee mov edx, 8CE0h ; +0x2b6, 0x1800600f6 lea ecx, [rdx+60h] ; +0x2bb, 0x1800600fb mov r8d, 0DE1h ; +0x2be, 0x1800600fe mov rax, cs:__glewFramebufferTexture2D ; +0x2c4, 0x180060104 call qword ptr [rax] ; +0x2cb, 0x18006010b mov r15d, [rsp+0C8h+arg_20] ; +0x2cd, 0x18006010d test r15d, r15d ; +0x2d5, 0x180060115 jz loc_18006019F ; +0x2d8, 0x180060118 lea rdx, [rsi+14Ch] ; +0x2de, 0x18006011e mov ecx, 1 ; +0x2e5, 0x180060125 mov rax, cs:__glewGenRenderbuffers ; +0x2ea, 0x18006012a call qword ptr [rax] ; +0x2f1, 0x180060131 mov edx, [rsi+14Ch] ; +0x2f3, 0x180060133 mov ecx, 8D41h ; +0x2f9, 0x180060139 mov rax, cs:__glewBindRenderbuffer ; +0x2fe, 0x18006013e call qword ptr [rax] ; +0x305, 0x180060145 mov r9d, r14d ; +0x307, 0x180060147 mov r8d, ebp ; +0x30a, 0x18006014a mov edx, r15d ; +0x30d, 0x18006014d mov ecx, 8D41h ; +0x310, 0x180060150 mov rax, cs:__glewRenderbufferStorage ; +0x315, 0x180060155 call qword ptr [rax] ; +0x31c, 0x18006015c mov r9d, [rsi+14Ch] ; +0x31e, 0x18006015e mov edx, 8D00h ; +0x325, 0x180060165 lea ecx, [rdx+40h] ; +0x32a, 0x18006016a lea r8d, [rdx+41h] ; +0x32d, 0x18006016d mov rax, cs:__glewFramebufferRenderbuffer ; +0x331, 0x180060171 call qword ptr [rax] ; +0x338, 0x180060178 cmp r15d, 88F0h ; +0x33a, 0x18006017a jnz short loc_18006019F ; +0x341, 0x180060181 mov r9d, [rsi+14Ch] ; +0x343, 0x180060183 mov edx, 8D20h ; +0x34a, 0x18006018a lea ecx, [rdx+20h] ; +0x34f, 0x18006018f lea r8d, [rdx+21h] ; +0x352, 0x180060192 mov rax, cs:__glewFramebufferRenderbuffer ; +0x356, 0x180060196 call qword ptr [rax] ; +0x35d, 0x18006019d mov ecx, 8D40h ; +0x35f, 0x18006019f mov rax, cs:__glewCheckFramebufferStatus ; +0x364, 0x1800601a4 call qword ptr [rax] ; +0x36b, 0x1800601ab mov rcx, [rsi+158h]; this ; +0x36d, 0x1800601ad call ?setAliasTexParameters@CCTexture2D@cocos2d@@QEAAXXZ; cocos2d::CCTexture2D::setAliasTexParameters(void) ; +0x374, 0x1800601b4 mov rbx, [rsi] ; +0x379, 0x1800601b9 mov rcx, [rsi+158h]; struct cocos2d::CCTexture2D * ; +0x37c, 0x1800601bc call ?createWithTexture@CCSprite@cocos2d@@SAPEAV12@PEAVCCTexture2D@2@@Z; cocos2d::CCSprite::createWithTexture(cocos2d::CCTexture2D *) ; +0x383, 0x1800601c3 mov rdx, rax ; +0x388, 0x1800601c8 mov rcx, rsi ; +0x38b, 0x1800601cb call qword ptr [rbx+370h] ; +0x38e, 0x1800601ce mov rcx, [rsi+158h]; this ; +0x394, 0x1800601d4 call ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x39b, 0x1800601db mov rcx, [rsi+140h] ; +0x3a0, 0x1800601e0 mov rax, [rcx] ; +0x3a7, 0x1800601e7 movss xmm1, cs:dword_1800E6B20 ; +0x3aa, 0x1800601ea call qword ptr [rax+88h] ; +0x3b2, 0x1800601f2 mov dword ptr [rsp+0C8h+var_90], 1 ; +0x3b8, 0x1800601f8 mov dword ptr [rsp+0C8h+var_90+4], 303h ; +0x3c0, 0x180060200 mov rcx, [rsi+140h] ; +0x3c8, 0x180060208 add rcx, 158h ; +0x3cf, 0x18006020f mov rax, [rcx] ; +0x3d6, 0x180060216 mov rdx, [rsp+0C8h+var_90] ; +0x3d9, 0x180060219 call qword ptr [rax] ; +0x3de, 0x18006021e mov edx, [rsp+0C8h+params] ; +0x3e0, 0x180060220 mov ecx, 8D41h ; +0x3e4, 0x180060224 mov rax, cs:__glewBindRenderbuffer ; +0x3e9, 0x180060229 call qword ptr [rax] ; +0x3f0, 0x180060230 mov edx, [rsi+150h] ; +0x3f2, 0x180060232 mov ecx, 8D40h ; +0x3f8, 0x180060238 mov rax, cs:__glewBindFramebuffer ; +0x3fd, 0x18006023d call qword ptr [rax] ; +0x404, 0x180060244 mov byte ptr [rsi+190h], 0 ; +0x406, 0x180060246 mov rax, [rsi] ; +0x40d, 0x18006024d mov rdx, [rsi+140h] ; +0x410, 0x180060250 mov rcx, rsi ; +0x417, 0x180060257 call qword ptr [rax+1C0h] ; +0x41a, 0x18006025a mov [rsp+0C8h+var_98], 1 ; +0x420, 0x180060260 mov rcx, rdi; Block ; +0x425, 0x180060265 call cs:__imp_free ; +0x428, 0x180060268 movzx eax, [rsp+0C8h+var_98] ; +0x42e, 0x18006026e mov rcx, [rsp+0C8h+var_60] ; +0x433, 0x180060273 xor rcx, rsp; StackCookie ; +0x438, 0x180060278 call __security_check_cookie ; +0x43b, 0x18006027b mov rbx, [rsp+0C8h+arg_18] ; +0x440, 0x180060280 movaps xmm6, [rsp+0C8h+var_48] ; +0x448, 0x180060288 movaps xmm7, [rsp+0C8h+var_58] ; +0x450, 0x180060290 add rsp, 90h ; +0x455, 0x180060295 pop r15 ; +0x45c, 0x18006029c pop r14 ; +0x45e, 0x18006029e pop r13 ; +0x460, 0x1800602a0 pop r12 ; +0x462, 0x1800602a2 pop rdi ; +0x464, 0x1800602a4 pop rsi ; +0x465, 0x1800602a5 pop rbp ; +0x466, 0x1800602a6 retn ; +0x467, 0x1800602a7