{"type": "func", "start": 5371995488, "end": 5371996062, "name": "GJBaseGameLayer::spawnObjectsInOrder", "pseudocode": "// \n// GJBaseGameLayer::spawnObjectsInOrder from 0x140322560 to 0x14032279e (574 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::spawnGroup @ 0x1403224e9\n// > <???> @ 0x14091eecc\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 11:30:23 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nchar __fastcall GJBaseGameLayer::spawnObjectsInOrder(__int64 a1, __int64 a2, double a3, char **a4, int a5, int a6)\n{\n  _UNKNOWN **v6; // rax\n  float v9; // xmm6_4\n  char v10; // r15\n  unsigned int *v11; // rsi\n  __int64 *v12; // rsi\n  __int64 *i; // r13\n  __int64 v14; // rbx\n  bool v15; // zf\n  float *v16; // rax\n  __int64 v17; // r8\n  float v18; // xmm0_4\n  __int64 v19; // rbp\n  __int64 v20; // rdi\n  int v22; // [rsp+40h] [rbp-88h] BYREF\n  float v23; // [rsp+48h] [rbp-80h] BYREF\n  __int64 v24; // [rsp+50h] [rbp-78h] BYREF\n  _UNKNOWN *retaddr; // [rsp+C8h] [rbp+0h] BYREF\n  __int64 v26; // [rsp+D0h] [rbp+8h] BYREF\n\n  v6 = &retaddr;\n  if ( !*(_BYTE *)(a1 + 13648) )\n  {\n    v9 = 0.0;\n    v10 = 0;\n    if ( a2 )\n    {\n      v11 = *(unsigned int **)(a2 + 56);\n      v6 = (_UNKNOWN **)*v11;\n      if ( (_DWORD)v6 )\n      {\n        v12 = *((__int64 **)v11 + 2);\n        for ( i = &v12[(_QWORD)v6 - 1]; v12 <= i; ++v12 )\n        {\n          v14 = *v12;\n          if ( !*v12 )\n            return (char)v6;\n          if ( *(_DWORD *)(v14 + 1256) == 1 )\n          {\n            LOBYTE(v6) = GameObject::isSpawnableTrigger(*v12);\n            v15 = (_BYTE)v6 == 0;\n          }\n          else\n          {\n            if ( *(_DWORD *)(v14 + 1036) != 2065 )\n              continue;\n            v15 = *(_BYTE *)(v14 + 1433) == 0;\n          }\n          if ( !v15 )\n          {\n            v16 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);\n            if ( !v10 )\n            {\n              v9 = *v16;\n              v10 = 1;\n              goto LABEL_14;\n            }\n            v18 = (float)(*v16 - v9) / 311.5801086425781 - a3;\n            if ( v18 > 0.0 )\n            {\n              LODWORD(v26) = a6;\n              v22 = a5;\n              v23 = v18;\n              v24 = v14;\n              v19 = *(_QWORD *)(a1 + 2408);\n              v20 = *(_QWORD *)(v19 + 1464);\n              if ( v20 == *(_QWORD *)(v19 + 1472) )\n              {\n                LOBYTE(v6) = sub_140375140(\n                               (int)v19 + 1456,\n                               v20,\n                               (unsigned int)&v24,\n                               (unsigned int)&v23,\n                               (__int64)a4,\n                               (__int64)&v22,\n                               (__int64)&v26);\n              }\n              else\n              {\n                v26 = *(_QWORD *)(v19 + 1464);\n                *(_WORD *)v20 = 0;\n                *(_QWORD *)(v20 + 16) = 0;\n                *(_QWORD *)(v20 + 24) = 0;\n                *(_DWORD *)(v20 + 32) = 0;\n                *(_BYTE *)(v20 + 36) = 0;\n                *(_QWORD *)(v20 + 48) = 0;\n                *(_QWORD *)(v20 + 56) = 0;\n                *(_QWORD *)(v20 + 64) = 0;\n                *(_QWORD *)(v20 + 40) = v14;\n                *(double *)(v20 + 8) = v18;\n                sub_140099FC0((void **)(v20 + 48), a4);\n                *(_DWORD *)(v20 + 28) = a5;\n                LOBYTE(v6) = a6;\n                *(_DWORD *)(v20 + 32) = a6;\n                *(_QWORD *)(v19 + 1464) += 72LL;\n              }\n            }\n            else\n            {\nLABEL_14:\n              LOBYTE(v6) = (*(__int64 (__fastcall **)(__int64, __int64, __int64, char **))(*(_QWORD *)(a1 + 408) + 16LL))(\n                             a1 + 408,\n                             v14,\n                             v17,\n                             a4);\n            }\n            if ( *(_BYTE *)(a1 + 13648) )\n              return (char)v6;\n          }\n        }\n      }\n    }\n  }\n  return (char)v6;\n}", "assembly": "; \n; GJBaseGameLayer::spawnObjectsInOrder from 0x140322560 to 0x14032279e (574 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::spawnGroup @ 0x1403224e9\n; > <???> @ 0x14091eecc\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 11:30:23 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x140322560\nmov     [rax+10h], rbx                                                 ; +0x3, 0x140322563\nmov     [rax+18h], rbp                                                 ; +0x7, 0x140322567\nmov     [rax+20h], rsi                                                 ; +0xb, 0x14032256b\npush    rdi                                                            ; +0xf, 0x14032256f\npush    r12                                                            ; +0x10, 0x140322570\npush    r13                                                            ; +0x12, 0x140322572\npush    r14                                                            ; +0x14, 0x140322574\npush    r15                                                            ; +0x16, 0x140322576\nsub     rsp, 0A0h                                                      ; +0x18, 0x140322578\nmovaps  xmmword ptr [rax-38h], xmm6                                    ; +0x1f, 0x14032257f\nmovaps  xmmword ptr [rax-48h], xmm7                                    ; +0x23, 0x140322583\nmovaps  xmmword ptr [rax-58h], xmm8                                    ; +0x27, 0x140322587\nmovaps  xmmword ptr [rax-68h], xmm9                                    ; +0x2c, 0x14032258c\nmov     r12, r9                                                        ; +0x31, 0x140322591\nmovaps  xmm9, xmm2                                                     ; +0x34, 0x140322594\nmov     r14, rcx                                                       ; +0x38, 0x140322598\ncmp     byte ptr [rcx+3550h], 0                                        ; +0x3b, 0x14032259b\njnz     loc_140322769                                                  ; +0x42, 0x1403225a2\nxorps   xmm7, xmm7                                                     ; +0x48, 0x1403225a8\nxorps   xmm6, xmm6                                                     ; +0x4b, 0x1403225ab\nxor     r15b, r15b                                                     ; +0x4e, 0x1403225ae\ntest    rdx, rdx                                                       ; +0x51, 0x1403225b1\njz      loc_140322769                                                  ; +0x54, 0x1403225b4\nmov     rsi, [rdx+38h]                                                 ; +0x5a, 0x1403225ba\nmov     eax, [rsi]                                                     ; +0x5e, 0x1403225be\ntest    eax, eax                                                       ; +0x60, 0x1403225c0\njz      loc_140322769                                                  ; +0x62, 0x1403225c2\nmov     rsi, [rsi+10h]                                                 ; +0x68, 0x1403225c8\nlea     r13, [rax-1]                                                   ; +0x6c, 0x1403225cc\nlea     r13, [rsi+r13*8]                                               ; +0x70, 0x1403225d0\ncmp     rsi, r13                                                       ; +0x74, 0x1403225d4\nja      loc_140322769                                                  ; +0x77, 0x1403225d7\nmovsd   xmm8, cs:qword_140835438                                       ; +0x7d, 0x1403225dd\nnop     word ptr [rax+rax+00000000h]                                   ; +0x86, 0x1403225e6\nmov     rbx, [rsi]                                                     ; +0x90, 0x1403225f0\ntest    rbx, rbx                                                       ; +0x93, 0x1403225f3\njz      loc_140322769                                                  ; +0x96, 0x1403225f6\ncmp     dword ptr [rbx+4E8h], 1                                        ; +0x9c, 0x1403225fc\njnz     short loc_140322611                                            ; +0xa3, 0x140322603\nmov     rcx, rbx                                                       ; +0xa5, 0x140322605\ncall    GameObject__isSpawnableTrigger                                 ; +0xa8, 0x140322608\ntest    al, al                                                         ; +0xad, 0x14032260d\njmp     short loc_140322628                                            ; +0xaf, 0x14032260f\ncmp     dword ptr [rbx+40Ch], 811h                                     ; +0xb1, 0x140322611\njnz     loc_14032275C                                                  ; +0xbb, 0x14032261b\ncmp     byte ptr [rbx+599h], 0                                         ; +0xc1, 0x140322621\njz      loc_14032275C                                                  ; +0xc8, 0x140322628\nmov     rax, [rbx]                                                     ; +0xce, 0x14032262e\nmov     rdx, [rax+0C8h]                                                ; +0xd1, 0x140322631\nmov     rcx, rbx                                                       ; +0xd8, 0x140322638\ncall    rdx                                                            ; +0xdb, 0x14032263b\ntest    r15b, r15b                                                     ; +0xdd, 0x14032263d\njnz     short loc_14032264B                                            ; +0xe0, 0x140322640\nmovss   xmm6, dword ptr [rax]                                          ; +0xe2, 0x140322642\nmov     r15b, 1                                                        ; +0xe6, 0x140322646\njmp     short loc_140322669                                            ; +0xe9, 0x140322649\nmovss   xmm0, dword ptr [rax]                                          ; +0xeb, 0x14032264b\nsubss   xmm0, xmm6                                                     ; +0xef, 0x14032264f\ncvtps2pd xmm1, xmm0                                                    ; +0xf3, 0x140322653\ndivsd   xmm1, xmm8                                                     ; +0xf6, 0x140322656\nsubsd   xmm1, xmm9                                                     ; +0xfb, 0x14032265b\ncvtpd2ps xmm0, xmm1                                                    ; +0x100, 0x140322660\ncomiss  xmm7, xmm0                                                     ; +0x104, 0x140322664\njb      short loc_140322684                                            ; +0x107, 0x140322667\nlea     rcx, [r14+198h]                                                ; +0x109, 0x140322669\nmov     rax, [rcx]                                                     ; +0x110, 0x140322670\nmov     r9, r12                                                        ; +0x113, 0x140322673\nxorps   xmm2, xmm2                                                     ; +0x116, 0x140322676\nmov     rdx, rbx                                                       ; +0x119, 0x140322679\ncall    qword ptr [rax+10h]                                            ; +0x11c, 0x14032267c\njmp     loc_140322752                                                  ; +0x11f, 0x14032267f\nmov     eax, [rsp+0C8h+arg_28]                                         ; +0x124, 0x140322684\nmov     dword ptr [rsp+0C8h+arg_0], eax                                ; +0x12b, 0x14032268b\nmov     eax, [rsp+0C8h+arg_20]                                         ; +0x132, 0x140322692\nmov     [rsp+0C8h+var_88], eax                                         ; +0x139, 0x140322699\nmovss   [rsp+0C8h+var_80], xmm0                                        ; +0x13d, 0x14032269d\nmov     [rsp+0C8h+var_78], rbx                                         ; +0x143, 0x1403226a3\nmov     rbp, [r14+968h]                                                ; +0x148, 0x1403226a8\nmov     rdi, [rbp+5B8h]                                                ; +0x14f, 0x1403226af\ncmp     rdi, [rbp+5C0h]                                                ; +0x156, 0x1403226b6\njz      short loc_14032271D                                            ; +0x15d, 0x1403226bd\nmov     [rsp+0C8h+arg_0], rdi                                          ; +0x15f, 0x1403226bf\nmov     word ptr [rdi], 0                                              ; +0x167, 0x1403226c7\nxor     eax, eax                                                       ; +0x16c, 0x1403226cc\nmov     [rdi+10h], rax                                                 ; +0x16e, 0x1403226ce\nmov     [rdi+18h], rax                                                 ; +0x172, 0x1403226d2\nmov     [rdi+20h], eax                                                 ; +0x176, 0x1403226d6\nmov     [rdi+24h], al                                                  ; +0x179, 0x1403226d9\nlea     rcx, [rdi+30h]                                                 ; +0x17c, 0x1403226dc\nmov     [rcx], rax                                                     ; +0x180, 0x1403226e0\nmov     [rdi+38h], rax                                                 ; +0x183, 0x1403226e3\nmov     [rdi+40h], rax                                                 ; +0x187, 0x1403226e7\nmov     [rdi+28h], rbx                                                 ; +0x18b, 0x1403226eb\ncvtps2pd xmm0, xmm0                                                    ; +0x18f, 0x1403226ef\nmovsd   qword ptr [rdi+8], xmm0                                        ; +0x192, 0x1403226f2\nmov     rdx, r12                                                       ; +0x197, 0x1403226f7\ncall    sub_140099FC0                                                  ; +0x19a, 0x1403226fa\nmov     eax, [rsp+0C8h+arg_20]                                         ; +0x19f, 0x1403226ff\nmov     [rdi+1Ch], eax                                                 ; +0x1a6, 0x140322706\nmov     eax, [rsp+0C8h+arg_28]                                         ; +0x1a9, 0x140322709\nmov     [rdi+20h], eax                                                 ; +0x1b0, 0x140322710\nadd     qword ptr [rbp+5B8h], 48h ; 'H'                                ; +0x1b3, 0x140322713\njmp     short loc_140322752                                            ; +0x1bb, 0x14032271b\nlea     rax, [rsp+0C8h+arg_0]                                          ; +0x1bd, 0x14032271d\nmov     [rsp+0C8h+var_98], rax                                         ; +0x1c5, 0x140322725\nlea     rax, [rsp+0C8h+var_88]                                         ; +0x1ca, 0x14032272a\nmov     [rsp+0C8h+var_A0], rax                                         ; +0x1cf, 0x14032272f\nmov     [rsp+0C8h+var_A8], r12                                         ; +0x1d4, 0x140322734\nlea     r9, [rsp+0C8h+var_80]                                          ; +0x1d9, 0x140322739\nlea     r8, [rsp+0C8h+var_78]                                          ; +0x1de, 0x14032273e\nmov     rdx, rdi                                                       ; +0x1e3, 0x140322743\nlea     rcx, [rbp+5B0h]                                                ; +0x1e6, 0x140322746\ncall    sub_140375140                                                  ; +0x1ed, 0x14032274d\ncmp     byte ptr [r14+3550h], 0                                        ; +0x1f2, 0x140322752\njnz     short loc_140322769                                            ; +0x1fa, 0x14032275a\nadd     rsi, 8                                                         ; +0x1fc, 0x14032275c\ncmp     rsi, r13                                                       ; +0x200, 0x140322760\njbe     loc_1403225F0                                                  ; +0x203, 0x140322763\nlea     r11, [rsp+0C8h+var_28]                                         ; +0x209, 0x140322769\nmov     rbx, [r11+38h]                                                 ; +0x211, 0x140322771\nmov     rbp, [r11+40h]                                                 ; +0x215, 0x140322775\nmov     rsi, [r11+48h]                                                 ; +0x219, 0x140322779\nmovaps  xmm6, xmmword ptr [r11-10h]                                    ; +0x21d, 0x14032277d\nmovaps  xmm7, xmmword ptr [r11-20h]                                    ; +0x222, 0x140322782\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x227, 0x140322787\nmovaps  xmm9, xmmword ptr [r11-40h]                                    ; +0x22c, 0x14032278c\nmov     rsp, r11                                                       ; +0x231, 0x140322791\npop     r15                                                            ; +0x234, 0x140322794\npop     r14                                                            ; +0x236, 0x140322796\npop     r13                                                            ; +0x238, 0x140322798\npop     r12                                                            ; +0x23a, 0x14032279a\npop     rdi                                                            ; +0x23c, 0x14032279c\nretn                                                                   ; +0x23d, 0x14032279d", "xrefs": ["GJBaseGameLayer::spawnGroup @ 0x1403224e9", "<???> @ 0x14091eecc"], "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"}