{"type": "func", "start": 5372491328, "end": 5372491604, "name": "GJOptionsLayer::nextPosition", "pseudocode": "// \n// GJOptionsLayer::nextPosition from 0x14039b640 to 0x14039b754 (276 bytes)\n// \n// 2 xrefs:\n// > GJOptionsLayer::addToggleInternal @ 0x14039b235\n// > <???> @ 0x140923324\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:31:15 +0000\n// \n\nfloat *__fastcall GJOptionsLayer::nextPosition(float *a1, float *a2, unsigned int a3)\n{\n  __int64 v6; // rax\n  int v7; // ebp\n  const struct cocos2d::CCPoint *v8; // rdx\n  float v10; // [rsp+50h] [rbp+8h] BYREF\n  float v11; // [rsp+54h] [rbp+Ch]\n  char v12; // [rsp+58h] [rbp+10h] BYREF\n  float v13; // [rsp+5Ch] [rbp+14h]\n  char v14; // [rsp+68h] [rbp+20h] BYREF\n\n  v6 = cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(v6, &v10);\n  cocos2d::CCPoint::CCPoint(\n    (cocos2d::CCPoint *)&v12,\n    (float)(v10 * 0.5) - 160.0,\n    (float)((float)((float)(a1[184] * 0.5) + (float)(v11 * 0.5)) - 60.0) + a1[266]);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14, (float)(v10 * 0.5) + 32.0, v13);\n  v7 = GJOptionsLayer::countForPage(a1, a3);\n  v8 = (const struct cocos2d::CCPoint *)&v12;\n  if ( (((_BYTE)v7 + 1) & 1) == 0 )\n    v8 = (const struct cocos2d::CCPoint *)&v14;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)a2, v8);\n  if ( v7 + 1 > 2 )\n    a2[1] = a2[1] - (float)((float)(int)floorf((float)v7 * 0.5) * a1[250]);\n  return a2;\n}", "assembly": "; \n; GJOptionsLayer::nextPosition from 0x14039b640 to 0x14039b754 (276 bytes)\n; \n; 2 xrefs:\n; > GJOptionsLayer::addToggleInternal @ 0x14039b235\n; > <???> @ 0x140923324\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:31:15 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14039b640\npush    rbp                                                            ; +0x5, 0x14039b645\npush    rsi                                                            ; +0x6, 0x14039b646\npush    rdi                                                            ; +0x7, 0x14039b647\nsub     rsp, 30h                                                       ; +0x8, 0x14039b648\nmovaps  [rsp+48h+var_28], xmm6                                         ; +0xc, 0x14039b64c\nmov     ebx, r8d                                                       ; +0x11, 0x14039b651\nmov     rdi, rdx                                                       ; +0x14, 0x14039b654\nmov     rsi, rcx                                                       ; +0x17, 0x14039b657\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1a, 0x14039b65a\nmov     rcx, rax                                                       ; +0x20, 0x14039b660\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x23, 0x14039b663\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x28, 0x14039b668\nmovss   xmm6, cs:dword_140834F20                                       ; +0x2e, 0x14039b66e\nlea     rcx, [rsp+48h+arg_8]                                           ; +0x36, 0x14039b676\nmovss   xmm2, dword ptr [rsi+2E0h]                                     ; +0x3b, 0x14039b67b\nmovss   xmm0, [rsp+48h+arg_4]                                          ; +0x43, 0x14039b683\nmovss   xmm1, [rsp+48h+arg_0]                                          ; +0x49, 0x14039b689\nmulss   xmm2, xmm6                                                     ; +0x4f, 0x14039b68f\nmulss   xmm0, xmm6                                                     ; +0x53, 0x14039b693\nmulss   xmm1, xmm6                                                     ; +0x57, 0x14039b697\naddss   xmm2, xmm0                                                     ; +0x5b, 0x14039b69b\nsubss   xmm1, cs:dword_14083587C                                       ; +0x5f, 0x14039b69f\nsubss   xmm2, cs:dword_1408356E4                                       ; +0x67, 0x14039b6a7\naddss   xmm2, dword ptr [rsi+428h]                                     ; +0x6f, 0x14039b6af\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x77, 0x14039b6b7\nmovss   xmm1, [rsp+48h+arg_0]                                          ; +0x7d, 0x14039b6bd\nlea     rcx, [rsp+48h+arg_18]                                          ; +0x83, 0x14039b6c3\nmovss   xmm2, [rsp+48h+arg_C]                                          ; +0x88, 0x14039b6c8\nmulss   xmm1, xmm6                                                     ; +0x8e, 0x14039b6ce\naddss   xmm1, cs:dword_140835640                                       ; +0x92, 0x14039b6d2\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x9a, 0x14039b6da\nmov     edx, ebx                                                       ; +0xa0, 0x14039b6e0\nmov     rcx, rsi                                                       ; +0xa2, 0x14039b6e2\ncall    GJOptionsLayer__countForPage                                   ; +0xa5, 0x14039b6e5\nmov     ebp, eax                                                       ; +0xaa, 0x14039b6ea\nlea     rdx, [rsp+48h+arg_8]                                           ; +0xac, 0x14039b6ec\nmov     rcx, rdi                                                       ; +0xb1, 0x14039b6f1\nlea     ebx, [rax+1]                                                   ; +0xb4, 0x14039b6f4\nlea     rax, [rsp+48h+arg_18]                                          ; +0xb7, 0x14039b6f7\ntest    bl, 1                                                          ; +0xbc, 0x14039b6fc\ncmovz   rdx, rax                                                       ; +0xbf, 0x14039b6ff\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xc3, 0x14039b703\ncmp     ebx, 2                                                         ; +0xc9, 0x14039b709\njle     short loc_14039B73F                                            ; +0xcc, 0x14039b70c\nmovd    xmm0, ebp                                                      ; +0xce, 0x14039b70e\ncvtdq2ps xmm0, xmm0                                                    ; +0xd2, 0x14039b712\nmulss   xmm0, xmm6; X                                                  ; +0xd5, 0x14039b715\ncall    floorf                                                         ; +0xd9, 0x14039b719\ncvttss2si eax, xmm0                                                    ; +0xde, 0x14039b71e\nmovss   xmm0, dword ptr [rdi+4]                                        ; +0xe2, 0x14039b722\nmovd    xmm1, eax                                                      ; +0xe7, 0x14039b727\ncvtdq2ps xmm1, xmm1                                                    ; +0xeb, 0x14039b72b\nmulss   xmm1, dword ptr [rsi+3E8h]                                     ; +0xee, 0x14039b72e\nsubss   xmm0, xmm1                                                     ; +0xf6, 0x14039b736\nmovss   dword ptr [rdi+4], xmm0                                        ; +0xfa, 0x14039b73a\nmov     rbx, [rsp+48h+arg_10]                                          ; +0xff, 0x14039b73f\nmov     rax, rdi                                                       ; +0x104, 0x14039b744\nmovaps  xmm6, [rsp+48h+var_28]                                         ; +0x107, 0x14039b747\nadd     rsp, 30h                                                       ; +0x10c, 0x14039b74c\npop     rdi                                                            ; +0x110, 0x14039b750\npop     rsi                                                            ; +0x111, 0x14039b751\npop     rbp                                                            ; +0x112, 0x14039b752\nretn                                                                   ; +0x113, 0x14039b753", "xrefs": ["GJOptionsLayer::addToggleInternal @ 0x14039b235", "<???> @ 0x140923324"], "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"}