{"type": "func", "start": 4296055456, "end": 4296055786, "name": "GJBaseGameLayer::updateSavePositionObjects", "pseudocode": "// \n// GJBaseGameLayer::updateSavePositionObjects from 0x100109aa0 to 0x100109bea (330 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::update @ 0x100130603\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:33 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::updateSavePositionObjects(__int64 a1, __m128 a2)\n{\n  __int64 LastPosition; // rcx\n  __int64 result; // rax\n  __int64 *v5; // r12\n  __int64 v6; // r13\n  int v7; // r13d\n  int v8; // edx\n  __int64 v9; // rsi\n  int v10; // eax\n  int v11; // r15d\n  __int64 v12; // rdi\n  int *v13; // [rsp+0h] [rbp-40h] BYREF\n  __int64 v14; // [rsp+8h] [rbp-38h]\n  int v15; // [rsp+10h] [rbp-30h] BYREF\n\n  LastPosition = *(unsigned int *)(a1 + 960);\n  if ( !(_DWORD)LastPosition )\n  {\n    result = *(unsigned int *)(a1 + 964);\n    goto LABEL_5;\n  }\n  LastPosition = (unsigned int)(LastPosition + 1000);\n  result = *(unsigned int *)(a1 + 964);\n  if ( (unsigned int)LastPosition <= (unsigned int)result )\n  {\nLABEL_5:\n    *(_DWORD *)(a1 + 960) = result;\n    ++*(_DWORD *)(a1 + 1140);\n    v5 = *(__int64 **)(a1 + 13248);\n    if ( !v5 )\n      return result;\n    v14 = a1 + 1204;\n    do\n    {\n      v10 = *((_DWORD *)v5 + 4);\n      v15 = v10;\n      v11 = *((_DWORD *)v5 + 5);\n      if ( v10 > 0 )\n      {\n        v13 = &v15;\n        v6 = sub_1000E7180((float *)(a1 + 13192), &v15, a2, (__int64)&unk_100A04ED8, &v13)[3];\n        LastPosition = GameObject::getLastPosition(v6);\n        v7 = *(_DWORD *)(v6 + 1340);\n      }\n      else\n      {\n        if ( v10 == -3 )\n        {\n          v7 = *(_DWORD *)(a1 + 1144);\n          LastPosition = v14;\n          goto LABEL_8;\n        }\n        if ( v10 == -2 )\n        {\n          v12 = *(_QWORD *)(a1 + 3264);\n          goto LABEL_15;\n        }\n        v7 = 0;\n        if ( v10 == -1 )\n        {\n          v12 = *(_QWORD *)(a1 + 3256);\nLABEL_15:\n          v7 = *(_DWORD *)(v12 + 1340);\n          LastPosition = GameObject::getLastPosition(v12);\n        }\n      }\nLABEL_8:\n      v8 = v7 + *(_DWORD *)(a1 + 1140) % v11;\n      v9 = *(_QWORD *)(a1 + 1112);\n      *(_DWORD *)(v9 + 8LL * v8) = *(_DWORD *)LastPosition;\n      a2 = (__m128)*(unsigned int *)(LastPosition + 4);\n      result = 2 * v8 + 1;\n      *(_DWORD *)(v9 + 4 * result) = a2.i32[0];\n      v5 = (__int64 *)*v5;\n    }\n    while ( v5 );\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::updateSavePositionObjects from 0x100109aa0 to 0x100109bea (330 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::update @ 0x100130603\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:33 +0000\n; \npush    rbp                                                            ; +0x0, 0x100109aa0\nmov     rbp, rsp                                                       ; +0x1, 0x100109aa1\npush    r15                                                            ; +0x4, 0x100109aa4\npush    r14                                                            ; +0x6, 0x100109aa6\npush    r13                                                            ; +0x8, 0x100109aa8\npush    r12                                                            ; +0xa, 0x100109aaa\npush    rbx                                                            ; +0xc, 0x100109aac\nsub     rsp, 18h                                                       ; +0xd, 0x100109aad\nmov     rbx, rdi                                                       ; +0x11, 0x100109ab1\nmov     ecx, [rdi+3C0h]                                                ; +0x14, 0x100109ab4\ntest    ecx, ecx                                                       ; +0x1a, 0x100109aba\njz      short loc_100109AD3                                            ; +0x1c, 0x100109abc\nadd     ecx, 3E8h                                                      ; +0x1e, 0x100109abe\nmov     eax, [rbx+3C4h]                                                ; +0x24, 0x100109ac4\ncmp     ecx, eax                                                       ; +0x2a, 0x100109aca\njbe     short loc_100109AD9                                            ; +0x2c, 0x100109acc\njmp     loc_100109BDB                                                  ; +0x2e, 0x100109ace\nmov     eax, [rbx+3C4h]                                                ; +0x33, 0x100109ad3\nmov     [rbx+3C0h], eax                                                ; +0x39, 0x100109ad9\ninc     dword ptr [rbx+474h]                                           ; +0x3f, 0x100109adf\nmov     r12, [rbx+33C0h]                                               ; +0x45, 0x100109ae5\ntest    r12, r12                                                       ; +0x4c, 0x100109aec\njz      loc_100109BDB                                                  ; +0x4f, 0x100109aef\nlea     rax, [rbx+4B4h]                                                ; +0x55, 0x100109af5\nmov     [rbp+var_38], rax                                              ; +0x5c, 0x100109afc\nlea     r14, [rbx+3388h]                                               ; +0x60, 0x100109b00\njmp     short loc_100109B80                                            ; +0x67, 0x100109b07\nalign 10h                                                              ; +0x69, 0x100109b09\nlea     rsi, [rbp+var_30]                                              ; +0x70, 0x100109b10\nmov     [rbp+var_40], rsi                                              ; +0x74, 0x100109b14\nmov     rdi, r14                                                       ; +0x78, 0x100109b18\nlea     rdx, unk_100A04ED8                                             ; +0x7b, 0x100109b1b\nlea     rcx, [rbp+var_40]                                              ; +0x82, 0x100109b22\nlea     r8, [rbp+var_29]                                               ; +0x86, 0x100109b26\ncall    sub_1000E7180                                                  ; +0x8a, 0x100109b2a\nmov     r13, [rax+18h]                                                 ; +0x8f, 0x100109b2f\nmov     rdi, r13                                                       ; +0x93, 0x100109b33\ncall    GameObject__getLastPosition                                    ; +0x96, 0x100109b36\nmov     rcx, rax                                                       ; +0x9b, 0x100109b3b\nmov     r13d, [r13+53Ch]                                               ; +0x9e, 0x100109b3e\nmov     eax, [rbx+474h]                                                ; +0xa5, 0x100109b45\ncdq                                                                    ; +0xab, 0x100109b4b\nidiv    r15d                                                           ; +0xac, 0x100109b4c\nadd     edx, r13d                                                      ; +0xaf, 0x100109b4f\nlea     eax, [rdx+rdx]                                                 ; +0xb2, 0x100109b52\nmovss   xmm0, dword ptr [rcx]                                          ; +0xb5, 0x100109b55\ncdqe                                                                   ; +0xb9, 0x100109b59\nmov     rsi, [rbx+458h]                                                ; +0xbb, 0x100109b5b\nmovss   dword ptr [rsi+rax*4], xmm0                                    ; +0xc2, 0x100109b62\nmovss   xmm0, dword ptr [rcx+4]                                        ; +0xc7, 0x100109b67\nlea     eax, [rdx+rdx+1]                                               ; +0xcc, 0x100109b6c\ncdqe                                                                   ; +0xd0, 0x100109b70\nmovss   dword ptr [rsi+rax*4], xmm0                                    ; +0xd2, 0x100109b72\nmov     r12, [r12]                                                     ; +0xd7, 0x100109b77\ntest    r12, r12                                                       ; +0xdb, 0x100109b7b\njz      short loc_100109BDB                                            ; +0xde, 0x100109b7e\nmov     eax, [r12+10h]                                                 ; +0xe0, 0x100109b80\nmov     [rbp+var_30], eax                                              ; +0xe5, 0x100109b85\nmov     r15d, [r12+14h]                                                ; +0xe8, 0x100109b88\ntest    eax, eax                                                       ; +0xed, 0x100109b8d\njg      loc_100109B10                                                  ; +0xef, 0x100109b8f\ncmp     eax, 0FFFFFFFDh                                                ; +0xf5, 0x100109b95\njz      short loc_100109BCB                                            ; +0xf8, 0x100109b98\ncmp     eax, 0FFFFFFFEh                                                ; +0xfa, 0x100109b9a\njz      short loc_100109BB0                                            ; +0xfd, 0x100109b9d\nxor     r13d, r13d                                                     ; +0xff, 0x100109b9f\ncmp     eax, 0FFFFFFFFh                                                ; +0x102, 0x100109ba2\njnz     short loc_100109B45                                            ; +0x105, 0x100109ba5\nmov     rdi, [rbx+0CB8h]                                               ; +0x107, 0x100109ba7\njmp     short loc_100109BB7                                            ; +0x10e, 0x100109bae\nmov     rdi, [rbx+0CC0h]                                               ; +0x110, 0x100109bb0\nmov     r13d, [rdi+53Ch]                                               ; +0x117, 0x100109bb7\ncall    GameObject__getLastPosition                                    ; +0x11e, 0x100109bbe\nmov     rcx, rax                                                       ; +0x123, 0x100109bc3\njmp     loc_100109B45                                                  ; +0x126, 0x100109bc6\nmov     r13d, [rbx+478h]                                               ; +0x12b, 0x100109bcb\nmov     rcx, [rbp+var_38]                                              ; +0x132, 0x100109bd2\njmp     loc_100109B45                                                  ; +0x136, 0x100109bd6\nadd     rsp, 18h                                                       ; +0x13b, 0x100109bdb\npop     rbx                                                            ; +0x13f, 0x100109bdf\npop     r12                                                            ; +0x140, 0x100109be0\npop     r13                                                            ; +0x142, 0x100109be2\npop     r14                                                            ; +0x144, 0x100109be4\npop     r15                                                            ; +0x146, 0x100109be6\npop     rbp                                                            ; +0x148, 0x100109be8\nretn                                                                   ; +0x149, 0x100109be9", "xrefs": ["GJBaseGameLayer::update @ 0x100130603"], "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"}