{"type": "func", "start": 4295678552, "end": 4295679200, "name": "GJGameLevel::getListSnapshot", "pseudocode": "// \n// GJGameLevel::getListSnapshot from 0x1000ada58 to 0x1000adce0 (648 bytes)\n// \n// 2 xrefs:\n// > GJLevelList::getListLevelsArray @ 0x1000b12c8\n// > GJLevelList::addLevelToList @ 0x1000b14d0\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\nGJGameLevel *__fastcall GJGameLevel::getListSnapshot(GJGameLevel *a1)\n{\n  GJGameLevel *v2; // x19\n  int v3; // w21\n  float v4; // s0\n  int v5; // w21\n  float v6; // s0\n  int v7; // w21\n  float v8; // s0\n  int v9; // w21\n  float v10; // s0\n  int v11; // w21\n  float v12; // s0\n  int random; // w21\n  int seed; // w22\n  int v15; // w8\n  int v16; // w20\n  float v17; // s0\n  std::string __p; // [xsp+0h] [xbp-70h] BYREF\n  std::string __str; // [xsp+20h] [xbp-50h] BYREF\n\n  v2 = GJGameLevel::create_1();\n  v3 = a1->m_levelID.random - a1->m_levelID.seed;\n  v2->m_levelID.value = v3;\n  v4 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n  v2->m_levelID.seed = (int)v4;\n  v2->m_levelID.random = v3 + (int)v4;\n  if ( a1->m_levelName.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    sub_1000097D0(&__str, (void *)a1->m_levelName.m_data.m_long.capacitym1, a1->m_levelName.m_data.m_long.size);\n  else\n    __str = (std::string)a1->m_levelName;\n  std::string::operator=((std::string *)&v2->m_levelName, &__str);\n  if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__str.__r_.__value_.__l.__data_);\n  v2->m_levelLength = a1->m_levelLength;\n  v2->m_timestamp = a1->m_timestamp;\n  v5 = a1->m_accountID.random - a1->m_accountID.seed;\n  v2->m_accountID.value = v5;\n  v6 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n  v2->m_accountID.seed = (int)v6;\n  v2->m_accountID.random = v5 + (int)v6;\n  if ( a1->m_creatorName.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    sub_1000097D0(&__p, (void *)a1->m_creatorName.m_data.m_long.capacitym1, a1->m_creatorName.m_data.m_long.size);\n  else\n    __p = a1->m_creatorName;\n  std::string::operator=((std::string *)&v2->m_creatorName, (const std::string *)&__p);\n  if ( __p.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    operator delete((void *)__p.m_data.m_long.capacitym1);\n  v2->m_likes = a1->m_likes;\n  v2->m_audioTrack = a1->m_audioTrack;\n  v2->m_songID = a1->m_songID;\n  v2->m_levelType = a1->m_levelType;\n  v2->m_ratings = a1->m_ratings;\n  *(_QWORD *)&v2->m_ratingsSum = *(_QWORD *)&a1->m_ratingsSum;\n  v7 = a1->m_demon.random - a1->m_demon.seed;\n  v2->m_demon.value = v7;\n  v8 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n  v2->m_demon.seed = (int)v8;\n  v2->m_demon.random = v7 + (int)v8;\n  v2->m_demonDifficulty = a1->m_demonDifficulty;\n  v2->m_autoLevel = a1->m_autoLevel;\n  v2->m_featured = a1->m_featured;\n  v2->m_isEpic = a1->m_isEpic;\n  v9 = a1->m_stars.random - a1->m_stars.seed;\n  v2->m_stars.value = v9;\n  v10 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n  v2->m_stars.seed = (int)v10;\n  v2->m_stars.random = v9 + (int)v10;\n  v2->m_coins = a1->m_coins;\n  v11 = a1->m_coinsVerified.random - a1->m_coinsVerified.seed;\n  v2->m_coinsVerified.value = v11;\n  v12 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n  v2->m_coinsVerified.seed = (int)v12;\n  v2->m_coinsVerified.random = v11 + (int)v12;\n  random = a1->m_originalLevel.random;\n  seed = a1->m_originalLevel.seed;\n  v2->m_originalLevel.value = random != seed;\n  v15 = (int)(float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0);\n  v2->m_originalLevel.seed = v15;\n  if ( random != seed )\n    ++v15;\n  v2->m_originalLevel.random = v15;\n  v16 = a1->m_objectCount.random - a1->m_objectCount.seed;\n  v2->m_objectCount.value = v16;\n  v17 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n  v2->m_objectCount.seed = (int)v17;\n  v2->m_objectCount.random = v16 + (int)v17;\n  return v2;\n}", "assembly": "; \n; GJGameLevel::getListSnapshot from 0x1000ada58 to 0x1000adce0 (648 bytes)\n; \n; 2 xrefs:\n; > GJLevelList::getListLevelsArray @ 0x1000b12c8\n; > GJLevelList::addLevelToList @ 0x1000b14d0\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\nSUB             SP, SP, #0x80                                          ; +0x0, 0x1000ada58\nSTP             D9, D8, [SP,#0x70+var_30]                              ; +0x4, 0x1000ada5c\nSTP             X22, X21, [SP,#0x70+var_20]                            ; +0x8, 0x1000ada60\nSTP             X20, X19, [SP,#0x70+var_10]                            ; +0xc, 0x1000ada64\nSTP             X29, X30, [SP,#0x70+var_s0]                            ; +0x10, 0x1000ada68\nADD             X29, SP, #0x70                                         ; +0x14, 0x1000ada6c\nMOV             X20, X0                                                ; +0x18, 0x1000ada70\nBL              GJGameLevel__create_1                                  ; +0x1c, 0x1000ada74\nMOV             X19, X0                                                ; +0x20, 0x1000ada78\nLDR             W8, [X20,#0x148]                                       ; +0x24, 0x1000ada7c\nLDR             W9, [X20,#0x14C]                                       ; +0x28, 0x1000ada80\nSUB             W21, W8, W9                                            ; +0x2c, 0x1000ada84\nSTR             W21, [X0,#0x150]                                       ; +0x30, 0x1000ada88\nBL              _rand                                                  ; +0x34, 0x1000ada8c\nSCVTF           S0, W0, #0x1F                                          ; +0x38, 0x1000ada90\nMOV             W8, #0x447A0000                                        ; +0x3c, 0x1000ada94\nFMOV            S1, W8                                                 ; +0x40, 0x1000ada98\nFMUL            S0, S0, S1                                             ; +0x44, 0x1000ada9c\nFCVTZS          W8, S0                                                 ; +0x48, 0x1000adaa0\nSTR             W8, [X19,#0x14C]                                       ; +0x4c, 0x1000adaa4\nADD             W8, W21, W8                                            ; +0x50, 0x1000adaa8\nSTR             W8, [X19,#0x148]                                       ; +0x54, 0x1000adaac\nLDRSB           W8, [X20,#0x16F]                                       ; +0x58, 0x1000adab0\nTBNZ            W8, #0x1F, loc_1000ADAD0                               ; +0x5c, 0x1000adab4\nADD             X8, X20, #0x158                                        ; +0x60, 0x1000adab8\nLDR             Q0, [X8]                                               ; +0x64, 0x1000adabc\nSTR             Q0, [SP,#0x70+__str]                                   ; +0x68, 0x1000adac0\nLDR             X8, [X8,#0x10]                                         ; +0x6c, 0x1000adac4\nSTR             X8, [SP,#0x70+__str.__r_.__value_+0x10]                ; +0x70, 0x1000adac8\nB               loc_1000ADADC                                          ; +0x74, 0x1000adacc\nLDP             X1, X2, [X20,#0x158]; __src                            ; +0x78, 0x1000adad0\nADD             X0, SP, #0x70+__str; __dst                             ; +0x7c, 0x1000adad4\nBL              sub_1000097D0                                          ; +0x80, 0x1000adad8\nADD             X0, X19, #0x158; this                                  ; +0x84, 0x1000adadc\nADD             X1, SP, #0x70+__str; __str                             ; +0x88, 0x1000adae0\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x8c, 0x1000adae4\nLDRSB           W8, [SP,#0x70+__str.__r_.__value_+0x17]                ; +0x90, 0x1000adae8\nTBZ             W8, #0x1F, loc_1000ADAF8                               ; +0x94, 0x1000adaec\nLDR             X0, [SP,#0x70+__str]; __p                              ; +0x98, 0x1000adaf0\nBL              __ZdlPv; operator delete(void *)                       ; +0x9c, 0x1000adaf4\nLDR             W8, [X20,#0x310]                                       ; +0xa0, 0x1000adaf8\nSTR             W8, [X19,#0x310]                                       ; +0xa4, 0x1000adafc\nLDR             W8, [X20,#0x460]                                       ; +0xa8, 0x1000adb00\nSTR             W8, [X19,#0x460]                                       ; +0xac, 0x1000adb04\nLDR             W8, [X20,#0x244]                                       ; +0xb0, 0x1000adb08\nLDR             W9, [X20,#0x248]                                       ; +0xb4, 0x1000adb0c\nSUB             W21, W8, W9                                            ; +0xb8, 0x1000adb10\nSTR             W21, [X19,#0x24C]                                      ; +0xbc, 0x1000adb14\nBL              _rand                                                  ; +0xc0, 0x1000adb18\nSCVTF           S0, W0, #0x1F                                          ; +0xc4, 0x1000adb1c\nMOV             W8, #0x447A0000                                        ; +0xc8, 0x1000adb20\nFMOV            S1, W8                                                 ; +0xcc, 0x1000adb24\nFMUL            S0, S0, S1                                             ; +0xd0, 0x1000adb28\nFCVTZS          W8, S0                                                 ; +0xd4, 0x1000adb2c\nSTR             W8, [X19,#0x248]                                       ; +0xd8, 0x1000adb30\nADD             W8, W21, W8                                            ; +0xdc, 0x1000adb34\nSTR             W8, [X19,#0x244]                                       ; +0xe0, 0x1000adb38\nLDRSB           W8, [X20,#0x1B7]                                       ; +0xe4, 0x1000adb3c\nTBNZ            W8, #0x1F, loc_1000ADB58                               ; +0xe8, 0x1000adb40\nLDR             Q0, [X20,#0x1A0]                                       ; +0xec, 0x1000adb44\nSTR             Q0, [SP,#0x70+__p]                                     ; +0xf0, 0x1000adb48\nLDR             X8, [X20,#0x1B0]                                       ; +0xf4, 0x1000adb4c\nSTR             X8, [SP,#0x70+var_60]                                  ; +0xf8, 0x1000adb50\nB               loc_1000ADB64                                          ; +0xfc, 0x1000adb54\nLDP             X1, X2, [X20,#0x1A0]; __src                            ; +0x100, 0x1000adb58\nMOV             X0, SP; __dst                                          ; +0x104, 0x1000adb5c\nBL              sub_1000097D0                                          ; +0x108, 0x1000adb60\nADD             X0, X19, #0x1A0; this                                  ; +0x10c, 0x1000adb64\nMOV             X1, SP; __str                                          ; +0x110, 0x1000adb68\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x114, 0x1000adb6c\nLDRSB           W8, [SP,#0x70+var_60+7]                                ; +0x118, 0x1000adb70\nTBZ             W8, #0x1F, loc_1000ADB80                               ; +0x11c, 0x1000adb74\nLDR             X0, [SP,#0x70+__p]; __p                                ; +0x120, 0x1000adb78\nBL              __ZdlPv; operator delete(void *)                       ; +0x124, 0x1000adb7c\nLDR             W8, [X20,#0x308]                                       ; +0x128, 0x1000adb80\nSTR             W8, [X19,#0x308]                                       ; +0x12c, 0x1000adb84\nLDR             W8, [X20,#0x254]                                       ; +0x130, 0x1000adb88\nSTR             W8, [X19,#0x254]                                       ; +0x134, 0x1000adb8c\nLDR             W8, [X20,#0x258]                                       ; +0x138, 0x1000adb90\nSTR             W8, [X19,#0x258]                                       ; +0x13c, 0x1000adb94\nLDR             W8, [X20,#0x404]                                       ; +0x140, 0x1000adb98\nSTR             W8, [X19,#0x404]                                       ; +0x144, 0x1000adb9c\nLDR             W8, [X20,#0x274]                                       ; +0x148, 0x1000adba0\nSTR             W8, [X19,#0x274]                                       ; +0x14c, 0x1000adba4\nLDR             D0, [X20,#0x278]                                       ; +0x150, 0x1000adba8\nSTR             D0, [X19,#0x278]                                       ; +0x154, 0x1000adbac\nLDR             W8, [X20,#0x330]                                       ; +0x158, 0x1000adbb0\nLDR             W9, [X20,#0x334]                                       ; +0x15c, 0x1000adbb4\nSUB             W21, W8, W9                                            ; +0x160, 0x1000adbb8\nSTR             W21, [X19,#0x338]                                      ; +0x164, 0x1000adbbc\nBL              _rand                                                  ; +0x168, 0x1000adbc0\nSCVTF           S0, W0, #0x1F                                          ; +0x16c, 0x1000adbc4\nMOV             W8, #0x447A0000                                        ; +0x170, 0x1000adbc8\nFMOV            S8, W8                                                 ; +0x174, 0x1000adbcc\nFMUL            S0, S0, S8                                             ; +0x178, 0x1000adbd0\nFCVTZS          W8, S0                                                 ; +0x17c, 0x1000adbd4\nSTR             W8, [X19,#0x334]                                       ; +0x180, 0x1000adbd8\nADD             W8, W21, W8                                            ; +0x184, 0x1000adbdc\nSTR             W8, [X19,#0x330]                                       ; +0x188, 0x1000adbe0\nLDR             W8, [X20,#0x33C]                                       ; +0x18c, 0x1000adbe4\nSTR             W8, [X19,#0x33C]                                       ; +0x190, 0x1000adbe8\nLDRB            W8, [X20,#0x34C]                                       ; +0x194, 0x1000adbec\nSTRB            W8, [X19,#0x34C]                                       ; +0x198, 0x1000adbf0\nLDR             W8, [X20,#0x314]                                       ; +0x19c, 0x1000adbf4\nSTR             W8, [X19,#0x314]                                       ; +0x1a0, 0x1000adbf8\nLDR             W8, [X20,#0x318]                                       ; +0x1a4, 0x1000adbfc\nSTR             W8, [X19,#0x318]                                       ; +0x1a8, 0x1000adc00\nLDR             W8, [X20,#0x340]                                       ; +0x1ac, 0x1000adc04\nLDR             W9, [X20,#0x344]                                       ; +0x1b0, 0x1000adc08\nSUB             W21, W8, W9                                            ; +0x1b4, 0x1000adc0c\nSTR             W21, [X19,#0x348]                                      ; +0x1b8, 0x1000adc10\nBL              _rand                                                  ; +0x1bc, 0x1000adc14\nSCVTF           S0, W0, #0x1F                                          ; +0x1c0, 0x1000adc18\nFMUL            S0, S0, S8                                             ; +0x1c4, 0x1000adc1c\nFCVTZS          W8, S0                                                 ; +0x1c8, 0x1000adc20\nSTR             W8, [X19,#0x344]                                       ; +0x1cc, 0x1000adc24\nADD             W8, W21, W8                                            ; +0x1d0, 0x1000adc28\nSTR             W8, [X19,#0x340]                                       ; +0x1d4, 0x1000adc2c\nLDR             W8, [X20,#0x350]                                       ; +0x1d8, 0x1000adc30\nSTR             W8, [X19,#0x350]                                       ; +0x1dc, 0x1000adc34\nLDR             W8, [X20,#0x354]                                       ; +0x1e0, 0x1000adc38\nLDR             W9, [X20,#0x358]                                       ; +0x1e4, 0x1000adc3c\nSUB             W21, W8, W9                                            ; +0x1e8, 0x1000adc40\nSTR             W21, [X19,#0x35C]                                      ; +0x1ec, 0x1000adc44\nBL              _rand                                                  ; +0x1f0, 0x1000adc48\nSCVTF           S0, W0, #0x1F                                          ; +0x1f4, 0x1000adc4c\nFMUL            S0, S0, S8                                             ; +0x1f8, 0x1000adc50\nFCVTZS          W8, S0                                                 ; +0x1fc, 0x1000adc54\nSTR             W8, [X19,#0x358]                                       ; +0x200, 0x1000adc58\nADD             W8, W21, W8                                            ; +0x204, 0x1000adc5c\nSTR             W8, [X19,#0x354]                                       ; +0x208, 0x1000adc60\nLDR             W21, [X20,#0x368]                                      ; +0x20c, 0x1000adc64\nLDR             W22, [X20,#0x36C]                                      ; +0x210, 0x1000adc68\nCMP             W21, W22                                               ; +0x214, 0x1000adc6c\nCSET            W8, NE                                                 ; +0x218, 0x1000adc70\nSTR             W8, [X19,#0x370]                                       ; +0x21c, 0x1000adc74\nBL              _rand                                                  ; +0x220, 0x1000adc78\nCMP             W21, W22                                               ; +0x224, 0x1000adc7c\nSCVTF           S0, W0, #0x1F                                          ; +0x228, 0x1000adc80\nFMUL            S0, S0, S8                                             ; +0x22c, 0x1000adc84\nFCVTZS          W8, S0                                                 ; +0x230, 0x1000adc88\nSTR             W8, [X19,#0x36C]                                       ; +0x234, 0x1000adc8c\nCINC            W8, W8, NE                                             ; +0x238, 0x1000adc90\nSTR             W8, [X19,#0x368]                                       ; +0x23c, 0x1000adc94\nLDR             W8, [X20,#0x264]                                       ; +0x240, 0x1000adc98\nLDR             W9, [X20,#0x268]                                       ; +0x244, 0x1000adc9c\nSUB             W20, W8, W9                                            ; +0x248, 0x1000adca0\nSTR             W20, [X19,#0x26C]                                      ; +0x24c, 0x1000adca4\nBL              _rand                                                  ; +0x250, 0x1000adca8\nSCVTF           S0, W0, #0x1F                                          ; +0x254, 0x1000adcac\nFMUL            S0, S0, S8                                             ; +0x258, 0x1000adcb0\nFCVTZS          W8, S0                                                 ; +0x25c, 0x1000adcb4\nSTR             W8, [X19,#0x268]                                       ; +0x260, 0x1000adcb8\nADD             W8, W20, W8                                            ; +0x264, 0x1000adcbc\nSTR             W8, [X19,#0x264]                                       ; +0x268, 0x1000adcc0\nMOV             X0, X19                                                ; +0x26c, 0x1000adcc4\nLDP             X29, X30, [SP,#0x70+var_s0]                            ; +0x270, 0x1000adcc8\nLDP             X20, X19, [SP,#0x70+var_10]                            ; +0x274, 0x1000adccc\nLDP             X22, X21, [SP,#0x70+var_20]                            ; +0x278, 0x1000adcd0\nLDP             D9, D8, [SP,#0x70+var_30]                              ; +0x27c, 0x1000adcd4\nADD             SP, SP, #0x80                                          ; +0x280, 0x1000adcd8\nRET                                                                    ; +0x284, 0x1000adcdc", "xrefs": ["GJLevelList::getListLevelsArray @ 0x1000b12c8", "GJLevelList::addLevelToList @ 0x1000b14d0"], "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"}