{"type": "func", "start": 4296246240, "end": 4296246507, "name": "GJBaseGameLayer::syncBGTextures", "pseudocode": "// \n// GJBaseGameLayer::syncBGTextures from 0x1001383e0 to 0x1001384eb (267 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::resetLevel @ 0x10008d40e\n// > LevelEditorLayer::onPlaytest @ 0x1000c6041\n// > LevelEditorLayer::onStopPlaytest @ 0x1000c6d26\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\n__int64 __fastcall GJBaseGameLayer::syncBGTextures(__int64 a1, double a2)\n{\n  int v3; // eax\n  __int64 v4; // rdx\n  __int64 v5; // rsi\n  __int64 result; // rax\n  int v7; // esi\n  __int64 v8; // rdi\n  int v9; // r15d\n  __int64 v10; // rdi\n  unsigned int v11; // r14d\n  __int64 v12; // rax\n\n  v3 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3944) + 64LL))(*(_QWORD *)(a1 + 3944));\n  v5 = *(unsigned int *)(a1 + 1900);\n  if ( v3 != (_DWORD)v5 )\n    GJBaseGameLayer::createBackground(a1, v5, v4);\n  result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3960) + 64LL))(*(_QWORD *)(a1 + 3960));\n  v7 = *(_DWORD *)(a1 + 1904);\n  if ( (_DWORD)result != v7 )\n    result = GJBaseGameLayer::createGroundLayer(a1, v7, *(_DWORD *)(*(_QWORD *)(a1 + 3272) + 424LL));\n  v8 = *(_QWORD *)(a1 + 3976);\n  if ( v8 )\n  {\n    result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 64LL))(v8);\n    v9 = *(_DWORD *)(a1 + 1908);\n    v10 = *(_QWORD *)(a1 + 3976);\n    if ( (_DWORD)result == v9 )\n    {\n      if ( v10 )\n        return result;\n      v9 = result;\n    }\n    else if ( v10 )\n    {\n      result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 520LL))(v10);\n      *(_QWORD *)(a1 + 3976) = 0;\n    }\n  }\n  else\n  {\n    v9 = *(_DWORD *)(a1 + 1908);\n  }\n  if ( v9 > 0 )\n  {\n    v11 = 3;\n    if ( (unsigned int)v9 < 3 )\n      v11 = v9;\n    v12 = GJMGLayer::create(v11, a2);\n    *(_QWORD *)(a1 + 3976) = v12;\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v12 + 72LL))(v12, v11);\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::syncBGTextures from 0x1001383e0 to 0x1001384eb (267 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::resetLevel @ 0x10008d40e\n; > LevelEditorLayer::onPlaytest @ 0x1000c6041\n; > LevelEditorLayer::onStopPlaytest @ 0x1000c6d26\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, 0x1001383e0\nmov     rbp, rsp                                                       ; +0x1, 0x1001383e1\npush    r15                                                            ; +0x4, 0x1001383e4\npush    r14                                                            ; +0x6, 0x1001383e6\npush    rbx                                                            ; +0x8, 0x1001383e8\npush    rax                                                            ; +0x9, 0x1001383e9\nmov     rbx, rdi                                                       ; +0xa, 0x1001383ea\nmov     rdi, [rdi+0F68h]                                               ; +0xd, 0x1001383ed\nmov     rax, [rdi]                                                     ; +0x14, 0x1001383f4\ncall    qword ptr [rax+40h]                                            ; +0x17, 0x1001383f7\nmov     esi, [rbx+76Ch]                                                ; +0x1a, 0x1001383fa\ncmp     eax, esi                                                       ; +0x20, 0x100138400\njz      short loc_10013840C                                            ; +0x22, 0x100138402\nmov     rdi, rbx                                                       ; +0x24, 0x100138404\ncall    GJBaseGameLayer__createBackground                              ; +0x27, 0x100138407\nmov     rdi, [rbx+0F78h]                                               ; +0x2c, 0x10013840c\nmov     rax, [rdi]                                                     ; +0x33, 0x100138413\ncall    qword ptr [rax+40h]                                            ; +0x36, 0x100138416\nmov     esi, [rbx+770h]                                                ; +0x39, 0x100138419\ncmp     eax, esi                                                       ; +0x3f, 0x10013841f\njz      short loc_100138438                                            ; +0x41, 0x100138421\nmov     rax, [rbx+0CC8h]                                               ; +0x43, 0x100138423\nmov     edx, [rax+1A8h]                                                ; +0x4a, 0x10013842a\nmov     rdi, rbx                                                       ; +0x50, 0x100138430\ncall    GJBaseGameLayer__createGroundLayer                             ; +0x53, 0x100138433\nmov     rdi, [rbx+0F88h]                                               ; +0x58, 0x100138438\ntest    rdi, rdi                                                       ; +0x5f, 0x10013843f\njz      short loc_100138467                                            ; +0x62, 0x100138442\nmov     rax, [rdi]                                                     ; +0x64, 0x100138444\ncall    qword ptr [rax+40h]                                            ; +0x67, 0x100138447\nmov     r15d, [rbx+774h]                                               ; +0x6a, 0x10013844a\nmov     rdi, [rbx+0F88h]                                               ; +0x71, 0x100138451\ncmp     eax, r15d                                                      ; +0x78, 0x100138458\njnz     short loc_100138470                                            ; +0x7b, 0x10013845b\ntest    rdi, rdi                                                       ; +0x7d, 0x10013845d\njnz     short loc_1001384E0                                            ; +0x80, 0x100138460\nmov     r15d, eax                                                      ; +0x82, 0x100138462\njmp     short loc_100138489                                            ; +0x85, 0x100138465\nmov     r15d, [rbx+774h]                                               ; +0x87, 0x100138467\njmp     short loc_100138489                                            ; +0x8e, 0x10013846e\ntest    rdi, rdi                                                       ; +0x90, 0x100138470\njz      short loc_100138489                                            ; +0x93, 0x100138473\nmov     rax, [rdi]                                                     ; +0x95, 0x100138475\ncall    qword ptr [rax+208h]                                           ; +0x98, 0x100138478\nmov     qword ptr [rbx+0F88h], 0                                       ; +0x9e, 0x10013847e\ntest    r15d, r15d                                                     ; +0xa9, 0x100138489\njle     short loc_1001384E0                                            ; +0xac, 0x10013848c\ncmp     r15d, 3                                                        ; +0xae, 0x10013848e\nmov     r14d, 3                                                        ; +0xb2, 0x100138492\ncmovb   r14d, r15d                                                     ; +0xb8, 0x100138498\nmov     edi, r14d                                                      ; +0xbc, 0x10013849c\ncall    GJMGLayer__create                                              ; +0xbf, 0x10013849f\nmov     [rbx+0F88h], rax                                               ; +0xc4, 0x1001384a4\nmov     rcx, [rax]                                                     ; +0xcb, 0x1001384ab\nmov     rdi, rax                                                       ; +0xce, 0x1001384ae\nmov     esi, r14d                                                      ; +0xd1, 0x1001384b1\ncall    qword ptr [rcx+48h]                                            ; +0xd4, 0x1001384b4\nmov     rdi, [rbx+0F38h]                                               ; +0xd7, 0x1001384b7\nmov     rsi, [rbx+0F88h]                                               ; +0xde, 0x1001384be\nmov     rax, [rdi]                                                     ; +0xe5, 0x1001384c5\nmov     rax, [rax+1D0h]                                                ; +0xe8, 0x1001384c8\nmov     edx, 0FFFFFFD9h                                                ; +0xef, 0x1001384cf\nadd     rsp, 8                                                         ; +0xf4, 0x1001384d4\npop     rbx                                                            ; +0xf8, 0x1001384d8\npop     r14                                                            ; +0xf9, 0x1001384d9\npop     r15                                                            ; +0xfb, 0x1001384db\npop     rbp                                                            ; +0xfd, 0x1001384dd\njmp     rax                                                            ; +0xfe, 0x1001384de\nadd     rsp, 8                                                         ; +0x100, 0x1001384e0\npop     rbx                                                            ; +0x104, 0x1001384e4\npop     r14                                                            ; +0x105, 0x1001384e5\npop     r15                                                            ; +0x107, 0x1001384e7\npop     rbp                                                            ; +0x109, 0x1001384e9\nretn                                                                   ; +0x10a, 0x1001384ea", "xrefs": ["PlayLayer::resetLevel @ 0x10008d40e", "LevelEditorLayer::onPlaytest @ 0x1000c6041", "LevelEditorLayer::onStopPlaytest @ 0x1000c6d26"], "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"}