; ; CharacterColorPage::updateColorMode from 0x10065dfa0 to 0x10065e453 (1203 bytes) ; ; 2 xrefs: ; > CharacterColorPage::init @ 0x10065d703 ; > CharacterColorPage::onMode @ 0x10065d8b2 ; ; 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, 0x10065dfa0 mov rbp, rsp ; +0x1, 0x10065dfa1 push r15 ; +0x4, 0x10065dfa4 push r14 ; +0x6, 0x10065dfa6 push r13 ; +0x8, 0x10065dfa8 push r12 ; +0xa, 0x10065dfaa push rbx ; +0xc, 0x10065dfac sub rsp, 38h ; +0xd, 0x10065dfad mov r15, rdi ; +0x11, 0x10065dfb1 mov [rdi+278h], esi ; +0x14, 0x10065dfb4 call GameManager__sharedState ; +0x1a, 0x10065dfba mov ecx, [rax+304h] ; +0x1f, 0x10065dfbf sub ecx, [rax+308h] ; +0x25, 0x10065dfc5 mov [rbp+var_4C], ecx ; +0x2b, 0x10065dfcb call GameManager__sharedState ; +0x2e, 0x10065dfce mov ecx, [rax+310h] ; +0x33, 0x10065dfd3 sub ecx, [rax+314h] ; +0x39, 0x10065dfd9 mov [rbp+var_48], ecx ; +0x3f, 0x10065dfdf call GameManager__sharedState ; +0x42, 0x10065dfe2 mov rcx, [r15+298h] ; +0x47, 0x10065dfe7 test rcx, rcx ; +0x4e, 0x10065dfee mov [rbp+var_38], r15 ; +0x51, 0x10065dff1 jz loc_10065E1F6 ; +0x55, 0x10065dff5 mov rdx, [rcx+38h] ; +0x5b, 0x10065dffb test rdx, rdx ; +0x5f, 0x10065dfff jz loc_10065E1F6 ; +0x62, 0x10065e002 mov ecx, [rax+31Ch] ; +0x68, 0x10065e008 sub ecx, [rax+320h] ; +0x6e, 0x10065e00e mov [rbp+var_44], ecx ; +0x74, 0x10065e014 jmp short loc_10065E048 ; +0x77, 0x10065e017 align 20h ; +0x79, 0x10065e019 mov [rbp+var_3E], 0FFh ; +0x80, 0x10065e020 mov [rbp+var_40], 0FFFFh ; +0x84, 0x10065e024 mov rax, [r13+0] ; +0x8a, 0x10065e02a mov rdi, r13 ; +0x8e, 0x10065e02e lea rsi, [rbp+var_40] ; +0x91, 0x10065e031 call qword ptr [rax+3B0h] ; +0x95, 0x10065e035 mov rdx, [rbp+var_58] ; +0x9b, 0x10065e03b test rdx, rdx ; +0x9f, 0x10065e03f jz loc_10065E1F6 ; +0xa2, 0x10065e042 mov r13, [rdx+108h] ; +0xa8, 0x10065e048 mov rdx, [rdx+120h] ; +0xaf, 0x10065e04f mov [rbp+var_58], rdx ; +0xb6, 0x10065e056 mov rax, [r13+0] ; +0xba, 0x10065e05a mov rdi, r13 ; +0xbe, 0x10065e05e call qword ptr [rax+1F0h] ; +0xc1, 0x10065e061 mov rcx, [rax] ; +0xc7, 0x10065e067 mov rdi, rax ; +0xca, 0x10065e06a call qword ptr [rcx+40h] ; +0xcd, 0x10065e06d mov r12d, eax ; +0xd0, 0x10065e070 mov rax, [rbp+var_38] ; +0xd3, 0x10065e073 mov r15, [rax+240h] ; +0xd7, 0x10065e077 mov rax, [rbp+var_38] ; +0xde, 0x10065e07e mov r14, [rax+220h] ; +0xe2, 0x10065e082 mov rax, [r13+0] ; +0xe9, 0x10065e089 mov rdi, r13 ; +0xed, 0x10065e08d call qword ptr [rax+1F0h] ; +0xf0, 0x10065e090 mov rcx, [rax] ; +0xf6, 0x10065e096 mov rdi, rax ; +0xf9, 0x10065e099 call qword ptr [rcx+0C0h] ; +0xfc, 0x10065e09c lea rbx, [rbp+var_40] ; +0x102, 0x10065e0a2 mov rdi, rbx ; +0x106, 0x10065e0a6 mov rsi, r14 ; +0x109, 0x10065e0a9 mov rdx, rax ; +0x10c, 0x10065e0ac call cocos2d__CCNode__convertToWorldSpace ; +0x10f, 0x10065e0af lea r14, [rbp+var_30] ; +0x114, 0x10065e0b4 mov rdi, r14 ; +0x118, 0x10065e0b8 mov rsi, r15 ; +0x11b, 0x10065e0bb mov r15, [rbp+var_38] ; +0x11e, 0x10065e0be mov rdx, rbx ; +0x122, 0x10065e0c2 call cocos2d__CCNode__convertToNodeSpace ; +0x125, 0x10065e0c5 cmp r12d, [rbp+var_4C] ; +0x12a, 0x10065e0ca jz loc_10065E1A0 ; +0x12e, 0x10065e0ce cmp r12d, [rbp+var_48] ; +0x134, 0x10065e0d4 jz loc_10065E1C7 ; +0x138, 0x10065e0d8 cmp r12d, [rbp+var_44] ; +0x13e, 0x10065e0de jnz short loc_10065E104 ; +0x142, 0x10065e0e2 mov rdi, [r15+2A0h] ; +0x144, 0x10065e0e4 mov esi, 2 ; +0x14b, 0x10065e0eb call sub_1007200C0 ; +0x150, 0x10065e0f0 mov rcx, [rax] ; +0x155, 0x10065e0f5 mov rdi, rax ; +0x158, 0x10065e0f8 mov rsi, r14 ; +0x15b, 0x10065e0fb call qword ptr [rcx+0B8h] ; +0x15e, 0x10065e0fe call GameManager__sharedState ; +0x164, 0x10065e104 cmp dword ptr [r15+278h], 1 ; +0x169, 0x10065e109 mov edx, 3 ; +0x171, 0x10065e111 sbb edx, 0 ; +0x176, 0x10065e116 mov rdi, rax ; +0x179, 0x10065e119 mov esi, r12d ; +0x17c, 0x10065e11c call GameManager__isColorUnlocked ; +0x17f, 0x10065e11f mov r14d, eax ; +0x184, 0x10065e124 mov rax, [r13+0] ; +0x187, 0x10065e127 mov rdi, r13 ; +0x18b, 0x10065e12b mov esi, 64h ; 'd' ; +0x18e, 0x10065e12e call qword ptr [rax+1D0h] ; +0x193, 0x10065e133 mov r13, rax ; +0x199, 0x10065e139 mov eax, r14d ; +0x19c, 0x10065e13c xor al, 1 ; +0x19f, 0x10065e13f mov rcx, [r13+0] ; +0x1a1, 0x10065e141 movzx esi, al ; +0x1a5, 0x10065e145 mov rdi, r13 ; +0x1a8, 0x10065e148 call qword ptr [rcx+148h] ; +0x1ab, 0x10065e14b test r14b, r14b ; +0x1b1, 0x10065e151 jnz loc_10065E020 ; +0x1b4, 0x10065e154 call GameStatsManager__sharedState ; +0x1ba, 0x10065e15a cmp dword ptr [r15+278h], 1 ; +0x1bf, 0x10065e15f mov edx, 3 ; +0x1c7, 0x10065e167 sbb edx, 0 ; +0x1cc, 0x10065e16c mov rdi, rax ; +0x1cf, 0x10065e16f mov esi, r12d ; +0x1d2, 0x10065e172 call GameStatsManager__getItemUnlockState ; +0x1d5, 0x10065e175 test eax, eax ; +0x1da, 0x10065e17a jnz loc_10065E020 ; +0x1dc, 0x10065e17c mov [rbp+var_3E], 0 ; +0x1e2, 0x10065e182 mov [rbp+var_40], 0FF00h ; +0x1e6, 0x10065e186 jmp loc_10065E02A ; +0x1ec, 0x10065e18c align 20h ; +0x1f1, 0x10065e191 mov rdi, [r15+2A0h] ; +0x200, 0x10065e1a0 xor esi, esi ; +0x207, 0x10065e1a7 call sub_1007200C0 ; +0x209, 0x10065e1a9 mov rcx, [rax] ; +0x20e, 0x10065e1ae mov rdi, rax ; +0x211, 0x10065e1b1 mov rsi, r14 ; +0x214, 0x10065e1b4 call qword ptr [rcx+0B8h] ; +0x217, 0x10065e1b7 cmp r12d, [rbp+var_48] ; +0x21d, 0x10065e1bd jnz loc_10065E0DE ; +0x221, 0x10065e1c1 mov rdi, [r15+2A0h] ; +0x227, 0x10065e1c7 mov esi, 1 ; +0x22e, 0x10065e1ce call sub_1007200C0 ; +0x233, 0x10065e1d3 mov rcx, [rax] ; +0x238, 0x10065e1d8 mov rdi, rax ; +0x23b, 0x10065e1db mov rsi, r14 ; +0x23e, 0x10065e1de call qword ptr [rcx+0B8h] ; +0x241, 0x10065e1e1 cmp r12d, [rbp+var_44] ; +0x247, 0x10065e1e7 jz loc_10065E0E4 ; +0x24b, 0x10065e1eb jmp loc_10065E104 ; +0x251, 0x10065e1f1 mov rdi, [r15+2A0h] ; +0x256, 0x10065e1f6 xor esi, esi ; +0x25d, 0x10065e1fd call sub_1007200C0 ; +0x25f, 0x10065e1ff mov r14, rax ; +0x264, 0x10065e204 mov rdi, [r15+290h] ; +0x267, 0x10065e207 xor esi, esi ; +0x26e, 0x10065e20e call sub_1007200C0 ; +0x270, 0x10065e210 mov rcx, r15 ; +0x275, 0x10065e215 mov r15, rax ; +0x278, 0x10065e218 cmp dword ptr [rcx+278h], 0 ; +0x27b, 0x10065e21b jz short loc_10065E24D ; +0x282, 0x10065e222 mov [rbp+var_2E], 32h ; '2' ; +0x284, 0x10065e224 mov [rbp+var_30], 3232h ; +0x288, 0x10065e228 mov rax, [r14] ; +0x28e, 0x10065e22e lea rsi, [rbp+var_30] ; +0x291, 0x10065e231 mov rdi, r14 ; +0x295, 0x10065e235 call qword ptr [rax+3B0h] ; +0x298, 0x10065e238 lea r12, aGjButton04Png; "GJ_button_04.png" ; +0x29e, 0x10065e23e mov r13d, 1 ; +0x2a5, 0x10065e245 jmp short loc_10065E274 ; +0x2ab, 0x10065e24b mov [rbp+var_2E], 0FFh ; +0x2ad, 0x10065e24d mov [rbp+var_30], 0FFFFh ; +0x2b1, 0x10065e251 mov rax, [r14] ; +0x2b7, 0x10065e257 lea rsi, [rbp+var_30] ; +0x2ba, 0x10065e25a mov rdi, r14 ; +0x2be, 0x10065e25e call qword ptr [rax+3B0h] ; +0x2c1, 0x10065e261 lea r12, aGjButton01Png; "GJ_button_01.png" ; +0x2c7, 0x10065e267 mov r13d, 0Bh ; +0x2ce, 0x10065e26e mov rax, [r14] ; +0x2d4, 0x10065e274 mov rdi, r14 ; +0x2d7, 0x10065e277 call qword ptr [rax+1F0h] ; +0x2da, 0x10065e27a mov rcx, [rax] ; +0x2e0, 0x10065e280 mov rdi, rax ; +0x2e3, 0x10065e283 mov rsi, r14 ; +0x2e6, 0x10065e286 mov edx, r13d ; +0x2e9, 0x10065e289 call qword ptr [rcx+240h] ; +0x2ec, 0x10065e28c mov rdi, r15 ; +0x2f2, 0x10065e292 mov rsi, r12 ; +0x2f5, 0x10065e295 call ButtonSprite__updateBGImage ; +0x2f8, 0x10065e298 mov rbx, [rbp+var_38] ; +0x2fd, 0x10065e29d mov rdi, [rbx+2A0h] ; +0x301, 0x10065e2a1 mov r12d, 1 ; +0x308, 0x10065e2a8 mov esi, 1 ; +0x30e, 0x10065e2ae call sub_1007200C0 ; +0x313, 0x10065e2b3 mov r14, rax ; +0x318, 0x10065e2b8 mov rdi, [rbx+290h] ; +0x31b, 0x10065e2bb mov esi, 1 ; +0x322, 0x10065e2c2 call sub_1007200C0 ; +0x327, 0x10065e2c7 mov r15, rax ; +0x32c, 0x10065e2cc cmp dword ptr [rbx+278h], 1 ; +0x32f, 0x10065e2cf jnz short loc_10065E301 ; +0x336, 0x10065e2d6 mov [rbp+var_2E], 0FFh ; +0x338, 0x10065e2d8 mov [rbp+var_30], 0FFFFh ; +0x33c, 0x10065e2dc mov rax, [r14] ; +0x342, 0x10065e2e2 lea rsi, [rbp+var_30] ; +0x345, 0x10065e2e5 mov rdi, r14 ; +0x349, 0x10065e2e9 call qword ptr [rax+3B0h] ; +0x34c, 0x10065e2ec lea r13, aGjButton01Png; "GJ_button_01.png" ; +0x352, 0x10065e2f2 mov r12d, 0Bh ; +0x359, 0x10065e2f9 jmp short loc_10065E322 ; +0x35f, 0x10065e2ff mov [rbp+var_2E], 32h ; '2' ; +0x361, 0x10065e301 mov [rbp+var_30], 3232h ; +0x365, 0x10065e305 mov rax, [r14] ; +0x36b, 0x10065e30b lea rsi, [rbp+var_30] ; +0x36e, 0x10065e30e mov rdi, r14 ; +0x372, 0x10065e312 call qword ptr [rax+3B0h] ; +0x375, 0x10065e315 lea r13, aGjButton04Png; "GJ_button_04.png" ; +0x37b, 0x10065e31b mov rax, [r14] ; +0x382, 0x10065e322 mov rdi, r14 ; +0x385, 0x10065e325 call qword ptr [rax+1F0h] ; +0x388, 0x10065e328 mov rcx, [rax] ; +0x38e, 0x10065e32e mov rdi, rax ; +0x391, 0x10065e331 mov rsi, r14 ; +0x394, 0x10065e334 mov edx, r12d ; +0x397, 0x10065e337 call qword ptr [rcx+240h] ; +0x39a, 0x10065e33a mov rdi, r15 ; +0x3a0, 0x10065e340 mov rsi, r13 ; +0x3a3, 0x10065e343 call ButtonSprite__updateBGImage ; +0x3a6, 0x10065e346 mov rbx, [rbp+var_38] ; +0x3ab, 0x10065e34b mov rdi, [rbx+2A0h] ; +0x3af, 0x10065e34f mov esi, 2 ; +0x3b6, 0x10065e356 call sub_1007200C0 ; +0x3bb, 0x10065e35b mov r14, rax ; +0x3c0, 0x10065e360 mov rdi, [rbx+290h] ; +0x3c3, 0x10065e363 mov esi, 2 ; +0x3ca, 0x10065e36a call sub_1007200C0 ; +0x3cf, 0x10065e36f mov r15, rax ; +0x3d4, 0x10065e374 cmp dword ptr [rbx+278h], 2 ; +0x3d7, 0x10065e377 jnz short loc_10065E3A9 ; +0x3de, 0x10065e37e mov [rbp+var_2E], 0FFh ; +0x3e0, 0x10065e380 mov [rbp+var_30], 0FFFFh ; +0x3e4, 0x10065e384 mov rax, [r14] ; +0x3ea, 0x10065e38a lea rsi, [rbp+var_30] ; +0x3ed, 0x10065e38d mov rdi, r14 ; +0x3f1, 0x10065e391 call qword ptr [rax+3B0h] ; +0x3f4, 0x10065e394 lea r12, aGjButton01Png; "GJ_button_01.png" ; +0x3fa, 0x10065e39a mov r13d, 0Bh ; +0x401, 0x10065e3a1 jmp short loc_10065E3D0 ; +0x407, 0x10065e3a7 mov [rbp+var_2E], 32h ; '2' ; +0x409, 0x10065e3a9 mov [rbp+var_30], 3232h ; +0x40d, 0x10065e3ad mov rax, [r14] ; +0x413, 0x10065e3b3 lea rsi, [rbp+var_30] ; +0x416, 0x10065e3b6 mov rdi, r14 ; +0x41a, 0x10065e3ba call qword ptr [rax+3B0h] ; +0x41d, 0x10065e3bd lea r12, aGjButton04Png; "GJ_button_04.png" ; +0x423, 0x10065e3c3 mov r13d, 1 ; +0x42a, 0x10065e3ca mov rax, [r14] ; +0x430, 0x10065e3d0 mov rdi, r14 ; +0x433, 0x10065e3d3 call qword ptr [rax+1F0h] ; +0x436, 0x10065e3d6 mov rcx, [rax] ; +0x43c, 0x10065e3dc mov rdi, rax ; +0x43f, 0x10065e3df mov rsi, r14 ; +0x442, 0x10065e3e2 mov edx, r13d ; +0x445, 0x10065e3e5 call qword ptr [rcx+240h] ; +0x448, 0x10065e3e8 mov rdi, r15 ; +0x44e, 0x10065e3ee mov rsi, r12 ; +0x451, 0x10065e3f1 call ButtonSprite__updateBGImage ; +0x454, 0x10065e3f4 xor r14d, r14d ; +0x459, 0x10065e3f9 mov rbx, [rbp+var_38] ; +0x45c, 0x10065e3fc cmp dword ptr [rbx+278h], 2 ; +0x460, 0x10065e400 setz r14b ; +0x467, 0x10065e407 mov rdi, [rbx+2B0h] ; +0x46b, 0x10065e40b mov rax, [rdi] ; +0x472, 0x10065e412 mov esi, r14d ; +0x475, 0x10065e415 call qword ptr [rax+410h] ; +0x478, 0x10065e418 mov rdi, [rbx+2B0h] ; +0x47e, 0x10065e41e mov rax, [rdi] ; +0x485, 0x10065e425 mov esi, r14d ; +0x488, 0x10065e428 call qword ptr [rax+148h] ; +0x48b, 0x10065e42b mov rdi, [rbx+2B8h] ; +0x491, 0x10065e431 mov rax, [rdi] ; +0x498, 0x10065e438 mov esi, r14d ; +0x49b, 0x10065e43b call qword ptr [rax+148h] ; +0x49e, 0x10065e43e add rsp, 38h ; +0x4a4, 0x10065e444 pop rbx ; +0x4a8, 0x10065e448 pop r12 ; +0x4a9, 0x10065e449 pop r13 ; +0x4ab, 0x10065e44b pop r14 ; +0x4ad, 0x10065e44d pop r15 ; +0x4af, 0x10065e44f pop rbp ; +0x4b1, 0x10065e451 retn ; +0x4b2, 0x10065e452