{"type": "func", "start": 4295953856, "end": 4295954002, "name": "GJBaseGameLayer::createMiddleground", "pseudocode": "// \n// GJBaseGameLayer::createMiddleground from 0x1000f0dc0 to 0x1000f0e52 (146 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x10007b4e6\n// > LevelEditorLayer::init @ 0x1000aad56\n// > LevelSettingsLayer::selectArtClosed @ 0x1002595b6\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:21:11 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::createMiddleground(__int64 a1, int a2, double a3)\n{\n  __int64 v4; // rdi\n  __int64 result; // rax\n  unsigned int v6; // r15d\n  __int64 v7; // rax\n\n  v4 = *(_QWORD *)(a1 + 3976);\n  if ( v4 )\n  {\n    result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 520LL))(v4);\n    *(_QWORD *)(a1 + 3976) = 0;\n  }\n  if ( a2 > 0 )\n  {\n    v6 = 3;\n    if ( (unsigned int)a2 < 3 )\n      v6 = a2;\n    v7 = GJMGLayer::create(v6, a3);\n    *(_QWORD *)(a1 + 3976) = v7;\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 72LL))(v7, v6);\n    return (*(__int64 (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 3896) + 464LL))(\n             *(_QWORD *)(a1 + 3896),\n             *(_QWORD *)(a1 + 3976),\n             4294967257LL);\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::createMiddleground from 0x1000f0dc0 to 0x1000f0e52 (146 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x10007b4e6\n; > LevelEditorLayer::init @ 0x1000aad56\n; > LevelSettingsLayer::selectArtClosed @ 0x1002595b6\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:21:11 +0000\n; \npush    rbp                                                            ; +0x0, 0x1000f0dc0\nmov     rbp, rsp                                                       ; +0x1, 0x1000f0dc1\npush    r15                                                            ; +0x4, 0x1000f0dc4\npush    r14                                                            ; +0x6, 0x1000f0dc6\npush    rbx                                                            ; +0x8, 0x1000f0dc8\npush    rax                                                            ; +0x9, 0x1000f0dc9\nmov     r14d, esi                                                      ; +0xa, 0x1000f0dca\nmov     rbx, rdi                                                       ; +0xd, 0x1000f0dcd\nmov     rdi, [rdi+0F88h]                                               ; +0x10, 0x1000f0dd0\ntest    rdi, rdi                                                       ; +0x17, 0x1000f0dd7\njz      short loc_1000F0DF0                                            ; +0x1a, 0x1000f0dda\nmov     rax, [rdi]                                                     ; +0x1c, 0x1000f0ddc\ncall    qword ptr [rax+208h]                                           ; +0x1f, 0x1000f0ddf\nmov     qword ptr [rbx+0F88h], 0                                       ; +0x25, 0x1000f0de5\ntest    r14d, r14d                                                     ; +0x30, 0x1000f0df0\njle     short loc_1000F0E47                                            ; +0x33, 0x1000f0df3\ncmp     r14d, 3                                                        ; +0x35, 0x1000f0df5\nmov     r15d, 3                                                        ; +0x39, 0x1000f0df9\ncmovb   r15d, r14d                                                     ; +0x3f, 0x1000f0dff\nmov     edi, r15d                                                      ; +0x43, 0x1000f0e03\ncall    GJMGLayer__create                                              ; +0x46, 0x1000f0e06\nmov     [rbx+0F88h], rax                                               ; +0x4b, 0x1000f0e0b\nmov     rcx, [rax]                                                     ; +0x52, 0x1000f0e12\nmov     rdi, rax                                                       ; +0x55, 0x1000f0e15\nmov     esi, r15d                                                      ; +0x58, 0x1000f0e18\ncall    qword ptr [rcx+48h]                                            ; +0x5b, 0x1000f0e1b\nmov     rdi, [rbx+0F38h]                                               ; +0x5e, 0x1000f0e1e\nmov     rsi, [rbx+0F88h]                                               ; +0x65, 0x1000f0e25\nmov     rax, [rdi]                                                     ; +0x6c, 0x1000f0e2c\nmov     rax, [rax+1D0h]                                                ; +0x6f, 0x1000f0e2f\nmov     edx, 0FFFFFFD9h                                                ; +0x76, 0x1000f0e36\nadd     rsp, 8                                                         ; +0x7b, 0x1000f0e3b\npop     rbx                                                            ; +0x7f, 0x1000f0e3f\npop     r14                                                            ; +0x80, 0x1000f0e40\npop     r15                                                            ; +0x82, 0x1000f0e42\npop     rbp                                                            ; +0x84, 0x1000f0e44\njmp     rax                                                            ; +0x85, 0x1000f0e45\nadd     rsp, 8                                                         ; +0x87, 0x1000f0e47\npop     rbx                                                            ; +0x8b, 0x1000f0e4b\npop     r14                                                            ; +0x8c, 0x1000f0e4c\npop     r15                                                            ; +0x8e, 0x1000f0e4e\npop     rbp                                                            ; +0x90, 0x1000f0e50\nretn                                                                   ; +0x91, 0x1000f0e51", "xrefs": ["PlayLayer::setupHasCompleted @ 0x10007b4e6", "LevelEditorLayer::init @ 0x1000aad56", "LevelSettingsLayer::selectArtClosed @ 0x1002595b6"], "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"}