{"type": "func", "start": 6442573392, "end": 6442573528, "name": "sub_18001DE50", "pseudocode": "// \n// sub_18001DE50 from 0x18001de50 to 0x18001ded8 (136 bytes)\n// \n// 3 xrefs:\n// > cocos2d::extension::CCTableView::CCTableView @ 0x18001ca2a\n// > sub_18001DA20 @ 0x18001dacb\n// > <???> @ 0x18004b0ac\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\nchar *__fastcall sub_18001DE50(_QWORD *a1, unsigned __int64 a2)\n{\n  unsigned __int64 v3; // rbx\n  void *v4; // rax\n  void *v5; // rcx\n  _QWORD *v6; // rax\n  char *result; // rax\n\n  if ( a2 > 0x3FFFFFFFFFFFFFFFLL )\n    goto LABEL_11;\n  v3 = 4 * a2;\n  if ( 4 * a2 < 0x1000 )\n  {\n    if ( v3 )\n      v6 = operator new(4 * a2);\n    else\n      v6 = nullptr;\n    goto LABEL_10;\n  }\n  if ( v3 + 39 < v3 )\nLABEL_11:\n    Concurrency::cancel_current_task();\n  v4 = operator new(v3 + 39);\n  v5 = v4;\n  if ( !v4 )\n    invalid_parameter_noinfo_noreturn();\n  v6 = (_QWORD *)(((unsigned __int64)v4 + 39) & 0xFFFFFFFFFFFFFFE0uLL);\n  *(v6 - 1) = v5;\nLABEL_10:\n  *a1 = v6;\n  a1[1] = v6;\n  result = (char *)v6 + v3;\n  a1[2] = result;\n  return result;\n}", "assembly": "; \n; sub_18001DE50 from 0x18001de50 to 0x18001ded8 (136 bytes)\n; \n; 3 xrefs:\n; > cocos2d::extension::CCTableView::CCTableView @ 0x18001ca2a\n; > sub_18001DA20 @ 0x18001dacb\n; > <???> @ 0x18004b0ac\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x18001de50\npush    rdi                                                            ; +0x5, 0x18001de55\nsub     rsp, 20h                                                       ; +0x6, 0x18001de56\nmov     rax, 3FFFFFFFFFFFFFFFh                                         ; +0xa, 0x18001de5a\nmov     rdi, rcx                                                       ; +0x14, 0x18001de64\ncmp     rdx, rax                                                       ; +0x17, 0x18001de67\nja      short loc_18001DED2                                            ; +0x1a, 0x18001de6a\nlea     rbx, ds:0[rdx*4]                                               ; +0x1c, 0x18001de6c\ncmp     rbx, 1000h                                                     ; +0x24, 0x18001de74\njb      short loc_18001DEA8                                            ; +0x2b, 0x18001de7b\nlea     rcx, [rbx+27h]; Size                                           ; +0x2d, 0x18001de7d\ncmp     rcx, rbx                                                       ; +0x31, 0x18001de81\njbe     short loc_18001DED2                                            ; +0x34, 0x18001de84\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x36, 0x18001de86\nmov     rcx, rax                                                       ; +0x3b, 0x18001de8b\ntest    rax, rax                                                       ; +0x3e, 0x18001de8e\njz      short loc_18001DEA1                                            ; +0x41, 0x18001de91\nadd     rax, 27h ; '''                                                 ; +0x43, 0x18001de93\nand     rax, 0FFFFFFFFFFFFFFE0h                                        ; +0x47, 0x18001de97\nmov     [rax-8], rcx                                                   ; +0x4b, 0x18001de9b\njmp     short loc_18001DEB9                                            ; +0x4f, 0x18001de9f\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x51, 0x18001dea1\nalign 8                                                                ; +0x57, 0x18001dea7\ntest    rbx, rbx                                                       ; +0x58, 0x18001dea8\njz      short loc_18001DEB7                                            ; +0x5b, 0x18001deab\nmov     rcx, rbx; Size                                                 ; +0x5d, 0x18001dead\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x60, 0x18001deb0\njmp     short loc_18001DEB9                                            ; +0x65, 0x18001deb5\nxor     eax, eax                                                       ; +0x67, 0x18001deb7\nmov     [rdi], rax                                                     ; +0x69, 0x18001deb9\nmov     [rdi+8], rax                                                   ; +0x6c, 0x18001debc\nadd     rax, rbx                                                       ; +0x70, 0x18001dec0\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x73, 0x18001dec3\nmov     [rdi+10h], rax                                                 ; +0x78, 0x18001dec8\nadd     rsp, 20h                                                       ; +0x7c, 0x18001decc\npop     rdi                                                            ; +0x80, 0x18001ded0\nretn                                                                   ; +0x81, 0x18001ded1\ncall    ?cancel_current_task@Concurrency@@YAXXZ; Concurrency::cancel_current_task(void) ; +0x82, 0x18001ded2\ndb 0CCh                                                                ; +0x87, 0x18001ded7", "xrefs": ["cocos2d::extension::CCTableView::CCTableView @ 0x18001ca2a", "sub_18001DA20 @ 0x18001dacb", "<???> @ 0x18004b0ac"], "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"}