{"type": "func", "start": 4296989672, "end": 4296989868, "name": "GJBaseGameLayer::registerSpawnRemap", "pseudocode": "// \n// GJBaseGameLayer::registerSpawnRemap from 0x1001edbe8 to 0x1001edcac (196 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::generateSpawnRemap @ 0x1001dfcd0\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\nint __fastcall GJBaseGameLayer::registerSpawnRemap(GJBaseGameLayer *a1, std::vector<ChanceObject> *a2)\n{\n  std::__vector_base<ChanceObject>::pointer begin; // x20\n  ChanceObject *end; // x22\n  int m_chance; // w23\n  std::__vector_base<std::unordered_map<int, int>>::pointer v7; // x0\n  _OWORD v9[2]; // [xsp+0h] [xbp-60h] BYREF\n  int v10; // [xsp+20h] [xbp-40h]\n\n  memset(v9, 0, sizeof(v9));\n  v10 = 1065353216;\n  sub_1001EDBA4((__int64)&a1->m_spawnRemapTriggers);\n  sub_100017A98((__int64)v9);\n  begin = a2->__begin_;\n  end = a2->__end_;\n  if ( a2->__begin_ != end )\n  {\n    do\n    {\n      m_chance = begin->m_chance;\n      v7 = a1->m_spawnRemapTriggers.__end_ - 1;\n      *(_QWORD *)&v9[0] = begin;\n      *((_DWORD *)sub_10001D150((unsigned __int64)v7, &begin->m_groupID, (__int64)&unk_10063A31C, (_DWORD **)v9) + 5) = m_chance;\n      ++begin;\n    }\n    while ( begin != end );\n  }\n  return -858993459\n       * ((unsigned __int64)((char *)a1->m_spawnRemapTriggers.__end_ - (char *)a1->m_spawnRemapTriggers.__begin_) >> 3)\n       - 1;\n}", "assembly": "; \n; GJBaseGameLayer::registerSpawnRemap from 0x1001edbe8 to 0x1001edcac (196 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::generateSpawnRemap @ 0x1001dfcd0\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, #0x70                                          ; +0x0, 0x1001edbe8\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x4, 0x1001edbec\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x8, 0x1001edbf0\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0xc, 0x1001edbf4\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x10, 0x1001edbf8\nADD             X29, SP, #0x60                                         ; +0x14, 0x1001edbfc\nMOV             X21, X1                                                ; +0x18, 0x1001edc00\nMOV             X19, X0                                                ; +0x1c, 0x1001edc04\nMOVI            V0.16B, #0                                             ; +0x20, 0x1001edc08\nSTP             Q0, Q0, [SP,#0x60+var_60]                              ; +0x24, 0x1001edc0c\nMOV             W8, #0x3F800000                                        ; +0x28, 0x1001edc10\nSTR             W8, [SP,#0x60+var_40]                                  ; +0x2c, 0x1001edc14\nADD             X0, X0, #0x810                                         ; +0x30, 0x1001edc18\nMOV             X1, SP                                                 ; +0x34, 0x1001edc1c\nBL              sub_1001EDBA4                                          ; +0x38, 0x1001edc20\nMOV             X0, SP                                                 ; +0x3c, 0x1001edc24\nBL              sub_100017A98                                          ; +0x40, 0x1001edc28\nLDP             X20, X22, [X21]                                        ; +0x44, 0x1001edc2c\nCMP             X20, X22                                               ; +0x48, 0x1001edc30\nB.EQ            loc_1001EDC74                                          ; +0x4c, 0x1001edc34\nADRL            X21, unk_10063A31C                                     ; +0x50, 0x1001edc38\nLDR             W23, [X20,#8]                                          ; +0x58, 0x1001edc40\nLDR             X8, [X19,#0x818]                                       ; +0x5c, 0x1001edc44\nSUB             X0, X8, #0x28 ; '('                                    ; +0x60, 0x1001edc48\nSTR             X20, [SP,#0x60+var_60]                                 ; +0x64, 0x1001edc4c\nMOV             X3, SP                                                 ; +0x68, 0x1001edc50\nADD             X4, SP, #0x60+var_31                                   ; +0x6c, 0x1001edc54\nMOV             X1, X20                                                ; +0x70, 0x1001edc58\nMOV             X2, X21                                                ; +0x74, 0x1001edc5c\nBL              sub_10001D150                                          ; +0x78, 0x1001edc60\nSTR             W23, [X0,#0x14]                                        ; +0x7c, 0x1001edc64\nADD             X20, X20, #0x10                                        ; +0x80, 0x1001edc68\nCMP             X20, X22                                               ; +0x84, 0x1001edc6c\nB.NE            loc_1001EDC40                                          ; +0x88, 0x1001edc70\nLDR             X8, [X19,#0x818]                                       ; +0x8c, 0x1001edc74\nLDR             X9, [X19,#0x810]                                       ; +0x90, 0x1001edc78\nSUB             X8, X8, X9                                             ; +0x94, 0x1001edc7c\nLSR             X8, X8, #3                                             ; +0x98, 0x1001edc80\nMOV             W9, #0xCCCCCCCD                                        ; +0x9c, 0x1001edc84\nMOV             W10, #0xFFFFFFFF                                       ; +0xa4, 0x1001edc8c\nMADD            W0, W8, W9, W10                                        ; +0xa8, 0x1001edc90\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0xac, 0x1001edc94\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0xb0, 0x1001edc98\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0xb4, 0x1001edc9c\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0xb8, 0x1001edca0\nADD             SP, SP, #0x70 ; 'p'                                    ; +0xbc, 0x1001edca4\nRET                                                                    ; +0xc0, 0x1001edca8", "xrefs": ["GJBaseGameLayer::generateSpawnRemap @ 0x1001dfcd0"], "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"}