{"type": "func", "start": 5372185344, "end": 5372185897, "name": "GJBaseGameLayer::toggleFlipped", "pseudocode": "// \n// GJBaseGameLayer::toggleFlipped from 0x140350b00 to 0x140350d29 (553 bytes)\n// \n// 6 xrefs:\n// > GJBaseGameLayer::setupLevelStart @ 0x140319c88\n// > GJBaseGameLayer::collisionCheckObjects @ 0x14031ca7a\n// > GJBaseGameLayer::collisionCheckObjects @ 0x14031cb0e\n// > <???> @ 0x1408b8974\n// > <???> @ 0x1408b8984\n// > <???> @ 0x1409202ac\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:47 +0000\n// \n\nfloat *__fastcall GJBaseGameLayer::toggleFlipped(__int64 a1, char a2, char a3)\n{\n  float *result; // rax\n  __int64 v7; // rdi\n  __int64 v8; // rcx\n  _BYTE *v9; // rcx\n  float v10; // xmm6_4\n  float *v11; // rdi\n  float v12; // xmm1_4\n  _UNKNOWN *retaddr; // [rsp+88h] [rbp+0h] BYREF\n  __int16 v14; // [rsp+90h] [rbp+8h] BYREF\n  char v15; // [rsp+92h] [rbp+Ah]\n\n  result = (float *)&retaddr;\n  if ( *(_BYTE *)(a1 + 1048) == a2 )\n    return result;\n  v7 = *(_QWORD *)(a1 + 3512);\n  *(_BYTE *)(a1 + 1048) = a2;\n  cocos2d::CCMotionStreak::stopStroke(*(cocos2d::CCMotionStreak **)(v7 + 1960));\n  if ( *(_BYTE *)(v7 + 2432) )\n  {\n    *(_BYTE *)(v7 + 2432) = 0;\n    PlayerObject::fadeOutStreak2(v7);\n  }\n  if ( a3 )\n  {\n    v10 = 1.0;\n    if ( a2 )\n      goto LABEL_14;\n  }\n  else\n  {\n    v8 = *(_QWORD *)(a1 + 3512);\n    if ( a2 )\n    {\n      v14 = -26881;\n      v15 = 0;\n      PlayerObject::spawnPortalCircle(v8, &v14);\n      v9 = (_BYTE *)(a1 + 1056);\n      v10 = 1.0;\n      v11 = (float *)(a1 + 1052);\n      *(_BYTE *)(a1 + 1056) = 0;\n      result = (float *)(a1 + 1052);\n      goto LABEL_7;\n    }\n    v14 = -256;\n    v15 = -1;\n    PlayerObject::spawnPortalCircle(v8, &v14);\n  }\n  v10 = 0.0;\nLABEL_14:\n  v9 = (_BYTE *)(a1 + 1056);\n  *(_BYTE *)(a1 + 1056) = 0;\n  v11 = (float *)(a1 + 1052);\n  result = (float *)(a1 + 1052);\n  if ( a3 )\n  {\n    *v11 = v10;\n    return result;\n  }\nLABEL_7:\n  v12 = *result;\n  if ( *result != 0.0 && v12 != 1.0 )\n  {\n    if ( *(_BYTE *)(a1 + 1048) )\n    {\n      if ( v12 >= 0.5 )\n        goto LABEL_22;\n    }\n    else if ( v12 <= 0.5 )\n    {\n      goto LABEL_22;\n    }\n    *v9 = 1;\n    goto LABEL_22;\n  }\n  if ( v10 == 1.0 )\n    *result = 0.0000099999997;\n  else\n    *result = 0.99998999;\nLABEL_22:\n  PlayerObject::levelWillFlip(*(_QWORD *)(a1 + 3512));\n  if ( *(_BYTE *)(a1 + 1058) )\n    PlayerObject::levelWillFlip(*(_QWORD *)(a1 + 3520));\n  result = (float *)GJGameState::tweenValue(a1 + 424, *v11, v10, 7, 1053609165, 1, 1067030938, -1, -1);\n  *(_BYTE *)(a1 + 1057) = 1;\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::toggleFlipped from 0x140350b00 to 0x140350d29 (553 bytes)\n; \n; 6 xrefs:\n; > GJBaseGameLayer::setupLevelStart @ 0x140319c88\n; > GJBaseGameLayer::collisionCheckObjects @ 0x14031ca7a\n; > GJBaseGameLayer::collisionCheckObjects @ 0x14031cb0e\n; > <???> @ 0x1408b8974\n; > <???> @ 0x1408b8984\n; > <???> @ 0x1409202ac\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:47 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x140350b00\nmov     [rax+18h], rbx                                                 ; +0x3, 0x140350b03\nmov     [rax+20h], rbp                                                 ; +0x7, 0x140350b07\npush    rsi                                                            ; +0xb, 0x140350b0b\nsub     rsp, 80h                                                       ; +0xc, 0x140350b0c\nmovzx   ebp, r8b                                                       ; +0x13, 0x140350b13\nmovzx   esi, dl                                                        ; +0x17, 0x140350b17\nmov     rbx, rcx                                                       ; +0x1a, 0x140350b1a\ncmp     [rcx+418h], dl                                                 ; +0x1d, 0x140350b1d\njz      loc_140350D14                                                  ; +0x23, 0x140350b23\nmov     [rax+10h], rdi                                                 ; +0x29, 0x140350b29\nmov     rdi, [rcx+0DB8h]                                               ; +0x2d, 0x140350b2d\nmov     [rcx+418h], dl                                                 ; +0x34, 0x140350b34\nmovaps  xmmword ptr [rax-28h], xmm7                                    ; +0x3a, 0x140350b3a\nmovaps  xmmword ptr [rax-38h], xmm8                                    ; +0x3e, 0x140350b3e\nmov     rcx, [rdi+7A8h]                                                ; +0x43, 0x140350b43\ncall    cs:?stopStroke@CCMotionStreak@cocos2d@@QEAAXXZ; cocos2d::CCMotionStreak::stopStroke(void) ; +0x4a, 0x140350b4a\ncmp     byte ptr [rdi+980h], 0                                         ; +0x50, 0x140350b50\njz      short loc_140350B83                                            ; +0x57, 0x140350b57\ncmp     byte ptr [rdi+7ECh], 0                                         ; +0x59, 0x140350b59\nmov     byte ptr [rdi+980h], 0                                         ; +0x60, 0x140350b60\njz      short loc_140350B73                                            ; +0x67, 0x140350b67\nmovss   xmm1, cs:dword_140834E64                                       ; +0x69, 0x140350b69\njmp     short loc_140350B7B                                            ; +0x71, 0x140350b71\nmovss   xmm1, cs:dword_140834F64                                       ; +0x73, 0x140350b73\nmov     rcx, rdi                                                       ; +0x7b, 0x140350b7b\ncall    PlayerObject__fadeOutStreak2                                   ; +0x7e, 0x140350b7e\nmovss   xmm7, cs:flt_140835080                                         ; +0x83, 0x140350b83\nxorps   xmm8, xmm8                                                     ; +0x8b, 0x140350b8b\nmovaps  [rsp+88h+var_18], xmm6                                         ; +0x8f, 0x140350b8f\ntest    bpl, bpl                                                       ; +0x94, 0x140350b94\njnz     loc_140350C28                                                  ; +0x97, 0x140350b97\nmov     rcx, [rbx+0DB8h]                                               ; +0x9d, 0x140350b9d\nlea     rdx, [rsp+88h+arg_0]                                           ; +0xa4, 0x140350ba4\nmovss   xmm2, cs:dword_1408356B0                                       ; +0xac, 0x140350bac\ntest    sil, sil                                                       ; +0xb4, 0x140350bb4\njz      short loc_140350C0F                                            ; +0xb7, 0x140350bb7\nmov     [rsp+88h+arg_0], 96FFh                                         ; +0xb9, 0x140350bb9\nmov     [rsp+88h+arg_2], bpl                                           ; +0xc3, 0x140350bc3\ncall    PlayerObject__spawnPortalCircle                                ; +0xcb, 0x140350bcb\nlea     rcx, [rbx+420h]                                                ; +0xd0, 0x140350bd0\nmovaps  xmm6, xmm7                                                     ; +0xd7, 0x140350bd7\nlea     rdi, [rbx+41Ch]                                                ; +0xda, 0x140350bda\nmov     [rcx], bpl                                                     ; +0xe1, 0x140350be1\nmov     rax, rdi                                                       ; +0xe4, 0x140350be4\nmovss   xmm1, dword ptr [rax]                                          ; +0xe7, 0x140350be7\nucomiss xmm1, xmm8                                                     ; +0xeb, 0x140350beb\njp      short loc_140350BF3                                            ; +0xef, 0x140350bef\njz      short loc_140350BFA                                            ; +0xf1, 0x140350bf1\nucomiss xmm1, xmm7                                                     ; +0xf3, 0x140350bf3\njp      short loc_140350C63                                            ; +0xf6, 0x140350bf6\njnz     short loc_140350C63                                            ; +0xf8, 0x140350bf8\nucomiss xmm6, xmm7                                                     ; +0xfa, 0x140350bfa\njp      short loc_140350C55                                            ; +0xfd, 0x140350bfd\njnz     short loc_140350C55                                            ; +0xff, 0x140350bff\nmovss   xmm0, cs:dword_140834D80                                       ; +0x101, 0x140350c01\nmovss   dword ptr [rax], xmm0                                          ; +0x109, 0x140350c09\njmp     short loc_140350C87                                            ; +0x10d, 0x140350c0d\nmov     [rsp+88h+arg_0], 0FF00h                                        ; +0x10f, 0x140350c0f\nmov     [rsp+88h+arg_2], 0FFh                                          ; +0x119, 0x140350c19\ncall    PlayerObject__spawnPortalCircle                                ; +0x121, 0x140350c21\njmp     short loc_140350C30                                            ; +0x126, 0x140350c26\nmovaps  xmm6, xmm7                                                     ; +0x128, 0x140350c28\ntest    sil, sil                                                       ; +0x12b, 0x140350c2b\njnz     short loc_140350C33                                            ; +0x12e, 0x140350c2e\nxorps   xmm6, xmm6                                                     ; +0x130, 0x140350c30\nlea     rcx, [rbx+420h]                                                ; +0x133, 0x140350c33\nmov     byte ptr [rcx], 0                                              ; +0x13a, 0x140350c3a\nlea     rdi, [rbx+41Ch]                                                ; +0x13d, 0x140350c3d\nmov     rax, rdi                                                       ; +0x144, 0x140350c44\ntest    bpl, bpl                                                       ; +0x147, 0x140350c47\njz      short loc_140350BE7                                            ; +0x14a, 0x140350c4a\nmovss   dword ptr [rdi], xmm6                                          ; +0x14c, 0x140350c4c\njmp     loc_140350CFC                                                  ; +0x150, 0x140350c50\nmovss   xmm0, cs:dword_14083507C                                       ; +0x155, 0x140350c55\nmovss   dword ptr [rax], xmm0                                          ; +0x15d, 0x140350c5d\njmp     short loc_140350C87                                            ; +0x161, 0x140350c61\ncmp     byte ptr [rbx+418h], 0                                         ; +0x163, 0x140350c63\njnz     short loc_140350C77                                            ; +0x16a, 0x140350c6a\ncomiss  xmm1, cs:dword_140834F20                                       ; +0x16c, 0x140350c6c\nja      short loc_140350C84                                            ; +0x173, 0x140350c73\njmp     short loc_140350C87                                            ; +0x175, 0x140350c75\nmovss   xmm0, cs:dword_140834F20                                       ; +0x177, 0x140350c77\ncomiss  xmm0, xmm1                                                     ; +0x17f, 0x140350c7f\njbe     short loc_140350C87                                            ; +0x182, 0x140350c82\nmov     byte ptr [rcx], 1                                              ; +0x184, 0x140350c84\nmov     rcx, [rbx+0DB8h]                                               ; +0x187, 0x140350c87\ncall    PlayerObject__levelWillFlip                                    ; +0x18e, 0x140350c8e\ncmp     byte ptr [rbx+422h], 0                                         ; +0x193, 0x140350c93\njz      short loc_140350CA8                                            ; +0x19a, 0x140350c9a\nmov     rcx, [rbx+0DC0h]                                               ; +0x19c, 0x140350c9c\ncall    PlayerObject__levelWillFlip                                    ; +0x1a3, 0x140350ca3\nmovss   xmm0, cs:dword_1408350DC                                       ; +0x1a8, 0x140350ca8\nlea     rcx, [rbx+1A8h]                                                ; +0x1b0, 0x140350cb0\nmovss   xmm3, cs:dword_140834EDC                                       ; +0x1b7, 0x140350cb7\nmov     r9d, 7                                                         ; +0x1bf, 0x140350cbf\nmovss   xmm1, dword ptr [rdi]                                          ; +0x1c5, 0x140350cc5\nmovaps  xmm2, xmm6                                                     ; +0x1c9, 0x140350cc9\nmov     [rsp+88h+var_48], 0FFFFFFFFh                                   ; +0x1cc, 0x140350ccc\nmov     [rsp+88h+var_50], 0FFFFFFFFh                                   ; +0x1d4, 0x140350cd4\nmovss   [rsp+88h+var_58], xmm0                                         ; +0x1dc, 0x140350cdc\nmov     [rsp+88h+var_60], 1                                            ; +0x1e2, 0x140350ce2\nmovss   [rsp+88h+var_68], xmm3                                         ; +0x1ea, 0x140350cea\ncall    GJGameState__tweenValue                                        ; +0x1f0, 0x140350cf0\nmov     byte ptr [rbx+421h], 1                                         ; +0x1f5, 0x140350cf5\nmovaps  xmm6, [rsp+88h+var_18]                                         ; +0x1fc, 0x140350cfc\nmovaps  xmm7, [rsp+88h+var_28]                                         ; +0x201, 0x140350d01\nmov     rdi, [rsp+88h+arg_8]                                           ; +0x206, 0x140350d06\nmovaps  xmm8, [rsp+88h+var_38]                                         ; +0x20e, 0x140350d0e\nlea     r11, [rsp+88h+var_8]                                           ; +0x214, 0x140350d14\nmov     rbx, [r11+20h]                                                 ; +0x21c, 0x140350d1c\nmov     rbp, [r11+28h]                                                 ; +0x220, 0x140350d20\nmov     rsp, r11                                                       ; +0x224, 0x140350d24\npop     rsi                                                            ; +0x227, 0x140350d27\nretn                                                                   ; +0x228, 0x140350d28", "xrefs": ["GJBaseGameLayer::setupLevelStart @ 0x140319c88", "GJBaseGameLayer::collisionCheckObjects @ 0x14031ca7a", "GJBaseGameLayer::collisionCheckObjects @ 0x14031cb0e", "<???> @ 0x1408b8974", "<???> @ 0x1408b8984", "<???> @ 0x1409202ac"], "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"}