{"type": "func", "start": 5371957696, "end": 5371957924, "name": "GJBaseGameLayer::findStartPosWinnerInArray", "pseudocode": "// \n// GJBaseGameLayer::findStartPosWinnerInArray from 0x1403191c0 to 0x1403192a4 (228 bytes)\n// \n// 8 xrefs:\n// > GJBaseGameLayer::sortStartPosObjects @ 0x140319306\n// > GJBaseGameLayer::sortStartPosObjects @ 0x140319331\n// > LevelEditorLayer::onPlaytest @ 0x1403fecbe\n// > <???> @ 0x1408b4fec\n// > <???> @ 0x1408b504c\n// > <???> @ 0x1408b5060\n// > <???> @ 0x1408b5070\n// > <???> @ 0x14091eae8\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:19 +0000\n// \n\n_QWORD *__fastcall GJBaseGameLayer::findStartPosWinnerInArray(__int64 a1)\n{\n  _QWORD *v1; // rbp\n  float v2; // xmm6_4\n  int v3; // esi\n  unsigned int *v4; // rbx\n  __int64 v5; // rax\n  _QWORD *v6; // rbx\n  _QWORD *v7; // r14\n  _QWORD *v8; // rdi\n  float *v9; // rax\n  __int64 v10; // rcx\n  float v11; // xmm0_4\n  int v12; // eax\n  bool v13; // cc\n\n  v1 = nullptr;\n  v2 = 0.0;\n  v3 = -1;\n  if ( !a1 )\n    return nullptr;\n  v4 = *(unsigned int **)(a1 + 56);\n  v5 = *v4;\n  if ( !(_DWORD)v5 )\n    return nullptr;\n  v6 = *((_QWORD **)v4 + 2);\n  v7 = &v6[v5 - 1];\n  if ( v6 > v7 )\n    return nullptr;\n  do\n  {\n    v8 = (_QWORD *)*v6;\n    if ( !*v6 )\n      break;\n    v9 = (float *)(*(__int64 (__fastcall **)(_QWORD))(*v8 + 200LL))(*v6);\n    v10 = v8[232];\n    v11 = *v9;\n    v12 = *(_DWORD *)(v10 + 372);\n    if ( v12 > v3 )\n      goto LABEL_12;\n    if ( *(_BYTE *)(v10 + 370) )\n    {\n      if ( v12 < v3 )\n        goto LABEL_13;\n      v13 = v2 <= v11;\n    }\n    else\n    {\n      if ( v12 < v3 )\n        goto LABEL_13;\n      v13 = v11 <= v2;\n    }\n    if ( !v13 )\n    {\nLABEL_12:\n      v2 = v11;\n      v3 = *(_DWORD *)(v10 + 372);\n      v1 = v8;\n    }\nLABEL_13:\n    ++v6;\n  }\n  while ( v6 <= v7 );\n  return v1;\n}", "assembly": "; \n; GJBaseGameLayer::findStartPosWinnerInArray from 0x1403191c0 to 0x1403192a4 (228 bytes)\n; \n; 8 xrefs:\n; > GJBaseGameLayer::sortStartPosObjects @ 0x140319306\n; > GJBaseGameLayer::sortStartPosObjects @ 0x140319331\n; > LevelEditorLayer::onPlaytest @ 0x1403fecbe\n; > <???> @ 0x1408b4fec\n; > <???> @ 0x1408b504c\n; > <???> @ 0x1408b5060\n; > <???> @ 0x1408b5070\n; > <???> @ 0x14091eae8\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:19 +0000\n; \nmov     [rsp+arg_18], rbp                                              ; +0x0, 0x1403191c0\npush    rsi                                                            ; +0x5, 0x1403191c5\nsub     rsp, 30h                                                       ; +0x6, 0x1403191c6\nxor     ebp, ebp                                                       ; +0xa, 0x1403191ca\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0xc, 0x1403191cc\nxorps   xmm6, xmm6                                                     ; +0x11, 0x1403191d1\nmov     esi, 0FFFFFFFFh                                                ; +0x14, 0x1403191d4\ntest    rcx, rcx                                                       ; +0x19, 0x1403191d9\njz      loc_140319291                                                  ; +0x1c, 0x1403191dc\nmov     [rsp+38h+arg_0], rbx                                           ; +0x22, 0x1403191e2\nmov     rbx, [rcx+38h]                                                 ; +0x27, 0x1403191e7\nmov     eax, [rbx]                                                     ; +0x2b, 0x1403191eb\ntest    eax, eax                                                       ; +0x2d, 0x1403191ed\njz      loc_14031928C                                                  ; +0x2f, 0x1403191ef\nmov     rbx, [rbx+10h]                                                 ; +0x35, 0x1403191f5\nmov     [rsp+38h+arg_10], r14                                          ; +0x39, 0x1403191f9\nlea     r14, [rax-1]                                                   ; +0x3e, 0x1403191fe\nlea     r14, [rbx+r14*8]                                               ; +0x42, 0x140319202\ncmp     rbx, r14                                                       ; +0x46, 0x140319206\nja      short loc_140319287                                            ; +0x49, 0x140319209\nmov     [rsp+38h+arg_8], rdi                                           ; +0x4b, 0x14031920b\nmov     rdi, [rbx]                                                     ; +0x50, 0x140319210\ntest    rdi, rdi                                                       ; +0x53, 0x140319213\njz      short loc_140319265                                            ; +0x56, 0x140319216\nmov     rax, [rdi]                                                     ; +0x58, 0x140319218\nmov     rcx, rdi                                                       ; +0x5b, 0x14031921b\ncall    qword ptr [rax+0C8h]                                           ; +0x5e, 0x14031921e\nmov     rcx, [rdi+740h]                                                ; +0x64, 0x140319224\nmovss   xmm0, dword ptr [rax]                                          ; +0x6b, 0x14031922b\nmov     eax, [rcx+174h]                                                ; +0x6f, 0x14031922f\ncmp     eax, esi                                                       ; +0x75, 0x140319235\njg      short loc_140319254                                            ; +0x77, 0x140319237\ncmp     byte ptr [rcx+172h], 0                                         ; +0x79, 0x140319239\njnz     short loc_14031924B                                            ; +0x80, 0x140319240\ncmp     eax, esi                                                       ; +0x82, 0x140319242\njl      short loc_14031925C                                            ; +0x84, 0x140319244\ncomiss  xmm0, xmm6                                                     ; +0x86, 0x140319246\njmp     short loc_140319252                                            ; +0x89, 0x140319249\ncmp     eax, esi                                                       ; +0x8b, 0x14031924b\njl      short loc_14031925C                                            ; +0x8d, 0x14031924d\ncomiss  xmm6, xmm0                                                     ; +0x8f, 0x14031924f\njbe     short loc_14031925C                                            ; +0x92, 0x140319252\nmovaps  xmm6, xmm0                                                     ; +0x94, 0x140319254\nmov     esi, eax                                                       ; +0x97, 0x140319257\nmov     rbp, rdi                                                       ; +0x99, 0x140319259\nadd     rbx, 8                                                         ; +0x9c, 0x14031925c\ncmp     rbx, r14                                                       ; +0xa0, 0x140319260\njbe     short loc_140319210                                            ; +0xa3, 0x140319263\nmov     rdi, [rsp+38h+arg_8]                                           ; +0xa5, 0x140319265\nmov     rax, rbp                                                       ; +0xaa, 0x14031926a\nmov     r14, [rsp+38h+arg_10]                                          ; +0xad, 0x14031926d\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xb2, 0x140319272\nmov     rbp, [rsp+38h+arg_18]                                          ; +0xb7, 0x140319277\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0xbc, 0x14031927c\nadd     rsp, 30h                                                       ; +0xc1, 0x140319281\npop     rsi                                                            ; +0xc5, 0x140319285\nretn                                                                   ; +0xc6, 0x140319286\nmov     rax, rbp                                                       ; +0xc7, 0x140319287\njmp     short loc_14031926D                                            ; +0xca, 0x14031928a\nmov     rax, rbp                                                       ; +0xcc, 0x14031928c\njmp     short loc_140319272                                            ; +0xcf, 0x14031928f\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0xd1, 0x140319291\nmov     rax, rbp                                                       ; +0xd6, 0x140319296\nmov     rbp, [rsp+38h+arg_18]                                          ; +0xd9, 0x140319299\nadd     rsp, 30h                                                       ; +0xde, 0x14031929e\npop     rsi                                                            ; +0xe2, 0x1403192a2\nretn                                                                   ; +0xe3, 0x1403192a3", "xrefs": ["GJBaseGameLayer::sortStartPosObjects @ 0x140319306", "GJBaseGameLayer::sortStartPosObjects @ 0x140319331", "LevelEditorLayer::onPlaytest @ 0x1403fecbe", "<???> @ 0x1408b4fec", "<???> @ 0x1408b504c", "<???> @ 0x1408b5060", "<???> @ 0x1408b5070", "<???> @ 0x14091eae8"], "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"}