{"type": "func", "start": 4297619504, "end": 4297619774, "name": "GJOptionsLayer::nextPosition", "pseudocode": "// \n// GJOptionsLayer::nextPosition from 0x100287830 to 0x10028793e (270 bytes)\n// \n// 3 xrefs:\n// > sub_100287300 @ 0x10028736a\n// > GameOptionsLayer::setupOptions @ 0x10029e5ae\n// > GameOptionsLayer::setupOptions @ 0x10029e779\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:27:45 +0000\n// \n\n__int64 __fastcall GJOptionsLayer::nextPosition(__int64 a1, float *a2, unsigned int a3)\n{\n  __int64 v4; // rax\n  float *v5; // r13\n  int v6; // r15d\n  __m128 v7; // xmm0\n  float v9; // [rsp+0h] [rbp-40h] BYREF\n  float v10[2]; // [rsp+8h] [rbp-38h] BYREF\n  float v11[12]; // [rsp+10h] [rbp-30h] BYREF\n\n  v4 = cocos2d::CCDirector::sharedDirector(a1, a2);\n  cocos2d::CCDirector::getWinSize(v11, v4);\n  sub_100278250(\n    v10,\n    (float)(v11[0] * 0.5) + -160.0,\n    (float)((float)((float)(a2[184] * 0.5) + (float)(v11[1] * 0.5)) + -60.0) + a2[268]);\n  v5 = &v9;\n  sub_100278250(&v9, (float)(0.5 * v11[0]) + 32.0, v10[1]);\n  v6 = sub_100288170(a2, a3);\n  if ( (v6 & 1) == 0 )\n    v5 = v10;\n  sub_1002782D0((_QWORD *)a1, v5);\n  if ( v6 >= 2 )\n  {\n    v7 = 0;\n    v7.f32[0] = (float)v6 * 0.5;\n    *(float *)(a1 + 4) = *(float *)(a1 + 4)\n                       - (float)(_mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_round_ss(v7, v7, 9))).f32[0] * a2[253]);\n  }\n  return a1;\n}", "assembly": "; \n; GJOptionsLayer::nextPosition from 0x100287830 to 0x10028793e (270 bytes)\n; \n; 3 xrefs:\n; > sub_100287300 @ 0x10028736a\n; > GameOptionsLayer::setupOptions @ 0x10029e5ae\n; > GameOptionsLayer::setupOptions @ 0x10029e779\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:27:45 +0000\n; \npush    rbp                                                            ; +0x0, 0x100287830\nmov     rbp, rsp                                                       ; +0x1, 0x100287831\npush    r15                                                            ; +0x4, 0x100287834\npush    r14                                                            ; +0x6, 0x100287836\npush    r13                                                            ; +0x8, 0x100287838\npush    r12                                                            ; +0xa, 0x10028783a\npush    rbx                                                            ; +0xc, 0x10028783c\nsub     rsp, 18h                                                       ; +0xd, 0x10028783d\nmov     r15d, edx                                                      ; +0x11, 0x100287841\nmov     r14, rsi                                                       ; +0x14, 0x100287844\nmov     rbx, rdi                                                       ; +0x17, 0x100287847\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x1a, 0x10028784a\nlea     rdi, [rbp+var_30]                                              ; +0x1f, 0x10028784f\nmov     rsi, rax                                                       ; +0x23, 0x100287853\ncall    cocos2d__CCDirector__getWinSize                                ; +0x26, 0x100287856\nmovss   xmm3, cs:dword_100A03578                                       ; +0x2b, 0x10028785b\nmovss   xmm0, [rbp+var_30]                                             ; +0x33, 0x100287863\nmulss   xmm0, xmm3                                                     ; +0x38, 0x100287868\naddss   xmm0, cs:dword_100A04C44                                       ; +0x3c, 0x10028786c\nmovss   xmm2, [rbp+var_2C]                                             ; +0x44, 0x100287874\nmulss   xmm2, xmm3                                                     ; +0x49, 0x100287879\nmovss   xmm1, dword ptr [r14+2E0h]                                     ; +0x4d, 0x10028787d\nmulss   xmm1, xmm3                                                     ; +0x56, 0x100287886\naddss   xmm1, xmm2                                                     ; +0x5a, 0x10028788a\naddss   xmm1, cs:dword_100A037B4                                       ; +0x5e, 0x10028788e\naddss   xmm1, dword ptr [r14+430h]                                     ; +0x66, 0x100287896\nlea     r12, [rbp+var_38]                                              ; +0x6f, 0x10028789f\nmov     rdi, r12                                                       ; +0x73, 0x1002878a3\ncall    sub_100278250                                                  ; +0x76, 0x1002878a6\nmovss   xmm0, cs:dword_100A03578                                       ; +0x7b, 0x1002878ab\nmulss   xmm0, [rbp+var_30]                                             ; +0x83, 0x1002878b3\naddss   xmm0, cs:dword_100A0376C                                       ; +0x88, 0x1002878b8\nmovss   xmm1, [rbp+var_34]                                             ; +0x90, 0x1002878c0\nlea     r13, [rbp+var_40]                                              ; +0x95, 0x1002878c5\nmov     rdi, r13                                                       ; +0x99, 0x1002878c9\ncall    sub_100278250                                                  ; +0x9c, 0x1002878cc\nmov     rdi, r14                                                       ; +0xa1, 0x1002878d1\nmov     esi, r15d                                                      ; +0xa4, 0x1002878d4\ncall    sub_100288170                                                  ; +0xa7, 0x1002878d7\nmov     r15d, eax                                                      ; +0xac, 0x1002878dc\ntest    r15b, 1                                                        ; +0xaf, 0x1002878df\ncmovz   r13, r12                                                       ; +0xb3, 0x1002878e3\nmov     rdi, rbx                                                       ; +0xb7, 0x1002878e7\nmov     rsi, r13                                                       ; +0xba, 0x1002878ea\ncall    sub_1002782D0                                                  ; +0xbd, 0x1002878ed\ncmp     r15d, 2                                                        ; +0xc2, 0x1002878f2\njl      short loc_10028792C                                            ; +0xc6, 0x1002878f6\nxorps   xmm0, xmm0                                                     ; +0xc8, 0x1002878f8\ncvtsi2ss xmm0, r15d                                                    ; +0xcb, 0x1002878fb\nmulss   xmm0, cs:dword_100A03578                                       ; +0xd0, 0x100287900\nroundss xmm0, xmm0, 9                                                  ; +0xd8, 0x100287908\ncvttps2dq xmm0, xmm0                                                   ; +0xde, 0x10028790e\ncvtdq2ps xmm0, xmm0                                                    ; +0xe2, 0x100287912\nmovss   xmm1, dword ptr [rbx+4]                                        ; +0xe5, 0x100287915\nmulss   xmm0, dword ptr [r14+3F4h]                                     ; +0xea, 0x10028791a\nsubss   xmm1, xmm0                                                     ; +0xf3, 0x100287923\nmovss   dword ptr [rbx+4], xmm1                                        ; +0xf7, 0x100287927\nmov     rax, rbx                                                       ; +0xfc, 0x10028792c\nadd     rsp, 18h                                                       ; +0xff, 0x10028792f\npop     rbx                                                            ; +0x103, 0x100287933\npop     r12                                                            ; +0x104, 0x100287934\npop     r13                                                            ; +0x106, 0x100287936\npop     r14                                                            ; +0x108, 0x100287938\npop     r15                                                            ; +0x10a, 0x10028793a\npop     rbp                                                            ; +0x10c, 0x10028793c\nretn                                                                   ; +0x10d, 0x10028793d", "xrefs": ["sub_100287300 @ 0x10028736a", "GameOptionsLayer::setupOptions @ 0x10029e5ae", "GameOptionsLayer::setupOptions @ 0x10029e779"], "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"}