; ; CharacterColorPage::onPlayerColor from 0x10065e4d0 to 0x10065e717 (583 bytes) ; ; 1 xrefs: ; > CharacterColorPage::createColorMenu @ 0x10065ddea ; ; 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, 0x10065e4d0 mov rbp, rsp ; +0x1, 0x10065e4d1 push r15 ; +0x4, 0x10065e4d4 push r14 ; +0x6, 0x10065e4d6 push r13 ; +0x8, 0x10065e4d8 push r12 ; +0xa, 0x10065e4da push rbx ; +0xc, 0x10065e4dc sub rsp, 18h ; +0xd, 0x10065e4dd mov r14, rsi ; +0x11, 0x10065e4e1 mov rbx, rdi ; +0x14, 0x10065e4e4 cmp dword ptr [rdi+278h], 1 ; +0x17, 0x10065e4e7 mov r12d, 3 ; +0x1e, 0x10065e4ee sbb r12d, 0 ; +0x24, 0x10065e4f4 mov rax, [rsi] ; +0x28, 0x10065e4f8 mov rdi, rsi ; +0x2b, 0x10065e4fb call qword ptr [rax+40h] ; +0x2e, 0x10065e4fe mov r15d, eax ; +0x31, 0x10065e501 call GameManager__sharedState ; +0x34, 0x10065e504 mov rdi, rax ; +0x39, 0x10065e509 mov esi, r15d ; +0x3c, 0x10065e50c mov edx, r12d ; +0x3f, 0x10065e50f call GameManager__isColorUnlocked ; +0x42, 0x10065e512 test al, al ; +0x47, 0x10065e517 jz short loc_10065E55F ; +0x49, 0x10065e519 mov eax, [rbx+278h] ; +0x4b, 0x10065e51b cmp eax, 2 ; +0x51, 0x10065e521 jz short loc_10065E58C ; +0x54, 0x10065e524 cmp eax, 1 ; +0x56, 0x10065e526 jz short loc_10065E549 ; +0x59, 0x10065e529 xor ecx, ecx ; +0x5b, 0x10065e52b test eax, eax ; +0x5d, 0x10065e52d jnz short loc_10065E55A ; +0x5f, 0x10065e52f call GameManager__sharedState ; +0x61, 0x10065e531 mov ecx, [rax+304h] ; +0x66, 0x10065e536 sub ecx, [rax+308h] ; +0x6c, 0x10065e53c cmp ecx, r15d ; +0x72, 0x10065e542 jz short loc_10065E55F ; +0x75, 0x10065e545 jmp short loc_10065E5A2 ; +0x77, 0x10065e547 call GameManager__sharedState ; +0x79, 0x10065e549 mov ecx, [rax+310h] ; +0x7e, 0x10065e54e sub ecx, [rax+314h] ; +0x84, 0x10065e554 cmp ecx, r15d ; +0x8a, 0x10065e55a jnz short loc_10065E5A2 ; +0x8d, 0x10065e55d mov rdi, [rbx+2A8h] ; +0x8f, 0x10065e55f test rdi, rdi ; +0x96, 0x10065e566 jz loc_10065E708 ; +0x99, 0x10065e569 mov rax, [rdi] ; +0x9f, 0x10065e56f mov rax, [rax+8] ; +0xa2, 0x10065e572 mov esi, r15d ; +0xa6, 0x10065e576 mov edx, r12d ; +0xa9, 0x10065e579 add rsp, 18h ; +0xac, 0x10065e57c pop rbx ; +0xb0, 0x10065e580 pop r12 ; +0xb1, 0x10065e581 pop r13 ; +0xb3, 0x10065e583 pop r14 ; +0xb5, 0x10065e585 pop r15 ; +0xb7, 0x10065e587 pop rbp ; +0xb9, 0x10065e589 jmp rax ; +0xba, 0x10065e58a call GameManager__sharedState ; +0xbc, 0x10065e58c mov ecx, [rax+31Ch] ; +0xc1, 0x10065e591 sub ecx, [rax+320h] ; +0xc7, 0x10065e597 cmp ecx, r15d ; +0xcd, 0x10065e59d jz short loc_10065E55F ; +0xd0, 0x10065e5a0 call GameManager__sharedState ; +0xd2, 0x10065e5a2 mov byte ptr [rax+268h], 0 ; +0xd7, 0x10065e5a7 call GameManager__sharedState ; +0xde, 0x10065e5ae mov rdi, rax ; +0xe3, 0x10065e5b3 mov esi, r15d ; +0xe6, 0x10065e5b6 call GameManager__colorForIdx ; +0xe9, 0x10065e5b9 mov eax, [rbx+278h] ; +0xee, 0x10065e5be cmp eax, 2 ; +0xf4, 0x10065e5c4 jz loc_10065E65F ; +0xf7, 0x10065e5c7 cmp eax, 1 ; +0xfd, 0x10065e5cd jz short loc_10065E61E ; +0x100, 0x10065e5d0 test eax, eax ; +0x102, 0x10065e5d2 jnz loc_10065E69E ; +0x104, 0x10065e5d4 call GameManager__sharedState ; +0x10a, 0x10065e5da mov r12, rax ; +0x10f, 0x10065e5df mov [rax+30Ch], r15d ; +0x112, 0x10065e5e2 call _rand ; +0x119, 0x10065e5e9 cvtsi2ss xmm0, eax ; +0x11e, 0x10065e5ee mulss xmm0, cs:dword_100815710 ; +0x122, 0x10065e5f2 mulss xmm0, cs:dword_1008152B8 ; +0x12a, 0x10065e5fa cvttss2si eax, xmm0 ; +0x132, 0x10065e602 mov [r12+308h], eax ; +0x136, 0x10065e606 add r15d, eax ; +0x13e, 0x10065e60e mov [r12+304h], r15d ; +0x141, 0x10065e611 jmp loc_10065E69E ; +0x149, 0x10065e619 call GameManager__sharedState ; +0x14e, 0x10065e61e mov r12, rax ; +0x153, 0x10065e623 mov [rax+318h], r15d ; +0x156, 0x10065e626 call _rand ; +0x15d, 0x10065e62d cvtsi2ss xmm0, eax ; +0x162, 0x10065e632 mulss xmm0, cs:dword_100815710 ; +0x166, 0x10065e636 mulss xmm0, cs:dword_1008152B8 ; +0x16e, 0x10065e63e cvttss2si eax, xmm0 ; +0x176, 0x10065e646 mov [r12+314h], eax ; +0x17a, 0x10065e64a add r15d, eax ; +0x182, 0x10065e652 mov [r12+310h], r15d ; +0x185, 0x10065e655 jmp short loc_10065E69E ; +0x18d, 0x10065e65d call GameManager__sharedState ; +0x18f, 0x10065e65f mov r12, rax ; +0x194, 0x10065e664 mov [rax+324h], r15d ; +0x197, 0x10065e667 call _rand ; +0x19e, 0x10065e66e cvtsi2ss xmm0, eax ; +0x1a3, 0x10065e673 mulss xmm0, cs:dword_100815710 ; +0x1a7, 0x10065e677 mulss xmm0, cs:dword_1008152B8 ; +0x1af, 0x10065e67f cvttss2si eax, xmm0 ; +0x1b7, 0x10065e687 mov [r12+320h], eax ; +0x1bb, 0x10065e68b add r15d, eax ; +0x1c3, 0x10065e693 mov [r12+31Ch], r15d ; +0x1c6, 0x10065e696 mov rdi, [rbx+2A0h] ; +0x1ce, 0x10065e69e mov esi, [rbx+278h] ; +0x1d5, 0x10065e6a5 call sub_1007200C0 ; +0x1db, 0x10065e6ab mov r15, rax ; +0x1e0, 0x10065e6b0 mov r12, [rbx+240h] ; +0x1e3, 0x10065e6b3 mov r13, [rbx+220h] ; +0x1ea, 0x10065e6ba mov rax, [r14] ; +0x1f1, 0x10065e6c1 mov rdi, r14 ; +0x1f4, 0x10065e6c4 call qword ptr [rax+0C0h] ; +0x1f7, 0x10065e6c7 lea r14, [rbp+var_30] ; +0x1fd, 0x10065e6cd mov rdi, r14 ; +0x201, 0x10065e6d1 mov rsi, r13 ; +0x204, 0x10065e6d4 mov rdx, rax ; +0x207, 0x10065e6d7 call cocos2d__CCNode__convertToWorldSpace ; +0x20a, 0x10065e6da lea r13, [rbp+var_38] ; +0x20f, 0x10065e6df mov rdi, r13 ; +0x213, 0x10065e6e3 mov rsi, r12 ; +0x216, 0x10065e6e6 mov rdx, r14 ; +0x219, 0x10065e6e9 call cocos2d__CCNode__convertToNodeSpace ; +0x21c, 0x10065e6ec mov rax, [r15] ; +0x221, 0x10065e6f1 mov rdi, r15 ; +0x224, 0x10065e6f4 mov rsi, r13 ; +0x227, 0x10065e6f7 call qword ptr [rax+0B8h] ; +0x22a, 0x10065e6fa mov rdi, rbx ; +0x230, 0x10065e700 call CharacterColorPage__updateIconColors ; +0x233, 0x10065e703 add rsp, 18h ; +0x238, 0x10065e708 pop rbx ; +0x23c, 0x10065e70c pop r12 ; +0x23d, 0x10065e70d pop r13 ; +0x23f, 0x10065e70f pop r14 ; +0x241, 0x10065e711 pop r15 ; +0x243, 0x10065e713 pop rbp ; +0x245, 0x10065e715 retn ; +0x246, 0x10065e716