{"type": "func", "start": 5371997936, "end": 5371998124, "name": "SelectArtLayer::selectArt", "pseudocode": "// \n// SelectArtLayer::selectArt from 0x140322ef0 to 0x140322fac (188 bytes)\n// \n// 2 xrefs:\n// > SelectArtLayer::init @ 0x1403227bb\n// > <???> @ 0x1406d4ce8\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 SelectArtLayer::selectArt(SelectArtLayer *a1, cocos2d::CCObject *a2)\n{\n  unsigned int v3; // ebx\n  _BOOL8 i; // rbp\n  int *p_m_unknown2; // rcx\n  void (__fastcall *v6)(int *, _BYTE *); // r8\n  _BYTE *v7; // rdx\n  _BYTE v8[3]; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( a2 )\n    a1->m_art = a2->getTag(a2);\n  v3 = 0;\n  for ( i = a1->m_type <= (unsigned int)Ground; v3 < cocos2d::CCArray::count(a1->m_artSprites); ++v3 )\n  {\n    p_m_unknown2 = &cocos2d::CCArray::objectAtIndex(a1->m_artSprites, v3)[5].m_unknown2;\n    v6 = **(void (__fastcall ***)(int *, _BYTE *))p_m_unknown2;\n    if ( a1->m_art == v3 + i )\n    {\n      v7 = &unk_140529B78;\n    }\n    else\n    {\n      memset(v8, 125, sizeof(v8));\n      v7 = v8;\n    }\n    v6(p_m_unknown2, v7);\n  }\n}", "assembly": "; \n; SelectArtLayer::selectArt from 0x140322ef0 to 0x140322fac (188 bytes)\n; \n; 2 xrefs:\n; > SelectArtLayer::init @ 0x1403227bb\n; > <???> @ 0x1406d4ce8\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_8], rbx                                               ; +0x0, 0x140322ef0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140322ef5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140322efa\npush    rdi                                                            ; +0xf, 0x140322eff\nsub     rsp, 20h                                                       ; +0x10, 0x140322f00\nmov     rdi, rcx                                                       ; +0x14, 0x140322f04\ntest    rdx, rdx                                                       ; +0x17, 0x140322f07\njz      short loc_140322F1B                                            ; +0x1a, 0x140322f0a\nmov     rax, [rdx]                                                     ; +0x1c, 0x140322f0c\nmov     rcx, rdx                                                       ; +0x1f, 0x140322f0f\ncall    qword ptr [rax+38h]                                            ; +0x22, 0x140322f12\nmov     [rdi+288h], eax                                                ; +0x25, 0x140322f15\nmov     rcx, [rdi+278h]                                                ; +0x2b, 0x140322f1b\nxor     ebx, ebx                                                       ; +0x32, 0x140322f22\ncmp     dword ptr [rdi+290h], 1                                        ; +0x34, 0x140322f24\nmov     ebp, ebx                                                       ; +0x3b, 0x140322f2b\nsetbe   bpl                                                            ; +0x3d, 0x140322f2d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x41, 0x140322f31\ntest    eax, eax                                                       ; +0x47, 0x140322f37\njz      short loc_140322F97                                            ; +0x49, 0x140322f39\nnop     dword ptr [rax+rax+00h]                                        ; +0x4b, 0x140322f3b\nmov     rcx, [rdi+278h]                                                ; +0x50, 0x140322f40\nmov     edx, ebx                                                       ; +0x57, 0x140322f47\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x59, 0x140322f49\nlea     rcx, [rax+140h]                                                ; +0x5f, 0x140322f4f\nmov     rax, [rcx]                                                     ; +0x66, 0x140322f56\nmov     r8, [rax]                                                      ; +0x69, 0x140322f59\nlea     eax, [rbx+rbp]                                                 ; +0x6c, 0x140322f5c\ncmp     [rdi+288h], eax                                                ; +0x6f, 0x140322f5f\njz      short loc_140322F7A                                            ; +0x75, 0x140322f65\nmov     [rsp+28h+arg_0], 7D7Dh                                         ; +0x77, 0x140322f67\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x7e, 0x140322f6e\nmov     [rsp+28h+arg_2], 7Dh ; '}'                                     ; +0x83, 0x140322f73\njmp     short loc_140322F81                                            ; +0x88, 0x140322f78\nlea     rdx, unk_140529B78                                             ; +0x8a, 0x140322f7a\ncall    r8                                                             ; +0x91, 0x140322f81\nmov     rcx, [rdi+278h]                                                ; +0x94, 0x140322f84\ninc     ebx                                                            ; +0x9b, 0x140322f8b\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x9d, 0x140322f8d\ncmp     ebx, eax                                                       ; +0xa3, 0x140322f93\njb      short loc_140322F40                                            ; +0xa5, 0x140322f95\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xa7, 0x140322f97\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xac, 0x140322f9c\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xb1, 0x140322fa1\nadd     rsp, 20h                                                       ; +0xb6, 0x140322fa6\npop     rdi                                                            ; +0xba, 0x140322faa\nretn                                                                   ; +0xbb, 0x140322fab", "xrefs": ["SelectArtLayer::init @ 0x1403227bb", "<???> @ 0x1406d4ce8"], "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"}