{"type": "func", "start": 4296245408, "end": 4296245810, "name": "GJBaseGameLayer::loadLevelSettings", "pseudocode": "// \n// GJBaseGameLayer::loadLevelSettings from 0x1001380a0 to 0x100138232 (402 bytes)\n// \n// 5 xrefs:\n// > PlayLayer::prepareCreateObjectsFromSetup @ 0x10007a6cb\n// > LevelEditorLayer::init @ 0x1000aac62\n// > LevelEditorLayer::createObjectsFromSetup @ 0x1000abd18\n// > LevelEditorLayer::levelSettingsUpdated @ 0x1000ae71f\n// > LevelEditorLayer::onPlaytest @ 0x1000c5af8\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:24:51 +0000\n// \n\nunsigned int *__fastcall GJBaseGameLayer::loadLevelSettings(__int64 a1)\n{\n  __int64 v2; // rdi\n  __int64 v3; // rax\n  __int64 v4; // rcx\n  __int64 v5; // rdi\n  char v6; // dl\n  __int64 v7; // rsi\n  char v8; // dl\n  unsigned int *result; // rax\n  _QWORD *v10; // r15\n  unsigned __int64 v11; // r12\n  _BYTE *v12; // r14\n\n  v2 = *(_QWORD *)(a1 + 3256);\n  *(_BYTE *)(a1 + 12238) = *(_BYTE *)(*(_QWORD *)(a1 + 3272) + 341LL);\n  PlayerObject::togglePlatformerMode(v2);\n  PlayerObject::togglePlatformerMode(*(_QWORD *)(a1 + 3264));\n  v3 = *(_QWORD *)(a1 + 1936);\n  if ( *(_BYTE *)(a1 + 12238) == 1 )\n    *(_DWORD *)(v3 + 900) = 5;\n  v4 = *(_QWORD *)(a1 + 3256);\n  v5 = *(_QWORD *)(a1 + 3272);\n  v6 = *(_BYTE *)(v5 + 452) ^ 1;\n  *(_BYTE *)(v4 + 2904) = v6;\n  v7 = *(_QWORD *)(a1 + 3264);\n  *(_BYTE *)(v7 + 2904) = v6;\n  v8 = *(_BYTE *)(v5 + 461) ^ 1;\n  *(_BYTE *)(v4 + 2528) = v8;\n  *(_BYTE *)(v7 + 2528) = v8;\n  if ( *(int *)(v3 + 1232) > 0 )\n  {\n    if ( !LevelSettingsObject::shouldUseYSection(v5) )\n      goto LABEL_5;\nLABEL_8:\n    *(_DWORD *)(a1 + 13636) = 1008981770;\n    result = *(unsigned int **)(a1 + 3280);\n    if ( !result )\n      return result;\n    goto LABEL_9;\n  }\n  *(_DWORD *)(v3 + 1232) = *(_DWORD *)(v5 + 432);\n  if ( LevelSettingsObject::shouldUseYSection(v5) )\n    goto LABEL_8;\nLABEL_5:\n  *(_DWORD *)(a1 + 13636) = 0;\n  result = *(unsigned int **)(a1 + 3280);\n  if ( result )\n  {\nLABEL_9:\n    result = *((unsigned int **)result + 7);\n    if ( !*result )\n      return result;\n    v10 = *((_QWORD **)result + 2);\n    v11 = (unsigned __int64)&v10[*result - 1];\n    do\n    {\n      v12 = (_BYTE *)*v10;\n      if ( !*v10 )\n        return result;\n      if ( *(_BYTE *)(a1 + 1980) )\n      {\n        v12[868] = 1;\n        result = (unsigned int *)*(unsigned __int8 *)(a1 + 1981);\n        if ( v12[869] != (_BYTE)result )\n          goto LABEL_17;\n      }\n      else\n      {\n        v12[868] = GameObject::canRotateFree(*v10);\n        result = (unsigned int *)*(unsigned __int8 *)(a1 + 1981);\n        if ( v12[869] != (_BYTE)result )\nLABEL_17:\n          v12[864] = 1;\n      }\n      v12[869] = (_BYTE)result;\n      ++v10;\n    }\n    while ( (unsigned __int64)v10 <= v11 );\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::loadLevelSettings from 0x1001380a0 to 0x100138232 (402 bytes)\n; \n; 5 xrefs:\n; > PlayLayer::prepareCreateObjectsFromSetup @ 0x10007a6cb\n; > LevelEditorLayer::init @ 0x1000aac62\n; > LevelEditorLayer::createObjectsFromSetup @ 0x1000abd18\n; > LevelEditorLayer::levelSettingsUpdated @ 0x1000ae71f\n; > LevelEditorLayer::onPlaytest @ 0x1000c5af8\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:24:51 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001380a0\nmov     rbp, rsp                                                       ; +0x1, 0x1001380a1\npush    r15                                                            ; +0x4, 0x1001380a4\npush    r14                                                            ; +0x6, 0x1001380a6\npush    r12                                                            ; +0x8, 0x1001380a8\npush    rbx                                                            ; +0xa, 0x1001380aa\nmov     rbx, rdi                                                       ; +0xb, 0x1001380ab\nmov     rdi, [rdi+0CB8h]                                               ; +0xe, 0x1001380ae\nmov     rax, [rbx+0CC8h]                                               ; +0x15, 0x1001380b5\nmovzx   esi, byte ptr [rax+155h]                                       ; +0x1c, 0x1001380bc\nmov     [rbx+2FCEh], sil                                               ; +0x23, 0x1001380c3\ncall    PlayerObject__togglePlatformerMode                             ; +0x2a, 0x1001380ca\nmov     rdi, [rbx+0CC0h]                                               ; +0x2f, 0x1001380cf\nmovzx   esi, byte ptr [rbx+2FCEh]                                      ; +0x36, 0x1001380d6\ncall    PlayerObject__togglePlatformerMode                             ; +0x3d, 0x1001380dd\nmov     rax, [rbx+790h]                                                ; +0x42, 0x1001380e2\ncmp     byte ptr [rbx+2FCEh], 1                                        ; +0x49, 0x1001380e9\njnz     short loc_1001380FC                                            ; +0x50, 0x1001380f0\nmov     dword ptr [rax+384h], 5                                        ; +0x52, 0x1001380f2\nmov     rcx, [rbx+0CB8h]                                               ; +0x5c, 0x1001380fc\nmov     rdi, [rbx+0CC8h]                                               ; +0x63, 0x100138103\nmovzx   edx, byte ptr [rdi+1C4h]                                       ; +0x6a, 0x10013810a\nxor     dl, 1                                                          ; +0x71, 0x100138111\nmov     [rcx+0B58h], dl                                                ; +0x74, 0x100138114\nmov     rsi, [rbx+0CC0h]                                               ; +0x7a, 0x10013811a\nmov     [rsi+0B58h], dl                                                ; +0x81, 0x100138121\nmovzx   edx, byte ptr [rdi+1CDh]                                       ; +0x87, 0x100138127\nxor     dl, 1                                                          ; +0x8e, 0x10013812e\nmov     [rcx+9E0h], dl                                                 ; +0x91, 0x100138131\nmov     [rsi+9E0h], dl                                                 ; +0x97, 0x100138137\ncmp     dword ptr [rax+4D0h], 0                                        ; +0x9d, 0x10013813d\njle     short loc_10013816B                                            ; +0xa4, 0x100138144\ncall    LevelSettingsObject__shouldUseYSection                         ; +0xa6, 0x100138146\ntest    al, al                                                         ; +0xab, 0x10013814b\njnz     short loc_100138180                                            ; +0xad, 0x10013814d\nxorps   xmm0, xmm0                                                     ; +0xaf, 0x10013814f\nmovss   dword ptr [rbx+3544h], xmm0                                    ; +0xb2, 0x100138152\nmov     rax, [rbx+0CD0h]                                               ; +0xba, 0x10013815a\ntest    rax, rax                                                       ; +0xc1, 0x100138161\njnz     short loc_1001381A0                                            ; +0xc4, 0x100138164\njmp     loc_100138229                                                  ; +0xc6, 0x100138166\nmov     ecx, [rdi+1B0h]                                                ; +0xcb, 0x10013816b\nmov     [rax+4D0h], ecx                                                ; +0xd1, 0x100138171\ncall    LevelSettingsObject__shouldUseYSection                         ; +0xd7, 0x100138177\ntest    al, al                                                         ; +0xdc, 0x10013817c\njz      short loc_10013814F                                            ; +0xde, 0x10013817e\nmovss   xmm0, cs:dword_100A0373C                                       ; +0xe0, 0x100138180\nmovss   dword ptr [rbx+3544h], xmm0                                    ; +0xe8, 0x100138188\nmov     rax, [rbx+0CD0h]                                               ; +0xf0, 0x100138190\ntest    rax, rax                                                       ; +0xf7, 0x100138197\njz      loc_100138229                                                  ; +0xfa, 0x10013819a\nmov     rax, [rax+38h]                                                 ; +0x100, 0x1001381a0\nmov     ecx, [rax]                                                     ; +0x104, 0x1001381a4\ntest    rcx, rcx                                                       ; +0x106, 0x1001381a6\njz      loc_100138229                                                  ; +0x109, 0x1001381a9\nmov     r15, [rax+10h]                                                 ; +0x10f, 0x1001381af\nlea     r12, [r15+rcx*8]                                               ; +0x113, 0x1001381b3\nadd     r12, 0FFFFFFFFFFFFFFF8h                                        ; +0x117, 0x1001381b7\njmp     short loc_1001381D0                                            ; +0x11b, 0x1001381bb\nalign 20h                                                              ; +0x11d, 0x1001381bd\nmov     [r14+365h], al                                                 ; +0x120, 0x1001381c0\nadd     r15, 8                                                         ; +0x127, 0x1001381c7\ncmp     r15, r12                                                       ; +0x12b, 0x1001381cb\nja      short loc_100138229                                            ; +0x12e, 0x1001381ce\nmov     r14, [r15]                                                     ; +0x130, 0x1001381d0\ntest    r14, r14                                                       ; +0x133, 0x1001381d3\njz      short loc_100138229                                            ; +0x136, 0x1001381d6\nmov     al, 1                                                          ; +0x138, 0x1001381d8\ncmp     byte ptr [rbx+7BCh], 0                                         ; +0x13a, 0x1001381da\njz      short loc_100138200                                            ; +0x141, 0x1001381e1\nmov     [r14+364h], al                                                 ; +0x143, 0x1001381e3\nmovzx   eax, byte ptr [rbx+7BDh]                                       ; +0x14a, 0x1001381ea\ncmp     [r14+365h], al                                                 ; +0x151, 0x1001381f1\njz      short loc_1001381C0                                            ; +0x158, 0x1001381f8\njmp     short loc_10013821F                                            ; +0x15a, 0x1001381fa\nalign 20h                                                              ; +0x15c, 0x1001381fc\nmov     rdi, r14                                                       ; +0x160, 0x100138200\ncall    GameObject__canRotateFree                                      ; +0x163, 0x100138203\nmov     [r14+364h], al                                                 ; +0x168, 0x100138208\nmovzx   eax, byte ptr [rbx+7BDh]                                       ; +0x16f, 0x10013820f\ncmp     [r14+365h], al                                                 ; +0x176, 0x100138216\njz      short loc_1001381C0                                            ; +0x17d, 0x10013821d\nmov     byte ptr [r14+360h], 1                                         ; +0x17f, 0x10013821f\njmp     short loc_1001381C0                                            ; +0x187, 0x100138227\npop     rbx                                                            ; +0x189, 0x100138229\npop     r12                                                            ; +0x18a, 0x10013822a\npop     r14                                                            ; +0x18c, 0x10013822c\npop     r15                                                            ; +0x18e, 0x10013822e\npop     rbp                                                            ; +0x190, 0x100138230\nretn                                                                   ; +0x191, 0x100138231", "xrefs": ["PlayLayer::prepareCreateObjectsFromSetup @ 0x10007a6cb", "LevelEditorLayer::init @ 0x1000aac62", "LevelEditorLayer::createObjectsFromSetup @ 0x1000abd18", "LevelEditorLayer::levelSettingsUpdated @ 0x1000ae71f", "LevelEditorLayer::onPlaytest @ 0x1000c5af8"], "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"}