{"type": "func", "start": 4297706432, "end": 4297706685, "name": "GJOptionsLayer::nextPosition", "pseudocode": "// \n// GJOptionsLayer::nextPosition from 0x10029cbc0 to 0x10029ccbd (253 bytes)\n// \n// 3 xrefs:\n// > GJOptionsLayer::addToggleInternal @ 0x10029c71b\n// > GameOptionsLayer::setupOptions @ 0x1002b132e\n// > GameOptionsLayer::setupOptions @ 0x1002b1511\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// local variable allocation has failed, the output may be wrong!\ncocos2d::CCPoint __fastcall GJOptionsLayer::nextPosition(GJOptionsLayer *a1, int a2)\n{\n  int v2; // edx\n  int v3; // r15d\n  float *v4; // r13\n  int v5; // r15d\n  __m128 v7; // xmm0\n  float v8; // [rsp+0h] [rbp-40h] BYREF\n  float v9[2]; // [rsp+8h] [rbp-38h] BYREF\n  float v10[12]; // [rsp+10h] [rbp-30h] BYREF\n  cocos2d::CCPoint result; // 0:xmm0_8.8\n\n  v3 = v2;\n  cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v10);\n  sub_10028CBE0(\n    v9,\n    (float)(v10[0] * 0.5) + -160.0,\n    (float)((float)(v10[1] * 0.5) + 80.0) + *(float *)(*(_QWORD *)&a2 + 1000LL));\n  v4 = &v8;\n  sub_10028CBE0(&v8, (float)(0.5 * v10[0]) + 32.0, v9[1]);\n  v5 = GJOptionsLayer::countForPage(*(GJOptionsLayer **)&a2, v3);\n  if ( (v5 & 1) == 0 )\n    v4 = v9;\n  *(double *)&result = sub_10028CC60(a1, (double *)v4);\n  if ( v5 >= 2 )\n  {\n    v7 = 0;\n    v7.f32[0] = (float)v5 * 0.5;\n    result = (cocos2d::CCPoint)_mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_round_ss(v7, v7, 9))).u64[0];\n    result.x = result.x * *(float *)(*(_QWORD *)&a2 + 940LL);\n    *((float *)&a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n    + 1) = *((float *)&a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n           + 1)\n         - result.x;\n  }\n  return result;\n}", "assembly": "; \n; GJOptionsLayer::nextPosition from 0x10029cbc0 to 0x10029ccbd (253 bytes)\n; \n; 3 xrefs:\n; > GJOptionsLayer::addToggleInternal @ 0x10029c71b\n; > GameOptionsLayer::setupOptions @ 0x1002b132e\n; > GameOptionsLayer::setupOptions @ 0x1002b1511\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbp                                                            ; +0x0, 0x10029cbc0\nmov     rbp, rsp                                                       ; +0x1, 0x10029cbc1\npush    r15                                                            ; +0x4, 0x10029cbc4\npush    r14                                                            ; +0x6, 0x10029cbc6\npush    r13                                                            ; +0x8, 0x10029cbc8\npush    r12                                                            ; +0xa, 0x10029cbca\npush    rbx                                                            ; +0xc, 0x10029cbcc\nsub     rsp, 18h                                                       ; +0xd, 0x10029cbcd\nmov     r15d, edx                                                      ; +0x11, 0x10029cbd1\nmov     r14, rsi                                                       ; +0x14, 0x10029cbd4\nmov     rbx, rdi                                                       ; +0x17, 0x10029cbd7\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x1a, 0x10029cbda\nlea     rdi, [rbp+var_30]                                              ; +0x1f, 0x10029cbdf\nmov     rsi, rax                                                       ; +0x23, 0x10029cbe3\ncall    cocos2d__CCDirector__getWinSize                                ; +0x26, 0x10029cbe6\nmovss   xmm2, cs:dword_100814FA8                                       ; +0x2b, 0x10029cbeb\nmovss   xmm0, [rbp+var_30]                                             ; +0x33, 0x10029cbf3\nmulss   xmm0, xmm2                                                     ; +0x38, 0x10029cbf8\naddss   xmm0, cs:dword_10081687C                                       ; +0x3c, 0x10029cbfc\nmovss   xmm1, [rbp+var_2C]                                             ; +0x44, 0x10029cc04\nmulss   xmm1, xmm2                                                     ; +0x49, 0x10029cc09\naddss   xmm1, cs:dword_100815048                                       ; +0x4d, 0x10029cc0d\naddss   xmm1, dword ptr [r14+3E8h]                                     ; +0x55, 0x10029cc15\nlea     r12, [rbp+var_38]                                              ; +0x5e, 0x10029cc1e\nmov     rdi, r12                                                       ; +0x62, 0x10029cc22\ncall    sub_10028CBE0                                                  ; +0x65, 0x10029cc25\nmovss   xmm0, cs:dword_100814FA8                                       ; +0x6a, 0x10029cc2a\nmulss   xmm0, [rbp+var_30]                                             ; +0x72, 0x10029cc32\naddss   xmm0, cs:dword_100815220                                       ; +0x77, 0x10029cc37\nmovss   xmm1, [rbp+var_34]                                             ; +0x7f, 0x10029cc3f\nlea     r13, [rbp+var_40]                                              ; +0x84, 0x10029cc44\nmov     rdi, r13                                                       ; +0x88, 0x10029cc48\ncall    sub_10028CBE0                                                  ; +0x8b, 0x10029cc4b\nmov     rdi, r14                                                       ; +0x90, 0x10029cc50\nmov     esi, r15d                                                      ; +0x93, 0x10029cc53\ncall    GJOptionsLayer__countForPage                                   ; +0x96, 0x10029cc56\nmov     r15d, eax                                                      ; +0x9b, 0x10029cc5b\ntest    r15b, 1                                                        ; +0x9e, 0x10029cc5e\ncmovz   r13, r12                                                       ; +0xa2, 0x10029cc62\nmov     rdi, rbx                                                       ; +0xa6, 0x10029cc66\nmov     rsi, r13                                                       ; +0xa9, 0x10029cc69\ncall    sub_10028CC60                                                  ; +0xac, 0x10029cc6c\ncmp     r15d, 2                                                        ; +0xb1, 0x10029cc71\njl      short loc_10029CCAB                                            ; +0xb5, 0x10029cc75\nxorps   xmm0, xmm0                                                     ; +0xb7, 0x10029cc77\ncvtsi2ss xmm0, r15d                                                    ; +0xba, 0x10029cc7a\nmulss   xmm0, cs:dword_100814FA8                                       ; +0xbf, 0x10029cc7f\nroundss xmm0, xmm0, 9                                                  ; +0xc7, 0x10029cc87\ncvttps2dq xmm0, xmm0                                                   ; +0xcd, 0x10029cc8d\ncvtdq2ps xmm0, xmm0                                                    ; +0xd1, 0x10029cc91\nmovss   xmm1, dword ptr [rbx+4]                                        ; +0xd4, 0x10029cc94\nmulss   xmm0, dword ptr [r14+3ACh]                                     ; +0xd9, 0x10029cc99\nsubss   xmm1, xmm0                                                     ; +0xe2, 0x10029cca2\nmovss   dword ptr [rbx+4], xmm1                                        ; +0xe6, 0x10029cca6\nmov     rax, rbx                                                       ; +0xeb, 0x10029ccab\nadd     rsp, 18h                                                       ; +0xee, 0x10029ccae\npop     rbx                                                            ; +0xf2, 0x10029ccb2\npop     r12                                                            ; +0xf3, 0x10029ccb3\npop     r13                                                            ; +0xf5, 0x10029ccb5\npop     r14                                                            ; +0xf7, 0x10029ccb7\npop     r15                                                            ; +0xf9, 0x10029ccb9\npop     rbp                                                            ; +0xfb, 0x10029ccbb\nretn                                                                   ; +0xfc, 0x10029ccbc", "xrefs": ["GJOptionsLayer::addToggleInternal @ 0x10029c71b", "GameOptionsLayer::setupOptions @ 0x1002b132e", "GameOptionsLayer::setupOptions @ 0x1002b1511"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}