{"type": "func", "start": 5372678432, "end": 5372678804, "name": "RateDemonLayer::selectRating", "pseudocode": "// \n// RateDemonLayer::selectRating from 0x1403c9120 to 0x1403c9294 (372 bytes)\n// \n// 5 xrefs:\n// > RateDemonLayer::init @ 0x1403c90ef\n// > RateDemonLayer::init @ 0x1403c8da3\n// > <???> @ 0x14069b958\n// > <???> @ 0x14069b990\n// > <???> @ 0x1406d79a0\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 RateDemonLayer::selectRating(RateDemonLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // eax\n  unsigned int v4; // esi\n  struct cocos2d::CCObject *v5; // rdi\n  __int64 v6; // rbx\n  int v7; // eax\n  __int16 *v8; // rdx\n  CCMenuItemSpriteExtra *m_submitButton; // rcx\n  char v10; // al\n  cocos2d::CCNode *v11; // rbx\n  cocos2d::CCComponentContainer *m_pComponentContainer; // rcx\n  __int64 v13; // rcx\n  cocos2d::CCNode_vtbl *v14; // rcx\n  __int16 v15; // [rsp+30h] [rbp+8h] BYREF\n  char v16; // [rsp+32h] [rbp+Ah]\n\n  if ( a2 )\n    v3 = a2->getTag(a2);\n  else\n    v3 = -1;\n  v4 = 0;\n  for ( a1->m_demonRate = v3; v4 < cocos2d::CCArray::count(a1->m_demons); ++v4 )\n  {\n    v5 = cocos2d::CCArray::objectAtIndex(a1->m_demons, v4);\n    v6 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v5->__vftable[13].copyWithZone)(v5);\n    v7 = v5->getTag(v5);\n    v8 = &word_140529BC0;\n    if ( a1->m_demonRate == v7 )\n      v8 = &word_140529BC4;\n    (**(void (__fastcall ***)(__int64, __int16 *))(v6 + 320))(v6 + 320, v8);\n  }\n  m_submitButton = a1->m_submitButton;\n  if ( a1->m_demonRate == -1 )\n  {\n    v15 = -22874;\n    v10 = -90;\n  }\n  else\n  {\n    v15 = -1;\n    v10 = -1;\n  }\n  v16 = v10;\n  v11 = m_submitButton->getNormalImage(m_submitButton);\n  m_pComponentContainer = v11[1].m_pComponentContainer;\n  if ( m_pComponentContainer )\n    ((void (__fastcall *)(cocos2d::CCDictionary **, __int16 *))m_pComponentContainer[15].m_pComponents->__vftable)(\n      &m_pComponentContainer[15].m_pComponents,\n      &v15);\n  v13 = *(_QWORD *)&v11[1].m_bUseChildIndex;\n  if ( v13 )\n    (**(void (__fastcall ***)(__int64, __int16 *))(v13 + 320))(v13 + 320, &v15);\n  v14 = *(cocos2d::CCNode_vtbl **)&v11[2].m_uID;\n  if ( v14 || (v14 = v11[2].__vftable) != nullptr )\n    (*(void (__fastcall **)(__int64, __int16 *))v14->setVisible)((__int64)&v14->setVisible, &v15);\n}", "assembly": "; \n; RateDemonLayer::selectRating from 0x1403c9120 to 0x1403c9294 (372 bytes)\n; \n; 5 xrefs:\n; > RateDemonLayer::init @ 0x1403c90ef\n; > RateDemonLayer::init @ 0x1403c8da3\n; > <???> @ 0x14069b958\n; > <???> @ 0x14069b990\n; > <???> @ 0x1406d79a0\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\npush    rbp                                                            ; +0x0, 0x1403c9120\nsub     rsp, 20h                                                       ; +0x2, 0x1403c9122\nmov     [rsp+28h+arg_10], rsi                                          ; +0x6, 0x1403c9126\nmov     rbp, rcx                                                       ; +0xb, 0x1403c912b\ntest    rdx, rdx                                                       ; +0xe, 0x1403c912e\njz      short loc_1403C913E                                            ; +0x11, 0x1403c9131\nmov     rax, [rdx]                                                     ; +0x13, 0x1403c9133\nmov     rcx, rdx                                                       ; +0x16, 0x1403c9136\ncall    qword ptr [rax+38h]                                            ; +0x19, 0x1403c9139\njmp     short loc_1403C9143                                            ; +0x1c, 0x1403c913c\nmov     eax, 0FFFFFFFFh                                                ; +0x1e, 0x1403c913e\nmov     [rsp+28h+arg_8], rbx                                           ; +0x23, 0x1403c9143\nxor     esi, esi                                                       ; +0x28, 0x1403c9148\nmov     [rbp+2ACh], eax                                                ; +0x2a, 0x1403c914a\nmov     rcx, [rbp+298h]                                                ; +0x30, 0x1403c9150\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x37, 0x1403c9157\ntest    eax, eax                                                       ; +0x3d, 0x1403c915d\njz      short loc_1403C91D8                                            ; +0x3f, 0x1403c915f\nmov     [rsp+28h+arg_18], rdi                                          ; +0x41, 0x1403c9161\nnop     word ptr [rax+rax+00000000h]                                   ; +0x46, 0x1403c9166\nmov     rcx, [rbp+298h]                                                ; +0x50, 0x1403c9170\nmov     edx, esi                                                       ; +0x57, 0x1403c9177\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x59, 0x1403c9179\nmov     rcx, rax                                                       ; +0x5f, 0x1403c917f\nmov     rdi, rax                                                       ; +0x62, 0x1403c9182\nmov     rdx, [rax]                                                     ; +0x65, 0x1403c9185\ncall    qword ptr [rdx+3A8h]                                           ; +0x68, 0x1403c9188\nmov     rdx, [rdi]                                                     ; +0x6e, 0x1403c918e\nmov     rcx, rdi                                                       ; +0x71, 0x1403c9191\nmov     rbx, rax                                                       ; +0x74, 0x1403c9194\ncall    qword ptr [rdx+38h]                                            ; +0x77, 0x1403c9197\nlea     rcx, [rbx+140h]                                                ; +0x7a, 0x1403c919a\nmov     rdx, [rcx]                                                     ; +0x81, 0x1403c91a1\nmov     r8, [rdx]                                                      ; +0x84, 0x1403c91a4\nlea     rdx, word_140529BC0                                            ; +0x87, 0x1403c91a7\ncmp     [rbp+2ACh], eax                                                ; +0x8e, 0x1403c91ae\njnz     short loc_1403C91BD                                            ; +0x94, 0x1403c91b4\nlea     rdx, word_140529BC4                                            ; +0x96, 0x1403c91b6\ncall    r8                                                             ; +0x9d, 0x1403c91bd\nmov     rcx, [rbp+298h]                                                ; +0xa0, 0x1403c91c0\ninc     esi                                                            ; +0xa7, 0x1403c91c7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa9, 0x1403c91c9\ncmp     esi, eax                                                       ; +0xaf, 0x1403c91cf\njb      short loc_1403C9170                                            ; +0xb1, 0x1403c91d1\nmov     rdi, [rsp+28h+arg_18]                                          ; +0xb3, 0x1403c91d3\ncmp     dword ptr [rbp+2ACh], 0FFFFFFFFh                               ; +0xb8, 0x1403c91d8\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xbf, 0x1403c91df\nmov     rcx, [rbp+290h]                                                ; +0xc4, 0x1403c91e4\njnz     short loc_1403C9202                                            ; +0xcb, 0x1403c91eb\nmovzx   eax, cs:word_140529BC0                                         ; +0xcd, 0x1403c91ed\nmov     [rsp+28h+arg_0], ax                                            ; +0xd4, 0x1403c91f4\nmovzx   eax, cs:byte_140529BC2                                         ; +0xd9, 0x1403c91f9\njmp     short loc_1403C9215                                            ; +0xe0, 0x1403c9200\nmovzx   eax, cs:word_140529BC4                                         ; +0xe2, 0x1403c9202\nmov     [rsp+28h+arg_0], ax                                            ; +0xe9, 0x1403c9209\nmovzx   eax, cs:byte_140529BC6                                         ; +0xee, 0x1403c920e\nmov     [rsp+28h+arg_2], al                                            ; +0xf5, 0x1403c9215\nmov     rax, [rcx]                                                     ; +0xf9, 0x1403c9219\ncall    qword ptr [rax+3A8h]                                           ; +0xfc, 0x1403c921c\nmov     rbx, rax                                                       ; +0x102, 0x1403c9222\nmov     rcx, [rax+270h]                                                ; +0x105, 0x1403c9225\ntest    rcx, rcx                                                       ; +0x10c, 0x1403c922c\njz      short loc_1403C9243                                            ; +0x10f, 0x1403c922f\nadd     rcx, 170h                                                      ; +0x111, 0x1403c9231\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x118, 0x1403c9238\nmov     r8, [rcx]                                                      ; +0x11d, 0x1403c923d\ncall    qword ptr [r8]                                                 ; +0x120, 0x1403c9240\nmov     rcx, [rbx+278h]                                                ; +0x123, 0x1403c9243\ntest    rcx, rcx                                                       ; +0x12a, 0x1403c924a\njz      short loc_1403C9260                                            ; +0x12d, 0x1403c924d\nadd     rcx, 140h                                                      ; +0x12f, 0x1403c924f\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x136, 0x1403c9256\nmov     rax, [rcx]                                                     ; +0x13b, 0x1403c925b\ncall    qword ptr [rax]                                                ; +0x13e, 0x1403c925e\nmov     rcx, [rbx+288h]                                                ; +0x140, 0x1403c9260\ntest    rcx, rcx                                                       ; +0x147, 0x1403c9267\njnz     short loc_1403C9278                                            ; +0x14a, 0x1403c926a\nmov     rcx, [rbx+280h]                                                ; +0x14c, 0x1403c926c\ntest    rcx, rcx                                                       ; +0x153, 0x1403c9273\njz      short loc_1403C9289                                            ; +0x156, 0x1403c9276\nadd     rcx, 140h                                                      ; +0x158, 0x1403c9278\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x15f, 0x1403c927f\nmov     rax, [rcx]                                                     ; +0x164, 0x1403c9284\ncall    qword ptr [rax]                                                ; +0x167, 0x1403c9287\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x169, 0x1403c9289\nadd     rsp, 20h                                                       ; +0x16e, 0x1403c928e\npop     rbp                                                            ; +0x172, 0x1403c9292\nretn                                                                   ; +0x173, 0x1403c9293", "xrefs": ["RateDemonLayer::init @ 0x1403c90ef", "RateDemonLayer::init @ 0x1403c8da3", "<???> @ 0x14069b958", "<???> @ 0x14069b990", "<???> @ 0x1406d79a0"], "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"}