; ; BrowseSmartKeyLayer::addChanceToSelected from 0x1004e6660 to 0x1004e681d (445 bytes) ; ; 2 xrefs: ; > BrowseSmartKeyLayer::onButton @ 0x1004e62e7 ; > BrowseSmartKeyLayer::onButton @ 0x1004e62fc ; ; 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 12:31:20 +0000 ; push rbp ; +0x0, 0x1004e6660 mov rbp, rsp ; +0x1, 0x1004e6661 push r15 ; +0x4, 0x1004e6664 push r14 ; +0x6, 0x1004e6666 push r13 ; +0x8, 0x1004e6668 push r12 ; +0xa, 0x1004e666a push rbx ; +0xc, 0x1004e666c sub rsp, 28h ; +0xd, 0x1004e666d mov r15d, edx ; +0x11, 0x1004e6671 mov [rbp+var_44], esi ; +0x14, 0x1004e6674 mov rbx, rdi ; +0x17, 0x1004e6677 call BrowseSmartKeyLayer__getAllSelectedBlocks ; +0x1a, 0x1004e667a mov r14, rax ; +0x1f, 0x1004e667f mov rdi, rax ; +0x22, 0x1004e6682 call sub_1007FEF90 ; +0x25, 0x1004e6685 test eax, eax ; +0x2a, 0x1004e668a jz loc_1004E6806 ; +0x2c, 0x1004e668c lea rax, [rbx+2C8h] ; +0x32, 0x1004e6692 mov [rbp+var_50], rax ; +0x39, 0x1004e6699 test r15b, r15b ; +0x3d, 0x1004e669d jz loc_1004E6758 ; +0x40, 0x1004e66a0 xor r15d, r15d ; +0x46, 0x1004e66a6 jmp short loc_1004E66C4 ; +0x49, 0x1004e66a9 align 10h ; +0x4b, 0x1004e66ab inc r15d ; +0x50, 0x1004e66b0 mov rdi, r14 ; +0x53, 0x1004e66b3 call sub_1007FEF90 ; +0x56, 0x1004e66b6 cmp r15d, eax ; +0x5b, 0x1004e66bb jnb loc_1004E6806 ; +0x5e, 0x1004e66be mov rdi, r14 ; +0x64, 0x1004e66c4 mov esi, r15d ; +0x67, 0x1004e66c7 call sub_1007FEFE0 ; +0x6a, 0x1004e66ca mov r12, rax ; +0x6f, 0x1004e66cf mov r13, [rbx+298h] ; +0x72, 0x1004e66d2 test byte ptr [rbx+2C8h], 1 ; +0x79, 0x1004e66d9 jnz short loc_1004E6700 ; +0x80, 0x1004e66e0 mov rcx, [rbp+var_50] ; +0x82, 0x1004e66e2 mov rax, [rcx+10h] ; +0x86, 0x1004e66e6 mov [rbp+__p], rax ; +0x8a, 0x1004e66ea movups xmm0, xmmword ptr [rcx] ; +0x8e, 0x1004e66ee movaps [rbp+var_40], xmm0 ; +0x91, 0x1004e66f1 jmp short loc_1004E6717 ; +0x95, 0x1004e66f5 align 20h ; +0x97, 0x1004e66f7 mov rdx, [rbx+2D0h] ; +0xa0, 0x1004e6700 mov rsi, [rbx+2D8h] ; +0xa7, 0x1004e6707 lea rdi, [rbp+var_40] ; +0xae, 0x1004e670e call sub_10001AD30 ; +0xb2, 0x1004e6712 mov rax, [r12] ; +0xb7, 0x1004e6717 mov rdi, r12 ; +0xbb, 0x1004e671b call qword ptr [rax+40h] ; +0xbe, 0x1004e671e mov rdi, r13 ; +0xc1, 0x1004e6721 lea rsi, [rbp+var_40] ; +0xc4, 0x1004e6724 mov edx, eax ; +0xc8, 0x1004e6728 call GJSmartTemplate__getPrefabWithID ; +0xca, 0x1004e672a mov r12, rax ; +0xcf, 0x1004e672f test byte ptr [rbp+var_40], 1 ; +0xd2, 0x1004e6732 jz short loc_1004E6741 ; +0xd6, 0x1004e6736 mov rdi, [rbp+__p]; __p ; +0xd8, 0x1004e6738 call __ZdlPv; operator delete(void *) ; +0xdc, 0x1004e673c test r12, r12 ; +0xe1, 0x1004e6741 jz loc_1004E66B0 ; +0xe4, 0x1004e6744 mov dword ptr [r12+6Ch], 0 ; +0xea, 0x1004e674a jmp loc_1004E66B0 ; +0xf3, 0x1004e6753 xor r12d, r12d ; +0xf8, 0x1004e6758 jmp short loc_1004E6774 ; +0xfb, 0x1004e675b align 20h ; +0xfd, 0x1004e675d inc r12d ; +0x100, 0x1004e6760 mov rdi, r14 ; +0x103, 0x1004e6763 call sub_1007FEF90 ; +0x106, 0x1004e6766 cmp r12d, eax ; +0x10b, 0x1004e676b jnb loc_1004E6806 ; +0x10e, 0x1004e676e mov rdi, r14 ; +0x114, 0x1004e6774 mov esi, r12d ; +0x117, 0x1004e6777 call sub_1007FEFE0 ; +0x11a, 0x1004e677a mov r13, rax ; +0x11f, 0x1004e677f mov r15, [rbx+298h] ; +0x122, 0x1004e6782 test byte ptr [rbx+2C8h], 1 ; +0x129, 0x1004e6789 jnz short loc_1004E67B0 ; +0x130, 0x1004e6790 mov rcx, [rbp+var_50] ; +0x132, 0x1004e6792 mov rax, [rcx+10h] ; +0x136, 0x1004e6796 mov [rbp+__p], rax ; +0x13a, 0x1004e679a movups xmm0, xmmword ptr [rcx] ; +0x13e, 0x1004e679e movaps [rbp+var_40], xmm0 ; +0x141, 0x1004e67a1 jmp short loc_1004E67C7 ; +0x145, 0x1004e67a5 align 10h ; +0x147, 0x1004e67a7 mov rdx, [rbx+2D0h] ; +0x150, 0x1004e67b0 mov rsi, [rbx+2D8h] ; +0x157, 0x1004e67b7 lea rdi, [rbp+var_40] ; +0x15e, 0x1004e67be call sub_10001AD30 ; +0x162, 0x1004e67c2 mov rax, [r13+0] ; +0x167, 0x1004e67c7 mov rdi, r13 ; +0x16b, 0x1004e67cb call qword ptr [rax+40h] ; +0x16e, 0x1004e67ce mov rdi, r15 ; +0x171, 0x1004e67d1 lea rsi, [rbp+var_40] ; +0x174, 0x1004e67d4 mov edx, eax ; +0x178, 0x1004e67d8 call GJSmartTemplate__getPrefabWithID ; +0x17a, 0x1004e67da mov r15, rax ; +0x17f, 0x1004e67df test byte ptr [rbp+var_40], 1 ; +0x182, 0x1004e67e2 jz short loc_1004E67F1 ; +0x186, 0x1004e67e6 mov rdi, [rbp+__p]; __p ; +0x188, 0x1004e67e8 call __ZdlPv; operator delete(void *) ; +0x18c, 0x1004e67ec test r15, r15 ; +0x191, 0x1004e67f1 jz loc_1004E6760 ; +0x194, 0x1004e67f4 mov eax, [rbp+var_44] ; +0x19a, 0x1004e67fa add [r15+6Ch], eax ; +0x19d, 0x1004e67fd jmp loc_1004E6760 ; +0x1a1, 0x1004e6801 mov rdi, rbx ; +0x1a6, 0x1004e6806 call BrowseSmartKeyLayer__updateChanceValues ; +0x1a9, 0x1004e6809 add rsp, 28h ; +0x1ae, 0x1004e680e pop rbx ; +0x1b2, 0x1004e6812 pop r12 ; +0x1b3, 0x1004e6813 pop r13 ; +0x1b5, 0x1004e6815 pop r14 ; +0x1b7, 0x1004e6817 pop r15 ; +0x1b9, 0x1004e6819 pop rbp ; +0x1bb, 0x1004e681b retn ; +0x1bc, 0x1004e681c