{"type": "func", "start": 5369119040, "end": 5369119537, "name": "GameToolbox::alignItemsHorisontally", "pseudocode": "// \n// GameToolbox::alignItemsHorisontally from 0x140064140 to 0x140064331 (497 bytes)\n// \n// 42 xrefs:\n// > AccountRegisterLayer::init @ 0x140078da3\n// > AccountLoginLayer::init @ 0x14007bcd6\n// > NewgroundsInfoLayer::init @ 0x1400c5dd7\n// > NCSInfoLayer::init @ 0x1400c6b8d\n// > EditLevelLayer::setupLevelInfo @ 0x1400d7137\n// > EditLevelLayer::setupLevelInfo @ 0x1400d717d\n// > EditLevelLayer::setupLevelInfo @ 0x1400d71c1\n// > EditLevelLayer::setupLevelInfo @ 0x1400d7233\n// > EndLevelLayer::customSetup @ 0x140134322\n// > GJAccountSettingsLayer::init @ 0x140293973\n// > GJWriteMessagePopup::init @ 0x140299820\n// > UIPOptionsLayer::init @ 0x1402a5dfb\n// > PurchaseItemPopup::init @ 0x1402af5db\n// > GJRateLevelLayer::init @ 0x1402f4d7b\n// > GJRateLevelLayer::init @ 0x1402f4dd9\n// > GJRateLevelLayer::init @ 0x1402f5402\n// > ShareListLayer::init @ 0x14030a3e3\n// > LevelSearchLayer::init @ 0x14030d65b\n// > LevelSearchLayer::init @ 0x14030db00\n// > DemonFilterSelectLayer::init @ 0x140317e07\n// > ProfilePage::loadPageFromUserInfo @ 0x1403c2530\n// > ProfilePage::loadPageFromUserInfo @ 0x1403c2c52\n// > DemonInfoPopup::init @ 0x1403c74eb\n// > RateDemonLayer::init @ 0x1403c8f0a\n// > RateDemonLayer::init @ 0x1403c90e5\n// > RateLevelLayer::init @ 0x1403c9a84\n// > RateLevelLayer::init @ 0x1403c9c57\n// > RateStarsLayer::init @ 0x1403ca551\n// > RateStarsLayer::init @ 0x1403ca5ae\n// > RateStarsLayer::init @ 0x1403ca876\n// > SetGroupIDLayer::init @ 0x1403f9803\n// > SetupGradientPopup::init @ 0x140421abb\n// > SetupGradientPopup::init @ 0x140421b0b\n// > SetupShaderEffectPopup::setupShaderTrigger @ 0x14044ab85\n// > SetupShaderEffectPopup::setupShaderTrigger @ 0x14044abd0\n// > ShareCommentLayer::init @ 0x14048db48\n// > ShareLevelLayer::init @ 0x14048f917\n// > ShareLevelLayer::setupStars @ 0x14048fdb6\n// > ShareLevelLayer::setupStars @ 0x14048fdee\n// > SongInfoLayer::init @ 0x140493507\n// > UILayer::init @ 0x1404cd0a1\n// > <???> @ 0x1406c5cf4\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 GameToolbox::alignItemsHorisontally(cocos2d::CCArray *a1, float a2, cocos2d::CCPoint a3, bool a4)\n{\n  float v6; // xmm6_4\n  cocos2d::ccArray *data; // rdi\n  __int64 num; // rax\n  cocos2d::CCObject **arr; // rdi\n  cocos2d::CCObject **i; // rsi\n  cocos2d::CCObject *v12; // rbx\n  const struct cocos2d::CCSize *v13; // rax\n  float v14; // xmm0_4\n  float v15; // xmm6_4\n  cocos2d::ccArray *v16; // rsi\n  __int64 v17; // rax\n  cocos2d::CCObject **v18; // rsi\n  cocos2d::CCObject **j; // r14\n  cocos2d::CCObject *v20; // rdi\n  const struct cocos2d::CCSize *v21; // rax\n  cocos2d::CCObject_vtbl *v22; // rbx\n  double v23; // xmm0_8\n  DS_Dictionary *v24; // rax\n  float v25; // xmm0_4\n  char v26; // [rsp+20h] [rbp-68h] BYREF\n  cocos2d::CCPoint v27; // [rsp+28h] [rbp-60h] BYREF\n  cocos2d::CCSize v28; // [rsp+90h] [rbp+8h] BYREF\n\n  v6 = -a2;\n  if ( a1 )\n  {\n    data = a1->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = data->arr;\n      for ( i = &arr[num - 1]; arr <= i; v6 = v6 + (float)((float)(v14 * v28.width) + a2) )\n      {\n        v12 = *arr;\n        if ( !*arr )\n          break;\n        v13 = a4\n            ? &stru_1406C14A0\n            : (const struct cocos2d::CCSize *)((__int64 (__fastcall *)(cocos2d::CCObject *))v12->__vftable[4].isEqual)(*arr);\n        cocos2d::CCSize::CCSize(&v28, v13);\n        v14 = ((float (__fastcall *)(cocos2d::CCObject *))v12->__vftable[1].getTag)(v12);\n        ++arr;\n      }\n    }\n  }\n  v15 = (float)-v6 * 0.5;\n  if ( a1 )\n  {\n    v16 = a1->data;\n    v17 = v16->num;\n    if ( (_DWORD)v17 )\n    {\n      v18 = v16->arr;\n      for ( j = &v18[v17 - 1]; v18 <= j; v15 = v15 + (float)((float)(v25 * v28.width) + a2) )\n      {\n        v20 = *v18;\n        if ( !*v18 )\n          break;\n        v21 = a4\n            ? &stru_1406C14A0\n            : (const struct cocos2d::CCSize *)((__int64 (__fastcall *)(cocos2d::CCObject *))v20->__vftable[4].isEqual)(*v18);\n        cocos2d::CCSize::CCSize(&v28, v21);\n        v22 = v20->__vftable;\n        v23 = ((double (__fastcall *)(cocos2d::CCObject *))v20->__vftable[1].getTag)(v20);\n        cocos2d::CCPoint::CCPoint(&v27, (float)((float)(*(float *)&v23 * v28.width) * 0.5) + v15, 0.0);\n        v22[2].encodeWithCoder(v20, v24);\n        v20->__vftable[2].getTag(v20);\n        ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator+)(a3, &v26);\n        v20->__vftable[2].encodeWithCoder(v20, (DS_Dictionary *)&v26);\n        v25 = ((float (__fastcall *)(cocos2d::CCObject *))v20->__vftable[1].getTag)(v20);\n        ++v18;\n      }\n    }\n  }\n}", "assembly": "; \n; GameToolbox::alignItemsHorisontally from 0x140064140 to 0x140064331 (497 bytes)\n; \n; 42 xrefs:\n; > AccountRegisterLayer::init @ 0x140078da3\n; > AccountLoginLayer::init @ 0x14007bcd6\n; > NewgroundsInfoLayer::init @ 0x1400c5dd7\n; > NCSInfoLayer::init @ 0x1400c6b8d\n; > EditLevelLayer::setupLevelInfo @ 0x1400d7137\n; > EditLevelLayer::setupLevelInfo @ 0x1400d717d\n; > EditLevelLayer::setupLevelInfo @ 0x1400d71c1\n; > EditLevelLayer::setupLevelInfo @ 0x1400d7233\n; > EndLevelLayer::customSetup @ 0x140134322\n; > GJAccountSettingsLayer::init @ 0x140293973\n; > GJWriteMessagePopup::init @ 0x140299820\n; > UIPOptionsLayer::init @ 0x1402a5dfb\n; > PurchaseItemPopup::init @ 0x1402af5db\n; > GJRateLevelLayer::init @ 0x1402f4d7b\n; > GJRateLevelLayer::init @ 0x1402f4dd9\n; > GJRateLevelLayer::init @ 0x1402f5402\n; > ShareListLayer::init @ 0x14030a3e3\n; > LevelSearchLayer::init @ 0x14030d65b\n; > LevelSearchLayer::init @ 0x14030db00\n; > DemonFilterSelectLayer::init @ 0x140317e07\n; > ProfilePage::loadPageFromUserInfo @ 0x1403c2530\n; > ProfilePage::loadPageFromUserInfo @ 0x1403c2c52\n; > DemonInfoPopup::init @ 0x1403c74eb\n; > RateDemonLayer::init @ 0x1403c8f0a\n; > RateDemonLayer::init @ 0x1403c90e5\n; > RateLevelLayer::init @ 0x1403c9a84\n; > RateLevelLayer::init @ 0x1403c9c57\n; > RateStarsLayer::init @ 0x1403ca551\n; > RateStarsLayer::init @ 0x1403ca5ae\n; > RateStarsLayer::init @ 0x1403ca876\n; > SetGroupIDLayer::init @ 0x1403f9803\n; > SetupGradientPopup::init @ 0x140421abb\n; > SetupGradientPopup::init @ 0x140421b0b\n; > SetupShaderEffectPopup::setupShaderTrigger @ 0x14044ab85\n; > SetupShaderEffectPopup::setupShaderTrigger @ 0x14044abd0\n; > ShareCommentLayer::init @ 0x14048db48\n; > ShareLevelLayer::init @ 0x14048f917\n; > ShareLevelLayer::setupStars @ 0x14048fdb6\n; > ShareLevelLayer::setupStars @ 0x14048fdee\n; > SongInfoLayer::init @ 0x140493507\n; > UILayer::init @ 0x1404cd0a1\n; > <???> @ 0x1406c5cf4\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, 0x140064140\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140064145\npush    rsi                                                            ; +0xa, 0x14006414a\npush    rdi                                                            ; +0xb, 0x14006414b\npush    r12                                                            ; +0xc, 0x14006414c\npush    r14                                                            ; +0xe, 0x14006414e\npush    r15                                                            ; +0x10, 0x140064150\nsub     rsp, 60h                                                       ; +0x12, 0x140064152\nmovaps  [rsp+88h+var_38], xmm6                                         ; +0x16, 0x140064156\nmovaps  xmm6, xmm1                                                     ; +0x1b, 0x14006415b\nmovaps  [rsp+88h+var_48], xmm7                                         ; +0x1e, 0x14006415e\nmovzx   ebp, r9b                                                       ; +0x23, 0x140064163\nmovaps  [rsp+88h+var_58], xmm8                                         ; +0x27, 0x140064167\nmov     r15, r8                                                        ; +0x2d, 0x14006416d\nmovss   xmm8, dword ptr cs:xmmword_1406243F0                           ; +0x30, 0x140064170\nmovaps  xmm7, xmm1                                                     ; +0x39, 0x140064179\nlea     r12, stru_1406C14A0                                            ; +0x3c, 0x14006417c\nxorps   xmm6, xmm8                                                     ; +0x43, 0x140064183\nmov     r14, rcx                                                       ; +0x47, 0x140064187\ntest    rcx, rcx                                                       ; +0x4a, 0x14006418a\njz      short loc_140064205                                            ; +0x4d, 0x14006418d\nmov     rdi, [rcx+38h]                                                 ; +0x4f, 0x14006418f\nmov     eax, [rdi]                                                     ; +0x53, 0x140064193\ntest    eax, eax                                                       ; +0x55, 0x140064195\njz      short loc_140064205                                            ; +0x57, 0x140064197\nmov     rdi, [rdi+10h]                                                 ; +0x59, 0x140064199\nlea     rsi, [rax-1]                                                   ; +0x5d, 0x14006419d\nlea     rsi, [rdi+rsi*8]                                               ; +0x61, 0x1400641a1\ncmp     rdi, rsi                                                       ; +0x65, 0x1400641a5\nja      short loc_140064205                                            ; +0x68, 0x1400641a8\nnop     word ptr [rax+rax+00h]                                         ; +0x6a, 0x1400641aa\nmov     rbx, [rdi]                                                     ; +0x70, 0x1400641b0\ntest    rbx, rbx                                                       ; +0x73, 0x1400641b3\njz      short loc_140064205                                            ; +0x76, 0x1400641b6\ntest    bpl, bpl                                                       ; +0x78, 0x1400641b8\njz      short loc_1400641C2                                            ; +0x7b, 0x1400641bb\nmov     rax, r12                                                       ; +0x7d, 0x1400641bd\njmp     short loc_1400641CE                                            ; +0x80, 0x1400641c0\nmov     rax, [rbx]                                                     ; +0x82, 0x1400641c2\nmov     rcx, rbx                                                       ; +0x85, 0x1400641c5\ncall    qword ptr [rax+130h]                                           ; +0x88, 0x1400641c8\nmov     rdx, rax                                                       ; +0x8e, 0x1400641ce\nlea     rcx, [rsp+88h+arg_0]                                           ; +0x91, 0x1400641d1\ncall    cs:??0CCSize@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCSize::CCSize(cocos2d::CCSize const &) ; +0x99, 0x1400641d9\nmov     rax, [rbx]                                                     ; +0x9f, 0x1400641df\nmov     rcx, rbx                                                       ; +0xa2, 0x1400641e2\ncall    qword ptr [rax+80h]                                            ; +0xa5, 0x1400641e5\nmulss   xmm0, dword ptr [rsp+88h+arg_0]                                ; +0xab, 0x1400641eb\nadd     rdi, 8                                                         ; +0xb4, 0x1400641f4\naddss   xmm0, xmm7                                                     ; +0xb8, 0x1400641f8\naddss   xmm6, xmm0                                                     ; +0xbc, 0x1400641fc\ncmp     rdi, rsi                                                       ; +0xc0, 0x140064200\njbe     short loc_1400641B0                                            ; +0xc3, 0x140064203\nxorps   xmm6, xmm8                                                     ; +0xc5, 0x140064205\nmovss   xmm8, cs:dword_140622B08                                       ; +0xc9, 0x140064209\nmulss   xmm6, xmm8                                                     ; +0xd2, 0x140064212\ntest    r14, r14                                                       ; +0xd7, 0x140064217\njz      loc_140064309                                                  ; +0xda, 0x14006421a\nmov     rsi, [r14+38h]                                                 ; +0xe0, 0x140064220\nmov     eax, [rsi]                                                     ; +0xe4, 0x140064224\ntest    eax, eax                                                       ; +0xe6, 0x140064226\njz      loc_140064309                                                  ; +0xe8, 0x140064228\nmov     rsi, [rsi+10h]                                                 ; +0xee, 0x14006422e\nlea     r14, [rax-1]                                                   ; +0xf2, 0x140064232\nlea     r14, [rsi+r14*8]                                               ; +0xf6, 0x140064236\ncmp     rsi, r14                                                       ; +0xfa, 0x14006423a\nja      loc_140064309                                                  ; +0xfd, 0x14006423d\nmov     rdi, [rsi]                                                     ; +0x103, 0x140064243\ntest    rdi, rdi                                                       ; +0x106, 0x140064246\njz      loc_140064309                                                  ; +0x109, 0x140064249\ntest    bpl, bpl                                                       ; +0x10f, 0x14006424f\njz      short loc_140064259                                            ; +0x112, 0x140064252\nmov     rax, r12                                                       ; +0x114, 0x140064254\njmp     short loc_140064265                                            ; +0x117, 0x140064257\nmov     rax, [rdi]                                                     ; +0x119, 0x140064259\nmov     rcx, rdi                                                       ; +0x11c, 0x14006425c\ncall    qword ptr [rax+130h]                                           ; +0x11f, 0x14006425f\nmov     rdx, rax                                                       ; +0x125, 0x140064265\nlea     rcx, [rsp+88h+arg_0]                                           ; +0x128, 0x140064268\ncall    cs:??0CCSize@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCSize::CCSize(cocos2d::CCSize const &) ; +0x130, 0x140064270\nmov     rbx, [rdi]                                                     ; +0x136, 0x140064276\nmov     rcx, rdi                                                       ; +0x139, 0x140064279\ncall    qword ptr [rbx+80h]                                            ; +0x13c, 0x14006427c\nmulss   xmm0, dword ptr [rsp+88h+arg_0]                                ; +0x142, 0x140064282\nxorps   xmm2, xmm2                                                     ; +0x14b, 0x14006428b\nlea     rcx, [rsp+88h+var_60]                                          ; +0x14e, 0x14006428e\nmulss   xmm0, xmm8                                                     ; +0x153, 0x140064293\naddss   xmm0, xmm6                                                     ; +0x158, 0x140064298\nmovaps  xmm1, xmm0                                                     ; +0x15c, 0x14006429c\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x15f, 0x14006429f\nmov     rdx, rax                                                       ; +0x165, 0x1400642a5\nmov     rcx, rdi                                                       ; +0x168, 0x1400642a8\ncall    qword ptr [rbx+0B8h]                                           ; +0x16b, 0x1400642ab\nmov     rax, [rdi]                                                     ; +0x171, 0x1400642b1\nmov     rcx, rdi                                                       ; +0x174, 0x1400642b4\ncall    qword ptr [rax+0C8h]                                           ; +0x177, 0x1400642b7\nlea     rdx, [rsp+88h+var_68]                                          ; +0x17d, 0x1400642bd\nmov     rcx, r15                                                       ; +0x182, 0x1400642c2\nmov     r8, rax                                                        ; +0x185, 0x1400642c5\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x188, 0x1400642c8\nmov     rax, [rdi]                                                     ; +0x18e, 0x1400642ce\nlea     rdx, [rsp+88h+var_68]                                          ; +0x191, 0x1400642d1\nmov     rcx, rdi                                                       ; +0x196, 0x1400642d6\ncall    qword ptr [rax+0B8h]                                           ; +0x199, 0x1400642d9\nmov     rax, [rdi]                                                     ; +0x19f, 0x1400642df\nmov     rcx, rdi                                                       ; +0x1a2, 0x1400642e2\ncall    qword ptr [rax+80h]                                            ; +0x1a5, 0x1400642e5\nmulss   xmm0, dword ptr [rsp+88h+arg_0]                                ; +0x1ab, 0x1400642eb\nadd     rsi, 8                                                         ; +0x1b4, 0x1400642f4\naddss   xmm0, xmm7                                                     ; +0x1b8, 0x1400642f8\naddss   xmm6, xmm0                                                     ; +0x1bc, 0x1400642fc\ncmp     rsi, r14                                                       ; +0x1c0, 0x140064300\njbe     loc_140064243                                                  ; +0x1c3, 0x140064303\nmovaps  xmm6, [rsp+88h+var_38]                                         ; +0x1c9, 0x140064309\nlea     r11, [rsp+88h+var_28]                                          ; +0x1ce, 0x14006430e\nmov     rbx, [r11+38h]                                                 ; +0x1d3, 0x140064313\nmov     rbp, [r11+40h]                                                 ; +0x1d7, 0x140064317\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x1db, 0x14006431b\nmovaps  xmm7, [rsp+88h+var_48]                                         ; +0x1e0, 0x140064320\nmov     rsp, r11                                                       ; +0x1e5, 0x140064325\npop     r15                                                            ; +0x1e8, 0x140064328\npop     r14                                                            ; +0x1ea, 0x14006432a\npop     r12                                                            ; +0x1ec, 0x14006432c\npop     rdi                                                            ; +0x1ee, 0x14006432e\npop     rsi                                                            ; +0x1ef, 0x14006432f\nretn                                                                   ; +0x1f0, 0x140064330", "xrefs": ["AccountRegisterLayer::init @ 0x140078da3", "AccountLoginLayer::init @ 0x14007bcd6", "NewgroundsInfoLayer::init @ 0x1400c5dd7", "NCSInfoLayer::init @ 0x1400c6b8d", "EditLevelLayer::setupLevelInfo @ 0x1400d7137", "EditLevelLayer::setupLevelInfo @ 0x1400d717d", "EditLevelLayer::setupLevelInfo @ 0x1400d71c1", "EditLevelLayer::setupLevelInfo @ 0x1400d7233", "EndLevelLayer::customSetup @ 0x140134322", "GJAccountSettingsLayer::init @ 0x140293973", "GJWriteMessagePopup::init @ 0x140299820", "UIPOptionsLayer::init @ 0x1402a5dfb", "PurchaseItemPopup::init @ 0x1402af5db", "GJRateLevelLayer::init @ 0x1402f4d7b", "GJRateLevelLayer::init @ 0x1402f4dd9", "GJRateLevelLayer::init @ 0x1402f5402", "ShareListLayer::init @ 0x14030a3e3", "LevelSearchLayer::init @ 0x14030d65b", "LevelSearchLayer::init @ 0x14030db00", "DemonFilterSelectLayer::init @ 0x140317e07", "ProfilePage::loadPageFromUserInfo @ 0x1403c2530", "ProfilePage::loadPageFromUserInfo @ 0x1403c2c52", "DemonInfoPopup::init @ 0x1403c74eb", "RateDemonLayer::init @ 0x1403c8f0a", "RateDemonLayer::init @ 0x1403c90e5", "RateLevelLayer::init @ 0x1403c9a84", "RateLevelLayer::init @ 0x1403c9c57", "RateStarsLayer::init @ 0x1403ca551", "RateStarsLayer::init @ 0x1403ca5ae", "RateStarsLayer::init @ 0x1403ca876", "SetGroupIDLayer::init @ 0x1403f9803", "SetupGradientPopup::init @ 0x140421abb", "SetupGradientPopup::init @ 0x140421b0b", "SetupShaderEffectPopup::setupShaderTrigger @ 0x14044ab85", "SetupShaderEffectPopup::setupShaderTrigger @ 0x14044abd0", "ShareCommentLayer::init @ 0x14048db48", "ShareLevelLayer::init @ 0x14048f917", "ShareLevelLayer::setupStars @ 0x14048fdb6", "ShareLevelLayer::setupStars @ 0x14048fdee", "SongInfoLayer::init @ 0x140493507", "UILayer::init @ 0x1404cd0a1", "<???> @ 0x1406c5cf4"], "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"}