; ; GJOptionsLayer::addToggleInternal from 0x14028fee0 to 0x140290306 (1062 bytes) ; ; 35 xrefs: ; > GJOptionsLayer::addGVToggle @ 0x14028fe28 ; > GameOptionsLayer::setupOptions @ 0x14029f019 ; > GameOptionsLayer::setupOptions @ 0x14029f07d ; > GameOptionsLayer::setupOptions @ 0x14029f0d9 ; > GameOptionsLayer::setupOptions @ 0x14029f13d ; > GameOptionsLayer::setupOptions @ 0x14029f1a1 ; > GameOptionsLayer::setupOptions @ 0x14029f205 ; > GameOptionsLayer::setupOptions @ 0x14029f269 ; > GameOptionsLayer::setupOptions @ 0x14029f2cd ; > GameOptionsLayer::setupOptions @ 0x14029f338 ; > GameOptionsLayer::setupOptions @ 0x14029f3a3 ; > GameLevelOptionsLayer::setupOptions @ 0x1402a0c1b ; > GameLevelOptionsLayer::setupOptions @ 0x1402a0c44 ; > LevelOptionsLayer::setupOptions @ 0x1403240cb ; > LevelOptionsLayer::setupOptions @ 0x1403240f4 ; > LevelOptionsLayer::setupOptions @ 0x14032412e ; > LevelOptionsLayer::setupOptions @ 0x140324157 ; > LevelOptionsLayer::setupOptions @ 0x140324180 ; > LevelOptionsLayer::setupOptions @ 0x1403241a9 ; > LevelOptionsLayer::setupOptions @ 0x1403241d2 ; > LevelOptionsLayer::setupOptions @ 0x140324210 ; > LevelOptionsLayer2::setupOptions @ 0x140324a01 ; > LevelOptionsLayer2::setupOptions @ 0x140324a31 ; > LevelOptionsLayer2::setupOptions @ 0x140324a61 ; > LevelOptionsLayer2::setupOptions @ 0x140324a91 ; > LevelOptionsLayer2::setupOptions @ 0x140324ac1 ; > LevelOptionsLayer2::setupOptions @ 0x140324af1 ; > LevelOptionsLayer2::setupOptions @ 0x140324b21 ; > LevelOptionsLayer2::setupOptions @ 0x140324b51 ; > LevelOptionsLayer2::setupOptions @ 0x140324b81 ; > LevelOptionsLayer2::setupOptions @ 0x140324bb1 ; > LevelOptionsLayer2::setupOptions @ 0x140324be1 ; > LevelOptionsLayer2::setupOptions @ 0x140324c11 ; > LevelOptionsLayer2::setupOptions @ 0x140324c43 ; > @ 0x1406d1934 ; ; 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 rbp ; +0x0, 0x14028fee0 push rbx ; +0x2, 0x14028fee2 push rsi ; +0x3, 0x14028fee3 push rdi ; +0x4, 0x14028fee4 push r12 ; +0x5, 0x14028fee5 push r13 ; +0x7, 0x14028fee7 push r14 ; +0x9, 0x14028fee9 push r15 ; +0xb, 0x14028feeb lea rbp, [rsp-18h] ; +0xd, 0x14028feed sub rsp, 118h ; +0x12, 0x14028fef2 mov rax, cs:__security_cookie ; +0x19, 0x14028fef9 xor rax, rsp ; +0x20, 0x14028ff00 mov [rbp+50h+var_48], rax ; +0x23, 0x14028ff03 movzx r13d, r9b ; +0x27, 0x14028ff07 mov r12d, r8d ; +0x2b, 0x14028ff0b mov rbx, rdx ; +0x2e, 0x14028ff0e mov r14, rcx ; +0x31, 0x14028ff11 mov rsi, [rbp+50h+arg_20] ; +0x34, 0x14028ff14 mov eax, [rcx+3B4h] ; +0x3b, 0x14028ff1b lea ecx, [rax+1] ; +0x41, 0x14028ff21 mov [r14+3B4h], ecx ; +0x44, 0x14028ff24 cdq ; +0x4b, 0x14028ff2b idiv dword ptr [r14+3B0h] ; +0x4c, 0x14028ff2c movd xmm0, eax ; +0x53, 0x14028ff33 cvtdq2ps xmm0, xmm0; X ; +0x57, 0x14028ff37 call floorf ; +0x5a, 0x14028ff3a xorps xmm1, xmm1 ; +0x5f, 0x14028ff3f maxss xmm1, xmm0 ; +0x62, 0x14028ff42 cvttss2si r15d, xmm1 ; +0x66, 0x14028ff46 mov eax, [r14+3B8h] ; +0x6b, 0x14028ff4b cmp eax, r15d ; +0x72, 0x14028ff52 cmovle eax, r15d ; +0x75, 0x14028ff55 mov [r14+3B8h], eax ; +0x79, 0x14028ff59 mov r8d, r15d ; +0x80, 0x14028ff60 lea rdx, [rbp+50h+var_C8] ; +0x83, 0x14028ff63 mov rcx, r14 ; +0x87, 0x14028ff67 call sub_140290310 ; +0x8a, 0x14028ff6a mov edx, r15d ; +0x8f, 0x14028ff6f mov rcx, r14 ; +0x92, 0x14028ff72 call GJOptionsLayer__layerForPage ; +0x95, 0x14028ff75 mov [rbp+50h+var_D0], rax ; +0x9a, 0x14028ff7a lea rax, [rbp+50h+var_B8] ; +0x9e, 0x14028ff7e mov [rbp+50h+var_C0], rax ; +0xa2, 0x14028ff82 xorps xmm0, xmm0 ; +0xa6, 0x14028ff86 movups [rbp+50h+var_B8], xmm0 ; +0xa9, 0x14028ff89 xor eax, eax ; +0xad, 0x14028ff8d mov [rbp+50h+var_A8], rax ; +0xaf, 0x14028ff8f mov [rbp+50h+var_A0], rax ; +0xb3, 0x14028ff93 mov rdi, 0FFFFFFFFFFFFFFFFh ; +0xb7, 0x14028ff97 mov r8, rdi ; +0xbe, 0x14028ff9e inc r8 ; +0xc1, 0x14028ffa1 cmp [rbx+r8], al ; +0xc4, 0x14028ffa4 jnz short loc_14028FFA1 ; +0xc8, 0x14028ffa8 mov rdx, rbx ; +0xca, 0x14028ffaa lea rcx, [rbp+50h+var_B8] ; +0xcd, 0x14028ffad call sub_14003A930 ; +0xd1, 0x14028ffb1 nop ; +0xd6, 0x14028ffb6 xorps xmm2, xmm2 ; +0xd7, 0x14028ffb7 movss xmm1, cs:dword_140623068 ; +0xda, 0x14028ffba lea rcx, [rbp+50h+var_98] ; +0xe2, 0x14028ffc2 call cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xe6, 0x14028ffc6 mov rbx, rax ; +0xec, 0x14028ffcc lea rdx, [rbp+50h+var_C8] ; +0xef, 0x14028ffcf lea rcx, [rbp+50h+var_90] ; +0xf3, 0x14028ffd3 call cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xf7, 0x14028ffd7 nop ; +0xfd, 0x14028ffdd xor ecx, ecx ; +0xfe, 0x14028ffde mov [rsp+150h+var_E0], rcx ; +0x100, 0x14028ffe0 mov [rsp+150h+var_E8], ecx ; +0x105, 0x14028ffe5 mov [rsp+150h+var_F0], cl ; +0x109, 0x14028ffe9 lea rcx, qword_14052A4D8 ; +0x10d, 0x14028ffed mov [rsp+150h+var_F8], rcx ; +0x114, 0x14028fff4 mov [rsp+150h+var_100], rbx ; +0x119, 0x14028fff9 movss xmm0, dword ptr [r14+3C0h] ; +0x11e, 0x14028fffe movss [rsp+150h+var_108], xmm0 ; +0x127, 0x140290007 movss xmm1, dword ptr [r14+3BCh] ; +0x12d, 0x14029000d movss [rsp+150h+var_110], xmm1 ; +0x136, 0x140290016 movss xmm0, cs:dword_140622BA4 ; +0x13c, 0x14029001c movss [rsp+150h+var_118], xmm0 ; +0x144, 0x140290024 mov rbx, [rbp+50h+var_D0] ; +0x14a, 0x14029002a mov [rsp+150h+var_120], rbx ; +0x14e, 0x14029002e mov [rsp+150h+var_128], r14 ; +0x153, 0x140290033 mov [rsp+150h+var_130], rax ; +0x158, 0x140290038 mov r9, [r14+220h] ; +0x15d, 0x14029003d movzx r8d, r13b ; +0x164, 0x140290044 lea rdx, GJOptionsLayer__onToggle ; +0x168, 0x140290048 lea rcx, [rbp+50h+var_B8] ; +0x16f, 0x14029004f call GameToolbox__createToggleButton ; +0x173, 0x140290053 mov r13, rax ; +0x178, 0x140290058 mov r8, [rax] ; +0x17b, 0x14029005b mov edx, r12d ; +0x17e, 0x14029005e mov rcx, rax ; +0x181, 0x140290061 call qword ptr [r8+40h] ; +0x184, 0x140290064 mov rcx, [r13+178h] ; +0x188, 0x140290068 mov dword ptr [rcx+174h], 3F800000h ; +0x18f, 0x14029006f mov rcx, [r13+180h] ; +0x199, 0x140290079 mov dword ptr [rcx+174h], 3F800000h ; +0x1a0, 0x140290080 movzx edx, byte ptr [r13+188h] ; +0x1aa, 0x14029008a mov rcx, r13 ; +0x1b2, 0x140290092 call CCMenuItemToggler__toggle ; +0x1b5, 0x140290095 mov edx, r15d ; +0x1ba, 0x14029009a mov rcx, r14 ; +0x1bd, 0x14029009d call GJOptionsLayer__incrementCountForPage ; +0x1c0, 0x1402900a0 mov edx, r15d ; +0x1c5, 0x1402900a5 mov rcx, r14 ; +0x1c8, 0x1402900a8 call GJOptionsLayer__objectsForPage ; +0x1cb, 0x1402900ab mov r15, rax ; +0x1d0, 0x1402900b0 mov rdx, r13 ; +0x1d3, 0x1402900b3 mov rcx, rax ; +0x1d6, 0x1402900b6 call cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x1d9, 0x1402900b9 mov r8, [r13+0] ; +0x1df, 0x1402900bf xor edx, edx ; +0x1e3, 0x1402900c3 mov rcx, r13 ; +0x1e5, 0x1402900c5 call qword ptr [r8+140h] ; +0x1e8, 0x1402900c8 mov r8, [rbx] ; +0x1ef, 0x1402900cf xor edx, edx ; +0x1f2, 0x1402900d2 mov rcx, rbx ; +0x1f4, 0x1402900d4 call qword ptr [r8+140h] ; +0x1f7, 0x1402900d7 test rsi, rsi ; +0x1fe, 0x1402900de jz loc_1402902E6 ; +0x201, 0x1402900e1 mov rax, rdi ; +0x207, 0x1402900e7 nop word ptr [rax+rax+00h] ; +0x20a, 0x1402900ea inc rax ; +0x210, 0x1402900f0 cmp byte ptr [rsi+rax], 0 ; +0x213, 0x1402900f3 jnz short loc_1402900F0 ; +0x217, 0x1402900f7 test rax, rax ; +0x219, 0x1402900f9 jz loc_1402902E6 ; +0x21c, 0x1402900fc mov edx, r12d ; +0x222, 0x140290102 lea rcx, aInfoI; "info_%i" ; +0x225, 0x140290105 call cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x22c, 0x14029010c mov rcx, rax ; +0x232, 0x140290112 call cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x235, 0x140290115 xorps xmm0, xmm0 ; +0x23b, 0x14029011b movups xmmword ptr [rbp+50h+var_68], xmm0 ; +0x23e, 0x14029011e xorps xmm1, xmm1 ; +0x242, 0x140290122 movdqu [rbp+50h+var_58], xmm1 ; +0x245, 0x140290125 mov r8, rdi ; +0x24a, 0x14029012a nop dword ptr [rax] ; +0x24d, 0x14029012d inc r8 ; +0x250, 0x140290130 cmp byte ptr [rax+r8], 0 ; +0x253, 0x140290133 jnz short loc_140290130 ; +0x258, 0x140290138 mov rdx, rax ; +0x25a, 0x14029013a lea rcx, [rbp+50h+var_68] ; +0x25d, 0x14029013d call sub_14003A930 ; +0x261, 0x140290141 nop ; +0x266, 0x140290146 xorps xmm0, xmm0 ; +0x267, 0x140290147 movups xmmword ptr [rbp+50h+Block], xmm0 ; +0x26a, 0x14029014a xorps xmm1, xmm1 ; +0x26e, 0x14029014e movdqu [rbp+50h+var_78], xmm1 ; +0x271, 0x140290151 inc rdi ; +0x276, 0x140290156 cmp byte ptr [rsi+rdi], 0 ; +0x279, 0x140290159 jnz short loc_140290156 ; +0x27d, 0x14029015d mov r8, rdi ; +0x27f, 0x14029015f mov rdx, rsi ; +0x282, 0x140290162 lea rcx, [rbp+50h+Block] ; +0x285, 0x140290165 call sub_14003A930 ; +0x289, 0x140290169 nop ; +0x28e, 0x14029016e lea rcx, [rbp+50h+Block] ; +0x28f, 0x14029016f call cs:?create@CCString@cocos2d@@SAPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCString::create(std::string const &) ; +0x293, 0x140290173 mov rdx, rax ; +0x299, 0x140290179 lea r8, [rbp+50h+var_68] ; +0x29c, 0x14029017c mov rcx, [r14+3C8h] ; +0x2a0, 0x140290180 call cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x2a7, 0x140290187 nop ; +0x2ad, 0x14029018d mov rdx, qword ptr [rbp+50h+var_78+8] ; +0x2ae, 0x14029018e cmp rdx, 0Fh ; +0x2b2, 0x140290192 jbe short loc_1402901CC ; +0x2b6, 0x140290196 inc rdx ; +0x2b8, 0x140290198 mov rcx, [rbp+50h+Block]; Block ; +0x2bb, 0x14029019b mov rax, rcx ; +0x2bf, 0x14029019f cmp rdx, 1000h ; +0x2c2, 0x1402901a2 jb short loc_1402901C7 ; +0x2c9, 0x1402901a9 add rdx, 27h ; ''' ; +0x2cb, 0x1402901ab mov rcx, [rcx-8] ; +0x2cf, 0x1402901af sub rax, rcx ; +0x2d3, 0x1402901b3 add rax, 0FFFFFFFFFFFFFFF8h ; +0x2d6, 0x1402901b6 cmp rax, 1Fh ; +0x2da, 0x1402901ba jbe short loc_1402901C7 ; +0x2de, 0x1402901be call cs:_invalid_parameter_noinfo_noreturn ; +0x2e0, 0x1402901c0 db 0CCh ; +0x2e6, 0x1402901c6 call j_j_free ; +0x2e7, 0x1402901c7 movdqa xmm0, cs:xmmword_140623F30 ; +0x2ec, 0x1402901cc movdqu [rbp+50h+var_78], xmm0 ; +0x2f4, 0x1402901d4 mov byte ptr [rbp+50h+Block], 0 ; +0x2f9, 0x1402901d9 mov rdx, qword ptr [rbp+50h+var_58+8] ; +0x2fd, 0x1402901dd cmp rdx, 0Fh ; +0x301, 0x1402901e1 jbe short loc_14029021B ; +0x305, 0x1402901e5 inc rdx ; +0x307, 0x1402901e7 mov rcx, [rbp+50h+var_68]; Block ; +0x30a, 0x1402901ea mov rax, rcx ; +0x30e, 0x1402901ee cmp rdx, 1000h ; +0x311, 0x1402901f1 jb short loc_140290216 ; +0x318, 0x1402901f8 add rdx, 27h ; ''' ; +0x31a, 0x1402901fa mov rcx, [rcx-8] ; +0x31e, 0x1402901fe sub rax, rcx ; +0x322, 0x140290202 add rax, 0FFFFFFFFFFFFFFF8h ; +0x325, 0x140290205 cmp rax, 1Fh ; +0x329, 0x140290209 jbe short loc_140290216 ; +0x32d, 0x14029020d call cs:_invalid_parameter_noinfo_noreturn ; +0x32f, 0x14029020f align 2 ; +0x335, 0x140290215 call j_j_free ; +0x336, 0x140290216 lea rcx, aGjInfoicon001P; "GJ_infoIcon_001.png" ; +0x33b, 0x14029021b call cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x342, 0x140290222 mov rbx, rax ; +0x348, 0x140290228 mov r8, [rax] ; +0x34b, 0x14029022b movss xmm1, cs:dword_140622B08 ; +0x34e, 0x14029022e mov rcx, rax ; +0x356, 0x140290236 call qword ptr [r8+0A0h] ; +0x359, 0x140290239 lea r9, GJOptionsLayer__onInfo ; +0x360, 0x140290240 mov r8, r14 ; +0x367, 0x140290247 xor edx, edx ; +0x36a, 0x14029024a mov rcx, rbx ; +0x36c, 0x14029024c call CCMenuItemSpriteExtra__create ; +0x36f, 0x14029024f mov rdi, rax ; +0x374, 0x140290254 mov dword ptr [rax+174h], 40000000h ; +0x377, 0x140290257 mov r8, [rax] ; +0x381, 0x140290261 mov edx, r12d ; +0x384, 0x140290264 mov rcx, rax ; +0x387, 0x140290267 call qword ptr [r8+40h] ; +0x38a, 0x14029026a mov rcx, [r14+220h] ; +0x38e, 0x14029026e mov r8, [rcx] ; +0x395, 0x140290275 mov rdx, rdi ; +0x398, 0x140290278 call qword ptr [r8+1C0h] ; +0x39b, 0x14029027b movss xmm2, cs:dword_1406230F8 ; +0x3a2, 0x140290282 movss xmm1, cs:dword_140623890 ; +0x3aa, 0x14029028a lea rcx, [rbp+50h+var_C0] ; +0x3b2, 0x140290292 call cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x3b6, 0x140290296 mov rbx, rax ; +0x3bc, 0x14029029c mov rdx, [r13+0] ; +0x3bf, 0x14029029f mov rcx, r13 ; +0x3c3, 0x1402902a3 call qword ptr [rdx+0C8h] ; +0x3c6, 0x1402902a6 mov r8, rbx ; +0x3cc, 0x1402902ac lea rdx, [rbp+50h+var_D0] ; +0x3cf, 0x1402902af mov rcx, rax ; +0x3d3, 0x1402902b3 call cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x3d6, 0x1402902b6 mov rax, [rdi] ; +0x3dc, 0x1402902bc lea rdx, [rbp+50h+var_D0] ; +0x3df, 0x1402902bf mov rcx, rdi ; +0x3e3, 0x1402902c3 call qword ptr [rax+0B8h] ; +0x3e6, 0x1402902c6 mov rdx, rdi ; +0x3ec, 0x1402902cc mov rcx, r15 ; +0x3ef, 0x1402902cf call cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x3f2, 0x1402902d2 mov rax, [rdi] ; +0x3f8, 0x1402902d8 xor edx, edx ; +0x3fb, 0x1402902db mov rcx, rdi ; +0x3fd, 0x1402902dd call qword ptr [rax+140h] ; +0x400, 0x1402902e0 mov rcx, [rbp+50h+var_48] ; +0x406, 0x1402902e6 xor rcx, rsp; StackCookie ; +0x40a, 0x1402902ea call __security_check_cookie ; +0x40d, 0x1402902ed add rsp, 118h ; +0x412, 0x1402902f2 pop r15 ; +0x419, 0x1402902f9 pop r14 ; +0x41b, 0x1402902fb pop r13 ; +0x41d, 0x1402902fd pop r12 ; +0x41f, 0x1402902ff pop rdi ; +0x421, 0x140290301 pop rsi ; +0x422, 0x140290302 pop rbx ; +0x423, 0x140290303 pop rbp ; +0x424, 0x140290304 retn ; +0x425, 0x140290305