{"type": "func", "start": 5371894224, "end": 5371894406, "name": "SelectListIconLayer::onSelect", "pseudocode": "// \n// SelectListIconLayer::onSelect from 0x1403099d0 to 0x140309a86 (182 bytes)\n// \n// 4 xrefs:\n// > SelectListIconLayer::init @ 0x140309590\n// > <???> @ 0x140691d04\n// > <???> @ 0x140691d14\n// > <???> @ 0x1406d4604\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid SelectListIconLayer::onSelect(SelectListIconLayer *a1, cocos2d::CCObject *a2)\n{\n  unsigned int i; // ebx\n  struct cocos2d::CCObject *v4; // rdi\n  int v5; // eax\n  void (__fastcall *v6)(int *, __int16 *); // r8\n  __int16 *v7; // rdx\n  _BYTE v8[3]; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( a2 )\n    a1->m_currentDifficulty = a2->getTag(a2);\n  for ( i = 0; i < cocos2d::CCArray::count(a1->m_difficulties); ++i )\n  {\n    v4 = cocos2d::CCArray::objectAtIndex(a1->m_difficulties, i);\n    v5 = v4->getTag(v4);\n    v6 = **(void (__fastcall ***)(int *, __int16 *))&v4[5].m_unknown2;\n    if ( a1->m_currentDifficulty == v5 )\n    {\n      v7 = &word_140529B54;\n    }\n    else\n    {\n      memset(v8, 125, sizeof(v8));\n      v7 = (__int16 *)v8;\n    }\n    v6(&v4[5].m_unknown2, v7);\n  }\n}", "assembly": "; \n; SelectListIconLayer::onSelect from 0x1403099d0 to 0x140309a86 (182 bytes)\n; \n; 4 xrefs:\n; > SelectListIconLayer::init @ 0x140309590\n; > <???> @ 0x140691d04\n; > <???> @ 0x140691d14\n; > <???> @ 0x1406d4604\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1403099d0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1403099d5\npush    r14                                                            ; +0xa, 0x1403099da\nsub     rsp, 20h                                                       ; +0xc, 0x1403099dc\nmov     rsi, rcx                                                       ; +0x10, 0x1403099e0\ntest    rdx, rdx                                                       ; +0x13, 0x1403099e3\njz      short loc_1403099F7                                            ; +0x16, 0x1403099e6\nmov     rax, [rdx]                                                     ; +0x18, 0x1403099e8\nmov     rcx, rdx                                                       ; +0x1b, 0x1403099eb\ncall    qword ptr [rax+38h]                                            ; +0x1e, 0x1403099ee\nmov     [rsi+280h], eax                                                ; +0x21, 0x1403099f1\nmov     rcx, [rsi+278h]                                                ; +0x27, 0x1403099f7\nxor     ebx, ebx                                                       ; +0x2e, 0x1403099fe\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x30, 0x140309a00\ntest    eax, eax                                                       ; +0x36, 0x140309a06\njz      short loc_140309A75                                            ; +0x38, 0x140309a08\nmov     [rsp+28h+arg_8], rdi                                           ; +0x3a, 0x140309a0a\nnop                                                                    ; +0x3f, 0x140309a0f\nmov     rcx, [rsi+278h]                                                ; +0x40, 0x140309a10\nmov     edx, ebx                                                       ; +0x47, 0x140309a17\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x49, 0x140309a19\nmov     rcx, rax                                                       ; +0x4f, 0x140309a1f\nmov     rdi, rax                                                       ; +0x52, 0x140309a22\nmov     rdx, [rax]                                                     ; +0x55, 0x140309a25\ncall    qword ptr [rdx+38h]                                            ; +0x58, 0x140309a28\nlea     rcx, [rdi+140h]                                                ; +0x5b, 0x140309a2b\nmov     rdx, [rcx]                                                     ; +0x62, 0x140309a32\nmov     r8, [rdx]                                                      ; +0x65, 0x140309a35\ncmp     [rsi+280h], eax                                                ; +0x68, 0x140309a38\njz      short loc_140309A53                                            ; +0x6e, 0x140309a3e\nmov     [rsp+28h+arg_0], 7D7Dh                                         ; +0x70, 0x140309a40\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x77, 0x140309a47\nmov     [rsp+28h+arg_2], 7Dh ; '}'                                     ; +0x7c, 0x140309a4c\njmp     short loc_140309A5A                                            ; +0x81, 0x140309a51\nlea     rdx, word_140529B54                                            ; +0x83, 0x140309a53\ncall    r8                                                             ; +0x8a, 0x140309a5a\nmov     rcx, [rsi+278h]                                                ; +0x8d, 0x140309a5d\ninc     ebx                                                            ; +0x94, 0x140309a64\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x96, 0x140309a66\ncmp     ebx, eax                                                       ; +0x9c, 0x140309a6c\njb      short loc_140309A10                                            ; +0x9e, 0x140309a6e\nmov     rdi, [rsp+28h+arg_8]                                           ; +0xa0, 0x140309a70\nmov     rbx, [rsp+28h+arg_10]                                          ; +0xa5, 0x140309a75\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xaa, 0x140309a7a\nadd     rsp, 20h                                                       ; +0xaf, 0x140309a7f\npop     r14                                                            ; +0xb3, 0x140309a83\nretn                                                                   ; +0xb5, 0x140309a85", "xrefs": ["SelectListIconLayer::init @ 0x140309590", "<???> @ 0x140691d04", "<???> @ 0x140691d14", "<???> @ 0x1406d4604"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}