{"type": "func", "start": 4296018416, "end": 4296018625, "name": "GJBaseGameLayer::findStartPosWinnerInArray", "pseudocode": "// \n// GJBaseGameLayer::findStartPosWinnerInArray from 0x1001009f0 to 0x100100ac1 (209 bytes)\n// \n// 2 xrefs:\n// > LevelEditorLayer::findStartPosObject @ 0x1000c5691\n// > LevelEditorLayer::onPlaytest @ 0x1000c5de7\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:20 +0000\n// \n\n_QWORD *__fastcall GJBaseGameLayer::findStartPosWinnerInArray(__int64 a1)\n{\n  unsigned int *v1; // rax\n  _QWORD *v2; // r15\n  unsigned __int64 v3; // r12\n  int v4; // r13d\n  _QWORD *v5; // rbx\n  _QWORD *v6; // r14\n  float v7; // xmm0_4\n  __int64 v8; // rcx\n  int v9; // eax\n  float v11; // [rsp+0h] [rbp-2Ch]\n\n  if ( a1 )\n  {\n    v1 = *(unsigned int **)(a1 + 56);\n    if ( *v1 )\n    {\n      v2 = *((_QWORD **)v1 + 2);\n      v3 = (unsigned __int64)&v2[*v1 - 1];\n      v4 = -1;\n      v11 = 0.0;\n      v5 = nullptr;\n      while ( 1 )\n      {\n        v6 = (_QWORD *)*v2;\n        if ( !*v2 )\n          return v5;\n        v7 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(*v6 + 192LL))(*v2);\n        v8 = v6[230];\n        v9 = *(_DWORD *)(v8 + 372);\n        if ( v9 <= v4 )\n        {\n          if ( *(_BYTE *)(v8 + 370) == 1 )\n          {\n            if ( v9 < v4 || v11 <= v7 )\n              goto LABEL_5;\n          }\n          else if ( v9 < v4 || v7 <= v11 )\n          {\n            goto LABEL_5;\n          }\n        }\n        v4 = *(_DWORD *)(v8 + 372);\n        v11 = v7;\n        v5 = v6;\nLABEL_5:\n        if ( (unsigned __int64)++v2 > v3 )\n          return v5;\n      }\n    }\n  }\n  return nullptr;\n}", "assembly": "; \n; GJBaseGameLayer::findStartPosWinnerInArray from 0x1001009f0 to 0x100100ac1 (209 bytes)\n; \n; 2 xrefs:\n; > LevelEditorLayer::findStartPosObject @ 0x1000c5691\n; > LevelEditorLayer::onPlaytest @ 0x1000c5de7\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:20 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001009f0\nmov     rbp, rsp                                                       ; +0x1, 0x1001009f1\npush    r15                                                            ; +0x4, 0x1001009f4\npush    r14                                                            ; +0x6, 0x1001009f6\npush    r13                                                            ; +0x8, 0x1001009f8\npush    r12                                                            ; +0xa, 0x1001009fa\npush    rbx                                                            ; +0xc, 0x1001009fc\npush    rax                                                            ; +0xd, 0x1001009fd\ntest    rdi, rdi                                                       ; +0xe, 0x1001009fe\njz      loc_100100AAD                                                  ; +0x11, 0x100100a01\nmov     rax, [rdi+38h]                                                 ; +0x17, 0x100100a07\nmov     ecx, [rax]                                                     ; +0x1b, 0x100100a0b\ntest    rcx, rcx                                                       ; +0x1d, 0x100100a0d\njz      loc_100100AAD                                                  ; +0x20, 0x100100a10\nmov     r15, [rax+10h]                                                 ; +0x26, 0x100100a16\nlea     r12, [r15+rcx*8]                                               ; +0x2a, 0x100100a1a\nadd     r12, 0FFFFFFFFFFFFFFF8h                                        ; +0x2e, 0x100100a1e\nmov     r13d, 0FFFFFFFFh                                               ; +0x32, 0x100100a22\nxorps   xmm0, xmm0                                                     ; +0x38, 0x100100a28\nmovss   [rbp+var_2C], xmm0                                             ; +0x3b, 0x100100a2b\nxor     ebx, ebx                                                       ; +0x40, 0x100100a30\njmp     short loc_100100A54                                            ; +0x42, 0x100100a32\nalign 20h                                                              ; +0x44, 0x100100a34\nmov     r13d, eax                                                      ; +0x50, 0x100100a40\nmovss   [rbp+var_2C], xmm0                                             ; +0x53, 0x100100a43\nmov     rbx, r14                                                       ; +0x58, 0x100100a48\nadd     r15, 8                                                         ; +0x5b, 0x100100a4b\ncmp     r15, r12                                                       ; +0x5f, 0x100100a4f\nja      short loc_100100AAF                                            ; +0x62, 0x100100a52\nmov     r14, [r15]                                                     ; +0x64, 0x100100a54\ntest    r14, r14                                                       ; +0x67, 0x100100a57\njz      short loc_100100AAF                                            ; +0x6a, 0x100100a5a\nmov     rax, [r14]                                                     ; +0x6c, 0x100100a5c\nmov     rdi, r14                                                       ; +0x6f, 0x100100a5f\ncall    qword ptr [rax+0C0h]                                           ; +0x72, 0x100100a62\nmovss   xmm0, dword ptr [rax]                                          ; +0x78, 0x100100a68\nmov     rcx, [r14+730h]                                                ; +0x7c, 0x100100a6c\nmov     eax, [rcx+174h]                                                ; +0x83, 0x100100a73\ncmp     eax, r13d                                                      ; +0x89, 0x100100a79\njg      short loc_100100A40                                            ; +0x8c, 0x100100a7c\ncmp     byte ptr [rcx+172h], 1                                         ; +0x8e, 0x100100a7e\njnz     short loc_100100AA0                                            ; +0x95, 0x100100a85\ncmp     eax, r13d                                                      ; +0x97, 0x100100a87\njl      short loc_100100A4B                                            ; +0x9a, 0x100100a8a\nmovss   xmm1, [rbp+var_2C]                                             ; +0x9c, 0x100100a8c\nucomiss xmm1, xmm0                                                     ; +0xa1, 0x100100a91\nja      short loc_100100A40                                            ; +0xa4, 0x100100a94\njmp     short loc_100100A4B                                            ; +0xa6, 0x100100a96\nalign 20h                                                              ; +0xa8, 0x100100a98\ncmp     eax, r13d                                                      ; +0xb0, 0x100100aa0\njl      short loc_100100A4B                                            ; +0xb3, 0x100100aa3\nucomiss xmm0, [rbp+var_2C]                                             ; +0xb5, 0x100100aa5\nja      short loc_100100A40                                            ; +0xb9, 0x100100aa9\njmp     short loc_100100A4B                                            ; +0xbb, 0x100100aab\nxor     ebx, ebx                                                       ; +0xbd, 0x100100aad\nmov     rax, rbx                                                       ; +0xbf, 0x100100aaf\nadd     rsp, 8                                                         ; +0xc2, 0x100100ab2\npop     rbx                                                            ; +0xc6, 0x100100ab6\npop     r12                                                            ; +0xc7, 0x100100ab7\npop     r13                                                            ; +0xc9, 0x100100ab9\npop     r14                                                            ; +0xcb, 0x100100abb\npop     r15                                                            ; +0xcd, 0x100100abd\npop     rbp                                                            ; +0xcf, 0x100100abf\nretn                                                                   ; +0xd0, 0x100100ac0", "xrefs": ["LevelEditorLayer::findStartPosObject @ 0x1000c5691", "LevelEditorLayer::onPlaytest @ 0x1000c5de7"], "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"}