{"type": "func", "start": 4304097104, "end": 4304097507, "name": "ClearPlatformerSavesPopup::FLAlert_Clicked", "pseudocode": "// \n// ClearPlatformerSavesPopup::FLAlert_Clicked from 0x1008b4f50 to 0x1008b50e3 (403 bytes)\n// \n// 2 xrefs:\n// > sub_1008B5130 @ 0x1008b513c\n// > <???> @ 0x100badb30\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:37:23 +0000\n// \n\nvoid __fastcall ClearPlatformerSavesPopup::FLAlert_Clicked(__int64 a1, __int64 a2, unsigned __int8 a3, double a4)\n{\n  __int64 v4; // rax\n  int v5; // r14d\n  const char *v6; // rdx\n  char *v7; // rax\n  const char *CString; // r14\n  size_t v9; // rax\n  size_t v10; // rbx\n  char *v11; // r15\n  char v12; // r14\n  size_t v13; // r12\n  char *v14; // rbx\n  __int128 v15; // [rsp+0h] [rbp-50h] BYREF\n  void *__p; // [rsp+10h] [rbp-40h]\n  __int128 __dst; // [rsp+18h] [rbp-38h] BYREF\n  void *v18; // [rsp+28h] [rbp-28h]\n\n  if ( a3 ^ 1 | ((*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 1) )\n    return;\n  v4 = GameLevelManager::sharedState();\n  v5 = sub_10054BDE0(a4, v4, *(unsigned __int8 *)(a1 + 672));\n  sub_1008B4B80(a1, a4);\n  v6 = \"s\";\n  if ( v5 == 1 )\n    v6 = \"\";\n  v7 = sub_10088E820(\"Cleared <cg>%i</c> platformer save%s.\", v5, v6);\n  CString = (const char *)cocos2d::CCString::getCString((__int64)v7);\n  v9 = strlen(CString);\n  if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v10 = v9;\n  if ( v9 >= 0x17 )\n  {\n    v13 = 26;\n    if ( (v9 | 7) != 0x17 )\n      v13 = (v9 | 7) + 1;\n    v11 = (char *)operator new(v13);\n    v18 = v11;\n    *(_QWORD *)&__dst = v13 + 1;\n    *((_QWORD *)&__dst + 1) = v10;\nLABEL_12:\n    memmove(v11, CString, v10);\n    v11[v10] = 0;\n    v12 = __dst;\n    if ( (__dst & 1) == 0 )\n      goto LABEL_8;\nLABEL_13:\n    sub_10001AD30(&v15, v18, *((unsigned __int64 *)&__dst + 1));\n    goto LABEL_14;\n  }\n  LOBYTE(__dst) = 2 * v9;\n  v11 = (char *)&__dst + 1;\n  if ( v9 )\n    goto LABEL_12;\n  BYTE1(__dst) = 0;\n  v12 = __dst;\n  if ( (__dst & 1) != 0 )\n    goto LABEL_13;\nLABEL_8:\n  __p = v18;\n  v15 = __dst;\nLABEL_14:\n  v14 = FLAlertLayer::create_1(0, (int)\"Cleared\", (__int64)&v15, (int)\"OK\", 0, 300.0);\n  if ( (v15 & 1) != 0 )\n    operator delete(__p);\n  (*(void (__fastcall **)(char *))(*(_QWORD *)v14 + 1312LL))(v14);\n  if ( (v12 & 1) != 0 )\n    operator delete(v18);\n}", "assembly": "; \n; ClearPlatformerSavesPopup::FLAlert_Clicked from 0x1008b4f50 to 0x1008b50e3 (403 bytes)\n; \n; 2 xrefs:\n; > sub_1008B5130 @ 0x1008b513c\n; > <???> @ 0x100badb30\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:37:23 +0000\n; \npush    rbp                                                            ; +0x0, 0x1008b4f50\nmov     rbp, rsp                                                       ; +0x1, 0x1008b4f51\npush    r15                                                            ; +0x4, 0x1008b4f54\npush    r14                                                            ; +0x6, 0x1008b4f56\npush    r12                                                            ; +0x8, 0x1008b4f58\npush    rbx                                                            ; +0xa, 0x1008b4f5a\nsub     rsp, 30h                                                       ; +0xb, 0x1008b4f5b\nmov     r14d, edx                                                      ; +0xf, 0x1008b4f5f\nmov     rbx, rdi                                                       ; +0x12, 0x1008b4f62\nxor     r14b, 1                                                        ; +0x15, 0x1008b4f65\nmov     rax, [rsi]                                                     ; +0x19, 0x1008b4f69\nmov     rdi, rsi                                                       ; +0x1c, 0x1008b4f6c\ncall    qword ptr [rax+40h]                                            ; +0x1f, 0x1008b4f6f\ncmp     eax, 1                                                         ; +0x22, 0x1008b4f72\nsetnz   al                                                             ; +0x25, 0x1008b4f75\nor      al, r14b                                                       ; +0x28, 0x1008b4f78\njnz     loc_1008B50D1                                                  ; +0x2b, 0x1008b4f7b\ncall    GameLevelManager__sharedState                                  ; +0x31, 0x1008b4f81\nmovzx   esi, byte ptr [rbx+2A0h]                                       ; +0x36, 0x1008b4f86\nmov     rdi, rax                                                       ; +0x3d, 0x1008b4f8d\ncall    sub_10054BDE0                                                  ; +0x40, 0x1008b4f90\nmov     r14d, eax                                                      ; +0x45, 0x1008b4f95\nmov     rdi, rbx                                                       ; +0x48, 0x1008b4f98\ncall    sub_1008B4B80                                                  ; +0x4b, 0x1008b4f9b\ncmp     r14d, 1                                                        ; +0x50, 0x1008b4fa0\nlea     rax, asc_100A41668; \"\"                                         ; +0x54, 0x1008b4fa4\nlea     rdx, aS_10; \"s\"                                                ; +0x5b, 0x1008b4fab\ncmovz   rdx, rax                                                       ; +0x62, 0x1008b4fb2\nlea     rdi, aClearedCgICPla; \"Cleared <cg>%i</c> platformer save%s.\"  ; +0x66, 0x1008b4fb6\nmov     esi, r14d                                                      ; +0x6d, 0x1008b4fbd\nxor     eax, eax                                                       ; +0x70, 0x1008b4fc0\ncall    sub_10088E820                                                  ; +0x72, 0x1008b4fc2\nmov     rdi, rax                                                       ; +0x77, 0x1008b4fc7\ncall    cocos2d__CCString__getCString                                  ; +0x7a, 0x1008b4fca\nmov     r14, rax                                                       ; +0x7f, 0x1008b4fcf\nmov     rdi, rax; __s                                                  ; +0x82, 0x1008b4fd2\ncall    _strlen                                                        ; +0x85, 0x1008b4fd5\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x8a, 0x1008b4fda\njnb     loc_1008B50DE                                                  ; +0x8e, 0x1008b4fde\nmov     rbx, rax                                                       ; +0x94, 0x1008b4fe4\ncmp     rax, 17h                                                       ; +0x97, 0x1008b4fe7\njnb     short loc_1008B501E                                            ; +0x9b, 0x1008b4feb\nlea     eax, [rbx+rbx]                                                 ; +0x9d, 0x1008b4fed\nmov     byte ptr [rbp+__dst], al                                       ; +0xa0, 0x1008b4ff0\nlea     r15, [rbp+__dst+1]                                             ; +0xa3, 0x1008b4ff3\ntest    rbx, rbx                                                       ; +0xa7, 0x1008b4ff7\njnz     short loc_1008B5051                                            ; +0xaa, 0x1008b4ffa\nmov     byte ptr [r15+rbx], 0                                          ; +0xac, 0x1008b4ffc\nmovzx   r14d, byte ptr [rbp+__dst]                                     ; +0xb1, 0x1008b5001\ntest    r14b, 1                                                        ; +0xb6, 0x1008b5006\njnz     short loc_1008B506F                                            ; +0xba, 0x1008b500a\nmov     rax, [rbp+var_28]                                              ; +0xbc, 0x1008b500c\nmov     [rbp+__p], rax                                                 ; +0xc0, 0x1008b5010\nmovups  xmm0, [rbp+__dst]                                              ; +0xc4, 0x1008b5014\nmovaps  [rbp+var_50], xmm0                                             ; +0xc8, 0x1008b5018\njmp     short loc_1008B5080                                            ; +0xcc, 0x1008b501c\nmov     rax, rbx                                                       ; +0xce, 0x1008b501e\nor      rax, 7                                                         ; +0xd1, 0x1008b5021\nlea     rcx, [rax+1]                                                   ; +0xd5, 0x1008b5025\ncmp     rax, 17h                                                       ; +0xd9, 0x1008b5029\nmov     r12d, 1Ah                                                      ; +0xdd, 0x1008b502d\ncmovnz  r12, rcx                                                       ; +0xe3, 0x1008b5033\nmov     rdi, r12; __sz                                                 ; +0xe7, 0x1008b5037\ncall    __Znwm; operator new(ulong)                                    ; +0xea, 0x1008b503a\nmov     r15, rax                                                       ; +0xef, 0x1008b503f\nmov     [rbp+var_28], rax                                              ; +0xf2, 0x1008b5042\ninc     r12                                                            ; +0xf6, 0x1008b5046\nmov     qword ptr [rbp+__dst], r12                                     ; +0xf9, 0x1008b5049\nmov     qword ptr [rbp+__dst+8], rbx                                   ; +0xfd, 0x1008b504d\nmov     rdi, r15; __dst                                                ; +0x101, 0x1008b5051\nmov     rsi, r14; __src                                                ; +0x104, 0x1008b5054\nmov     rdx, rbx; __len                                                ; +0x107, 0x1008b5057\ncall    _memmove                                                       ; +0x10a, 0x1008b505a\nmov     byte ptr [r15+rbx], 0                                          ; +0x10f, 0x1008b505f\nmovzx   r14d, byte ptr [rbp+__dst]                                     ; +0x114, 0x1008b5064\ntest    r14b, 1                                                        ; +0x119, 0x1008b5069\njz      short loc_1008B500C                                            ; +0x11d, 0x1008b506d\nmov     rdx, qword ptr [rbp+__dst+8]                                   ; +0x11f, 0x1008b506f\nmov     rsi, [rbp+var_28]                                              ; +0x123, 0x1008b5073\nlea     rdi, [rbp+var_50]                                              ; +0x127, 0x1008b5077\ncall    sub_10001AD30                                                  ; +0x12b, 0x1008b507b\nlea     rsi, aCleared; \"Cleared\"                                       ; +0x130, 0x1008b5080\nlea     rcx, aOk; \"OK\"                                                 ; +0x137, 0x1008b5087\nlea     rdx, [rbp+var_50]                                              ; +0x13e, 0x1008b508e\nmovss   xmm0, cs:dword_100A03734                                       ; +0x142, 0x1008b5092\nxor     edi, edi                                                       ; +0x14a, 0x1008b509a\nxor     r8d, r8d                                                       ; +0x14c, 0x1008b509c\ncall    FLAlertLayer__create_1                                         ; +0x14f, 0x1008b509f\nmov     rbx, rax                                                       ; +0x154, 0x1008b50a4\ntest    byte ptr [rbp+var_50], 1                                       ; +0x157, 0x1008b50a7\njz      short loc_1008B50B6                                            ; +0x15b, 0x1008b50ab\nmov     rdi, [rbp+__p]; __p                                            ; +0x15d, 0x1008b50ad\ncall    __ZdlPv; operator delete(void *)                               ; +0x161, 0x1008b50b1\nmov     rax, [rbx]                                                     ; +0x166, 0x1008b50b6\nmov     rdi, rbx                                                       ; +0x169, 0x1008b50b9\ncall    qword ptr [rax+520h]                                           ; +0x16c, 0x1008b50bc\ntest    r14b, 1                                                        ; +0x172, 0x1008b50c2\njz      short loc_1008B50D1                                            ; +0x176, 0x1008b50c6\nmov     rdi, [rbp+var_28]; __p                                         ; +0x178, 0x1008b50c8\ncall    __ZdlPv; operator delete(void *)                               ; +0x17c, 0x1008b50cc\nadd     rsp, 30h                                                       ; +0x181, 0x1008b50d1\npop     rbx                                                            ; +0x185, 0x1008b50d5\npop     r12                                                            ; +0x186, 0x1008b50d6\npop     r14                                                            ; +0x188, 0x1008b50d8\npop     r15                                                            ; +0x18a, 0x1008b50da\npop     rbp                                                            ; +0x18c, 0x1008b50dc\nretn                                                                   ; +0x18d, 0x1008b50dd\ncall    sub_100003630                                                  ; +0x18e, 0x1008b50de", "xrefs": ["sub_1008B5130 @ 0x1008b513c", "<???> @ 0x100badb30"], "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"}