{"type": "func", "start": 4300800848, "end": 4300801209, "name": "GJLevelList::frameForListDifficulty", "pseudocode": "// \n// GJLevelList::frameForListDifficulty from 0x100590350 to 0x1005904b9 (361 bytes)\n// \n// 5 xrefs:\n// > LevelListCell::loadFromList @ 0x10022b205\n// > LevelListLayer::init @ 0x100347862\n// > LevelListLayer::updateStatsArt @ 0x100349803\n// > SelectListIconLayer::init @ 0x10034d089\n// > ShareListLayer::init @ 0x10034e6e5\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:32:26 +0000\n// \n\n_QWORD *__fastcall GJLevelList::frameForListDifficulty(_QWORD *a1, unsigned int a2, int a3)\n{\n  char v3; // al\n  unsigned int v7; // esi\n  unsigned int v8; // eax\n  char *v9; // rdi\n  char *v10; // rax\n  char *v11; // r14\n  __int64 v12; // rax\n  const char *CString; // r12\n  size_t v14; // rax\n  size_t v15; // r15\n  char *v16; // r14\n  size_t v17; // r13\n  char v19; // [rsp-8h] [rbp-30h]\n\n  v19 = v3;\n  if ( a2 )\n  {\n    v7 = 0;\n    if ( a2 < 0xB )\n      v7 = a2;\n    v8 = a2 - 6;\n    if ( v8 <= 2 )\n      v7 = dword_100A0CEF8[v8];\n    if ( a3 == 2 )\n    {\n      v9 = \"diffIcon_%02d_btn_001.png\";\n    }\n    else if ( a3 == 1 && v7 >= 6 )\n    {\n      v9 = \"difficulty_%02d_btn2_001.png\";\n    }\n    else\n    {\n      v9 = \"difficulty_%02d_btn_001.png\";\n    }\n    v12 = sub_10088E820(v9, v19);\n    CString = (const char *)cocos2d::CCString::getCString(v12);\n    v14 = strlen(CString);\n    if ( v14 >= 0xFFFFFFFFFFFFFFF8LL )\n      sub_100003630();\n    v15 = v14;\n    if ( v14 >= 0x17 )\n    {\n      v17 = 26;\n      if ( (v14 | 7) != 0x17 )\n        v17 = (v14 | 7) + 1;\n      v16 = (char *)operator new(v17);\n      a1[2] = v16;\n      *a1 = v17 + 1;\n      a1[1] = v15;\n    }\n    else\n    {\n      *(_BYTE *)a1 = 2 * v14;\n      v16 = (char *)a1 + 1;\n      if ( !v14 )\n        goto LABEL_23;\n    }\n    memmove(v16, CString, v15);\nLABEL_23:\n    v11 = &v16[v15];\n    goto LABEL_24;\n  }\n  v10 = (char *)operator new(0x20u);\n  a1[2] = v10;\n  *a1 = 33;\n  if ( a3 == 2 )\n  {\n    a1[1] = 25;\n    qmemcpy(v10, \"diffIcon_auto_btn_001.png\", 25);\n    v11 = v10 + 25;\n  }\n  else\n  {\n    a1[1] = 27;\n    qmemcpy(v10, \"difficulty_auto_btn_001.png\", 27);\n    v11 = v10 + 27;\n  }\nLABEL_24:\n  *v11 = 0;\n  return a1;\n}", "assembly": "; \n; GJLevelList::frameForListDifficulty from 0x100590350 to 0x1005904b9 (361 bytes)\n; \n; 5 xrefs:\n; > LevelListCell::loadFromList @ 0x10022b205\n; > LevelListLayer::init @ 0x100347862\n; > LevelListLayer::updateStatsArt @ 0x100349803\n; > SelectListIconLayer::init @ 0x10034d089\n; > ShareListLayer::init @ 0x10034e6e5\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:32:26 +0000\n; \npush    rbp                                                            ; +0x0, 0x100590350\nmov     rbp, rsp                                                       ; +0x1, 0x100590351\npush    r15                                                            ; +0x4, 0x100590354\npush    r14                                                            ; +0x6, 0x100590356\npush    r13                                                            ; +0x8, 0x100590358\npush    r12                                                            ; +0xa, 0x10059035a\npush    rbx                                                            ; +0xc, 0x10059035c\npush    rax; char                                                      ; +0xd, 0x10059035d\nmov     r15d, edx                                                      ; +0xe, 0x10059035e\nmov     rbx, rdi                                                       ; +0x11, 0x100590361\ntest    esi, esi                                                       ; +0x14, 0x100590364\njz      short loc_100590398                                            ; +0x16, 0x100590366\nmov     eax, esi                                                       ; +0x18, 0x100590368\nxor     esi, esi                                                       ; +0x1a, 0x10059036a\ncmp     eax, 0Bh                                                       ; +0x1c, 0x10059036c\ncmovb   esi, eax                                                       ; +0x1f, 0x10059036f\nadd     eax, 0FFFFFFFAh                                                ; +0x22, 0x100590372\ncmp     eax, 2                                                         ; +0x25, 0x100590375\nja      short loc_100590386                                            ; +0x28, 0x100590378\nmov     eax, eax                                                       ; +0x2a, 0x10059037a\nlea     rcx, dword_100A0CEF8                                           ; +0x2c, 0x10059037c\nmov     esi, [rcx+rax*4]                                               ; +0x33, 0x100590383\ncmp     r15d, 2                                                        ; +0x36, 0x100590386\njnz     short loc_1005903DE                                            ; +0x3a, 0x10059038a\nlea     rdi, aDifficon02dBtn; \"diffIcon_%02d_btn_001.png\"              ; +0x3c, 0x10059038c\njmp     loc_100590421                                                  ; +0x43, 0x100590393\nmov     edi, 20h ; ' '; __sz                                           ; +0x48, 0x100590398\ncall    __Znwm; operator new(ulong)                                    ; +0x4d, 0x10059039d\nmov     r14, rax                                                       ; +0x52, 0x1005903a2\nmov     [rbx+10h], rax                                                 ; +0x55, 0x1005903a5\nmov     qword ptr [rbx], 21h ; '!'                                     ; +0x59, 0x1005903a9\ncmp     r15d, 2                                                        ; +0x60, 0x1005903b0\njnz     short loc_1005903F2                                            ; +0x64, 0x1005903b4\nmov     qword ptr [rbx+8], 19h                                         ; +0x66, 0x1005903b6\nmovups  xmm0, xmmword ptr cs:aDifficonAutoBt+9; \"auto_btn_001.png\"     ; +0x6e, 0x1005903be\nmovups  xmmword ptr [r14+9], xmm0                                      ; +0x75, 0x1005903c5\nmovups  xmm0, xmmword ptr cs:aDifficonAutoBt; \"diffIcon_auto_btn_001.png\" ; +0x7a, 0x1005903ca\nmovups  xmmword ptr [r14], xmm0                                        ; +0x81, 0x1005903d1\nadd     r14, 19h                                                       ; +0x85, 0x1005903d5\njmp     loc_10059049E                                                  ; +0x89, 0x1005903d9\ncmp     r15d, 1                                                        ; +0x8e, 0x1005903de\njnz     short loc_10059041A                                            ; +0x92, 0x1005903e2\ncmp     esi, 6                                                         ; +0x94, 0x1005903e4\njb      short loc_10059041A                                            ; +0x97, 0x1005903e7\nlea     rdi, aDifficulty02dB; \"difficulty_%02d_btn2_001.png\"           ; +0x99, 0x1005903e9\njmp     short loc_100590421                                            ; +0xa0, 0x1005903f0\nmov     qword ptr [rbx+8], 1Bh                                         ; +0xa2, 0x1005903f2\nmovups  xmm0, xmmword ptr cs:aDifficultyAuto+0Bh; \"auto_btn_001.png\"   ; +0xaa, 0x1005903fa\nmovups  xmmword ptr [r14+0Bh], xmm0                                    ; +0xb1, 0x100590401\nmovups  xmm0, xmmword ptr cs:aDifficultyAuto; \"difficulty_auto_btn_001.png\" ; +0xb6, 0x100590406\nmovups  xmmword ptr [r14], xmm0                                        ; +0xbd, 0x10059040d\nadd     r14, 1Bh                                                       ; +0xc1, 0x100590411\njmp     loc_10059049E                                                  ; +0xc5, 0x100590415\nlea     rdi, aDifficulty02dB_0; \"difficulty_%02d_btn_001.png\"          ; +0xca, 0x10059041a\nxor     eax, eax                                                       ; +0xd1, 0x100590421\ncall    sub_10088E820                                                  ; +0xd3, 0x100590423\nmov     rdi, rax                                                       ; +0xd8, 0x100590428\ncall    cocos2d__CCString__getCString                                  ; +0xdb, 0x10059042b\nmov     r12, rax                                                       ; +0xe0, 0x100590430\nmov     rdi, rax; __s                                                  ; +0xe3, 0x100590433\ncall    _strlen                                                        ; +0xe6, 0x100590436\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xeb, 0x10059043b\njnb     short loc_1005904B4                                            ; +0xef, 0x10059043f\nmov     r15, rax                                                       ; +0xf1, 0x100590441\ncmp     rax, 17h                                                       ; +0xf4, 0x100590444\njnb     short loc_10059045B                                            ; +0xf8, 0x100590448\nlea     eax, [r15+r15]                                                 ; +0xfa, 0x10059044a\nmov     [rbx], al                                                      ; +0xfe, 0x10059044e\nlea     r14, [rbx+1]                                                   ; +0x100, 0x100590450\ntest    r15, r15                                                       ; +0x104, 0x100590454\njnz     short loc_10059048D                                            ; +0x107, 0x100590457\njmp     short loc_10059049B                                            ; +0x109, 0x100590459\nmov     rax, r15                                                       ; +0x10b, 0x10059045b\nor      rax, 7                                                         ; +0x10e, 0x10059045e\nlea     rcx, [rax+1]                                                   ; +0x112, 0x100590462\ncmp     rax, 17h                                                       ; +0x116, 0x100590466\nmov     r13d, 1Ah                                                      ; +0x11a, 0x10059046a\ncmovnz  r13, rcx                                                       ; +0x120, 0x100590470\nmov     rdi, r13; __sz                                                 ; +0x124, 0x100590474\ncall    __Znwm; operator new(ulong)                                    ; +0x127, 0x100590477\nmov     r14, rax                                                       ; +0x12c, 0x10059047c\nmov     [rbx+10h], rax                                                 ; +0x12f, 0x10059047f\ninc     r13                                                            ; +0x133, 0x100590483\nmov     [rbx], r13                                                     ; +0x136, 0x100590486\nmov     [rbx+8], r15                                                   ; +0x139, 0x100590489\nmov     rdi, r14; __dst                                                ; +0x13d, 0x10059048d\nmov     rsi, r12; __src                                                ; +0x140, 0x100590490\nmov     rdx, r15; __len                                                ; +0x143, 0x100590493\ncall    _memmove                                                       ; +0x146, 0x100590496\nadd     r14, r15                                                       ; +0x14b, 0x10059049b\nmov     byte ptr [r14], 0                                              ; +0x14e, 0x10059049e\nmov     rax, rbx                                                       ; +0x152, 0x1005904a2\nadd     rsp, 8                                                         ; +0x155, 0x1005904a5\npop     rbx                                                            ; +0x159, 0x1005904a9\npop     r12                                                            ; +0x15a, 0x1005904aa\npop     r13                                                            ; +0x15c, 0x1005904ac\npop     r14                                                            ; +0x15e, 0x1005904ae\npop     r15                                                            ; +0x160, 0x1005904b0\npop     rbp                                                            ; +0x162, 0x1005904b2\nretn                                                                   ; +0x163, 0x1005904b3\ncall    sub_100003630                                                  ; +0x164, 0x1005904b4", "xrefs": ["LevelListCell::loadFromList @ 0x10022b205", "LevelListLayer::init @ 0x100347862", "LevelListLayer::updateStatsArt @ 0x100349803", "SelectListIconLayer::init @ 0x10034d089", "ShareListLayer::init @ 0x10034e6e5"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}