{"type": "func", "start": 5373564960, "end": 5373565324, "name": "NumberInputLayer::onNumber", "pseudocode": "// \n// NumberInputLayer::onNumber from 0x1404a1820 to 0x1404a198c (364 bytes)\n// \n// 2 xrefs:\n// > NumberInputLayer::init @ 0x1404a1646\n// > <???> @ 0x140929534\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:32:57 +0000\n// \n\nunsigned __int64 __fastcall NumberInputLayer::onNumber(__int64 a1, __int64 a2)\n{\n  int v3; // edx\n  unsigned __int64 result; // rax\n  const void *v5; // rdx\n  bool v6; // cc\n  void *v7; // rcx\n  cocos2d::CCString *v8; // rax\n  char *CString; // rax\n  size_t v10; // r8\n  void *Block[2]; // [rsp+38h] [rbp-30h] BYREF\n  __int128 v12; // [rsp+48h] [rbp-20h]\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  if ( v3 == 10 )\n  {\n    result = *(_QWORD *)(a1 + 744);\n    if ( !result )\n      return result;\n    v5 = (const void *)(a1 + 728);\n    v6 = *(_QWORD *)(a1 + 752) <= 0xFu;\n    *(_OWORD *)Block = 0;\n    v12 = 0;\n    if ( !v6 )\n      v5 = *(const void **)(a1 + 728);\n    sub_14003D230(Block, v5, result - 1);\n    sub_140059C40(a1 + 728, (__int64)Block);\n    if ( *((_QWORD *)&v12 + 1) > 0xFu )\n    {\n      v7 = Block[0];\n      if ( (unsigned __int64)(*((_QWORD *)&v12 + 1) + 1LL) >= 0x1000 )\n      {\n        v7 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v7);\n    }\n    return NumberInputLayer::updateNumberState(a1);\n  }\n  if ( v3 == 12 )\n    return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1080LL))(a1, 0);\n  result = *(int *)(a1 + 692);\n  if ( *(_QWORD *)(a1 + 744) < result )\n  {\n    v8 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);\n    CString = (char *)cocos2d::CCString::getCString(v8);\n    v10 = -1;\n    do\n      ++v10;\n    while ( CString[v10] );\n    sub_140044D80((_QWORD *)(a1 + 728), CString, v10);\n    return NumberInputLayer::updateNumberState(a1);\n  }\n  return result;\n}", "assembly": "; \n; NumberInputLayer::onNumber from 0x1404a1820 to 0x1404a198c (364 bytes)\n; \n; 2 xrefs:\n; > NumberInputLayer::init @ 0x1404a1646\n; > <???> @ 0x140929534\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:32:57 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1404a1820\npush    rdi                                                            ; +0x5, 0x1404a1825\nsub     rsp, 60h                                                       ; +0x6, 0x1404a1826\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1404a182a\nxor     rax, rsp                                                       ; +0x11, 0x1404a1831\nmov     [rsp+68h+var_10], rax                                          ; +0x14, 0x1404a1834\nmov     rax, [rdx]                                                     ; +0x19, 0x1404a1839\nmov     rbx, rcx                                                       ; +0x1c, 0x1404a183c\nmov     rcx, rdx                                                       ; +0x1f, 0x1404a183f\ncall    qword ptr [rax+38h]                                            ; +0x22, 0x1404a1842\nmov     edx, eax                                                       ; +0x25, 0x1404a1845\ncmp     eax, 0Ah                                                       ; +0x27, 0x1404a1847\njnz     loc_1404A1908                                                  ; +0x2a, 0x1404a184a\nmov     rax, [rbx+2E8h]                                                ; +0x30, 0x1404a1850\ntest    rax, rax                                                       ; +0x37, 0x1404a1857\njz      loc_1404A1971                                                  ; +0x3a, 0x1404a185a\nlea     r8, [rax-1]                                                    ; +0x40, 0x1404a1860\nxorps   xmm0, xmm0                                                     ; +0x44, 0x1404a1864\ncmp     rax, r8                                                        ; +0x47, 0x1404a1867\nlea     rdx, [rbx+2D8h]                                                ; +0x4a, 0x1404a186a\nxorps   xmm1, xmm1                                                     ; +0x51, 0x1404a1871\ncmovb   r8, rax                                                        ; +0x54, 0x1404a1874\ncmp     qword ptr [rbx+2F0h], 0Fh                                      ; +0x58, 0x1404a1878\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x60, 0x1404a1880\nmovdqu  [rsp+68h+var_20], xmm1                                         ; +0x65, 0x1404a1885\njbe     short loc_1404A1894                                            ; +0x6b, 0x1404a188b\nmov     rdx, [rbx+2D8h]                                                ; +0x6d, 0x1404a188d\nlea     rcx, [rsp+68h+Block]                                           ; +0x74, 0x1404a1894\ncall    sub_14003D230                                                  ; +0x79, 0x1404a1899\nlea     rdx, [rsp+68h+Block]                                           ; +0x7e, 0x1404a189e\nlea     rcx, [rbx+2D8h]                                                ; +0x83, 0x1404a18a3\ncall    sub_140059C40                                                  ; +0x8a, 0x1404a18aa\nmov     rdx, qword ptr [rsp+68h+var_20+8]                              ; +0x8f, 0x1404a18af\ncmp     rdx, 0Fh                                                       ; +0x94, 0x1404a18b4\njbe     loc_1404A1969                                                  ; +0x98, 0x1404a18b8\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x9e, 0x1404a18be\ninc     rdx                                                            ; +0xa3, 0x1404a18c3\nmov     rax, rcx                                                       ; +0xa6, 0x1404a18c6\ncmp     rdx, 1000h                                                     ; +0xa9, 0x1404a18c9\njb      short loc_1404A1901                                            ; +0xb0, 0x1404a18d0\nmov     rcx, [rcx-8]                                                   ; +0xb2, 0x1404a18d2\nadd     rdx, 27h ; '''                                                 ; +0xb6, 0x1404a18d6\nsub     rax, rcx                                                       ; +0xba, 0x1404a18da\nsub     rax, 8                                                         ; +0xbd, 0x1404a18dd\ncmp     rax, 1Fh                                                       ; +0xc1, 0x1404a18e1\njbe     short loc_1404A1901                                            ; +0xc5, 0x1404a18e5\nxor     r9d, r9d; LineNo                                               ; +0xc7, 0x1404a18e7\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xca, 0x1404a18ea\nxor     r8d, r8d; FileName                                             ; +0xd3, 0x1404a18f3\nxor     edx, edx; FunctionName                                         ; +0xd6, 0x1404a18f6\nxor     ecx, ecx; Expression                                           ; +0xd8, 0x1404a18f8\ncall    cs:_invoke_watson                                              ; +0xda, 0x1404a18fa\ndb 0CCh                                                                ; +0xe0, 0x1404a1900\ncall    j_j_free                                                       ; +0xe1, 0x1404a1901\njmp     short loc_1404A1969                                            ; +0xe6, 0x1404a1906\ncmp     edx, 0Ch                                                       ; +0xe8, 0x1404a1908\njnz     short loc_1404A191D                                            ; +0xeb, 0x1404a190b\nmov     rax, [rbx]                                                     ; +0xed, 0x1404a190d\nxor     edx, edx                                                       ; +0xf0, 0x1404a1910\nmov     rcx, rbx                                                       ; +0xf2, 0x1404a1912\ncall    qword ptr [rax+438h]                                           ; +0xf5, 0x1404a1915\njmp     short loc_1404A1971                                            ; +0xfb, 0x1404a191b\nmovsxd  rax, dword ptr [rbx+2B4h]                                      ; +0xfd, 0x1404a191d\ncmp     [rbx+2E8h], rax                                                ; +0x104, 0x1404a1924\njnb     short loc_1404A1971                                            ; +0x10b, 0x1404a192b\nlea     rcx, word_1406ED6F8                                            ; +0x10d, 0x1404a192d\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x114, 0x1404a1934\nmov     rcx, rax                                                       ; +0x11a, 0x1404a193a\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x11d, 0x1404a193d\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x123, 0x1404a1943\nnop     word ptr [rax+rax+00h]                                         ; +0x12a, 0x1404a194a\ninc     r8; Size                                                       ; +0x130, 0x1404a1950\ncmp     byte ptr [rax+r8], 0                                           ; +0x133, 0x1404a1953\njnz     short loc_1404A1950                                            ; +0x138, 0x1404a1958\nmov     rdx, rax; void *                                               ; +0x13a, 0x1404a195a\nlea     rcx, [rbx+2D8h]; Src                                           ; +0x13d, 0x1404a195d\ncall    sub_140044D80                                                  ; +0x144, 0x1404a1964\nmov     rcx, rbx                                                       ; +0x149, 0x1404a1969\ncall    NumberInputLayer__updateNumberState                            ; +0x14c, 0x1404a196c\nmov     rcx, [rsp+68h+var_10]                                          ; +0x151, 0x1404a1971\nxor     rcx, rsp; StackCookie                                          ; +0x156, 0x1404a1976\ncall    __security_check_cookie                                        ; +0x159, 0x1404a1979\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x15e, 0x1404a197e\nadd     rsp, 60h                                                       ; +0x166, 0x1404a1986\npop     rdi                                                            ; +0x16a, 0x1404a198a\nretn                                                                   ; +0x16b, 0x1404a198b", "xrefs": ["NumberInputLayer::init @ 0x1404a1646", "<???> @ 0x140929534"], "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"}