{"type": "func", "start": 6442493904, "end": 6442494247, "name": "cocos2d::CCDictionary::objectForKey", "pseudocode": "// \n// cocos2d::CCDictionary::objectForKey from 0x18000a7d0 to 0x18000a927 (343 bytes)\n// \n// 11 xrefs:\n// > cocos2d::CCDictionary::randomObject @ 0x18000a96e\n// > cocos2d::CCDictionary::valueForKey @ 0x18000c565\n// > cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel @ 0x18006b757\n// > cocos2d::CCEGLViewProtocol::handleTouchesBegin @ 0x18006b9d8\n// > cocos2d::CCEGLViewProtocol::handleTouchesMove @ 0x18006bd75\n// > cocos2d::CCTMXTiledMap::propertiesForGID @ 0x1800ae4ba\n// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1bd4\n// > cocos2d::CCTouchDispatcher::registerForcePrio @ 0x1800b3082\n// > cocos2d::CCTouchDispatcher::unregisterForcePrio @ 0x1800b377f\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801add14\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\nstruct cocos2d::CCObject *__fastcall cocos2d::CCDictionary::objectForKey(cocos2d::CCDictionary *this, __int64 a2)\n{\n  cocos2d::CCDictElement *m_pElements; // r11\n  __int64 v5; // r10\n  UT_hash_table *tbl; // r11\n  int v7; // edx\n  unsigned int v8; // r8d\n  unsigned int v9; // ecx\n  int v10; // edx\n  unsigned int v11; // r8d\n  unsigned int v12; // ecx\n  int v13; // edx\n  UT_hash_handle *hh_head; // rax\n  std::ptrdiff_t hho; // rdx\n  __int64 v16; // rax\n  __int64 v17; // rax\n\n  if ( this->m_eDictType == kCCDictUnknown )\n    return nullptr;\n  m_pElements = this->m_pElements;\n  v5 = 0;\n  if ( m_pElements )\n  {\n    tbl = m_pElements->hh.tbl;\n    v7 = (((BYTE1(a2) + ((BYTE2(a2) + (BYTE3(a2) << 8)) << 8)) << 8)\n        + (unsigned __int8)a2\n        - (((BYTE5(a2) + ((BYTE6(a2) + (HIBYTE(a2) << 8)) << 8)) << 8)\n         + BYTE4(a2))\n        + 17973513)\n       ^ 0x7F76D;\n    v8 = (((((BYTE1(a2) + ((BYTE2(a2) + (BYTE3(a2) << 8)) << 8)) << 8)\n          + (unsigned __int8)a2\n          - (((BYTE5(a2) + ((BYTE6(a2) + (HIBYTE(a2) << 8)) << 8)) << 8)\n           + BYTE4(a2))\n          + 17973513)\n         ^ 0x7F76D) << 8)\n       ^ (((BYTE5(a2) + ((BYTE6(a2) + (HIBYTE(a2) << 8)) << 8)) << 8) + BYTE4(a2) - 1640531527 - v7 + 17973513);\n    v9 = (v8 >> 13) ^ (-17973513 - v8 - v7);\n    v10 = (v9 >> 12) ^ (v7 - v8 - v9);\n    v11 = (v10 << 16) ^ (v8 - v10 - v9);\n    v12 = (v11 >> 5) ^ (v9 - v11 - v10);\n    v13 = (v12 >> 3) ^ (v10 - v11 - v12);\n    hh_head = tbl->buckets[(tbl->num_buckets - 1)\n                         & (((unsigned __int64)((v13 << 10) ^ (v11 - v13 - v12)) >> 15)\n                          ^ (v12 - ((v13 << 10) ^ (v11 - v13 - v12)) - v13))].hh_head;\n    if ( hh_head )\n    {\n      hho = tbl->hho;\n      v16 = (__int64)hh_head - hho;\n      if ( v16 )\n      {\n        while ( *(_DWORD *)(v16 + 320) != 8 || **(_QWORD **)(v16 + 312) != a2 )\n        {\n          v17 = *(_QWORD *)(v16 + 304);\n          if ( !v17 )\n            return (struct cocos2d::CCObject *)v5;\n          v16 = v17 - hho;\n          if ( !v16 )\n            return nullptr;\n        }\n        return *(struct cocos2d::CCObject **)(v16 + 264);\n      }\n    }\n  }\n  return (struct cocos2d::CCObject *)v5;\n}", "assembly": "; \n; cocos2d::CCDictionary::objectForKey from 0x18000a7d0 to 0x18000a927 (343 bytes)\n; \n; 11 xrefs:\n; > cocos2d::CCDictionary::randomObject @ 0x18000a96e\n; > cocos2d::CCDictionary::valueForKey @ 0x18000c565\n; > cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel @ 0x18006b757\n; > cocos2d::CCEGLViewProtocol::handleTouchesBegin @ 0x18006b9d8\n; > cocos2d::CCEGLViewProtocol::handleTouchesMove @ 0x18006bd75\n; > cocos2d::CCTMXTiledMap::propertiesForGID @ 0x1800ae4ba\n; > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1bd4\n; > cocos2d::CCTouchDispatcher::registerForcePrio @ 0x1800b3082\n; > cocos2d::CCTouchDispatcher::unregisterForcePrio @ 0x1800b377f\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801add14\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\ncmp     dword ptr [rcx+40h], 0                                         ; +0x0, 0x18000a7d0\nmov     r9, rdx                                                        ; +0x4, 0x18000a7d4\nmov     [rsp+arg_8], rdx                                               ; +0x7, 0x18000a7d7\njnz     short loc_18000A7E1                                            ; +0xc, 0x18000a7dc\nxor     eax, eax                                                       ; +0xe, 0x18000a7de\nretn                                                                   ; +0x10, 0x18000a7e0\nmov     r11, [rcx+38h]                                                 ; +0x11, 0x18000a7e1\nxor     r10d, r10d                                                     ; +0x15, 0x18000a7e5\ntest    r11, r11                                                       ; +0x18, 0x18000a7e8\njz      loc_18000A923                                                  ; +0x1b, 0x18000a7eb\nmovzx   eax, byte ptr [rsp+arg_8+6]                                    ; +0x21, 0x18000a7f1\nmovzx   ecx, byte ptr [rsp+arg_8+7]                                    ; +0x26, 0x18000a7f6\nmovzx   r8d, byte ptr [rsp+arg_8+4]                                    ; +0x2b, 0x18000a7fb\nmov     r11, [r11+110h]                                                ; +0x31, 0x18000a801\nadd     r8d, 9E3779B9h                                                 ; +0x38, 0x18000a808\nshl     ecx, 8                                                         ; +0x3f, 0x18000a80f\nadd     ecx, eax                                                       ; +0x42, 0x18000a812\nmovzx   edx, r9b                                                       ; +0x44, 0x18000a814\nmovzx   eax, byte ptr [rsp+arg_8+5]                                    ; +0x48, 0x18000a818\nadd     edx, 9E3779B9h                                                 ; +0x4d, 0x18000a81d\nshl     ecx, 8                                                         ; +0x53, 0x18000a823\nadd     ecx, eax                                                       ; +0x56, 0x18000a826\nmovzx   eax, byte ptr [rsp+arg_8+2]                                    ; +0x58, 0x18000a828\nshl     ecx, 8                                                         ; +0x5d, 0x18000a82d\nadd     r8d, ecx                                                       ; +0x60, 0x18000a830\nmovzx   ecx, byte ptr [rsp+arg_8+3]                                    ; +0x63, 0x18000a833\nshl     ecx, 8                                                         ; +0x68, 0x18000a838\nadd     ecx, eax                                                       ; +0x6b, 0x18000a83b\nmovzx   eax, byte ptr [rsp+arg_8+1]                                    ; +0x6d, 0x18000a83d\nshl     ecx, 8                                                         ; +0x72, 0x18000a842\nadd     ecx, eax                                                       ; +0x75, 0x18000a845\nshl     ecx, 8                                                         ; +0x77, 0x18000a847\nadd     edx, ecx                                                       ; +0x7a, 0x18000a84a\nmov     ecx, 0FEEDBEF7h                                                ; +0x7c, 0x18000a84c\nsub     edx, r8d                                                       ; +0x81, 0x18000a851\nadd     edx, 1124109h                                                  ; +0x84, 0x18000a854\nxor     edx, 7F76Dh                                                    ; +0x8a, 0x18000a85a\nsub     r8d, edx                                                       ; +0x90, 0x18000a860\nmov     eax, edx                                                       ; +0x93, 0x18000a863\nshl     eax, 8                                                         ; +0x95, 0x18000a865\nadd     r8d, 1124109h                                                  ; +0x98, 0x18000a868\nxor     r8d, eax                                                       ; +0x9f, 0x18000a86f\nsub     ecx, r8d                                                       ; +0xa2, 0x18000a872\nmov     eax, r8d                                                       ; +0xa5, 0x18000a875\nsub     ecx, edx                                                       ; +0xa8, 0x18000a878\nshr     eax, 0Dh                                                       ; +0xaa, 0x18000a87a\nxor     ecx, eax                                                       ; +0xad, 0x18000a87d\nsub     edx, r8d                                                       ; +0xaf, 0x18000a87f\nsub     edx, ecx                                                       ; +0xb2, 0x18000a882\nmov     eax, ecx                                                       ; +0xb4, 0x18000a884\nshr     eax, 0Ch                                                       ; +0xb6, 0x18000a886\nxor     edx, eax                                                       ; +0xb9, 0x18000a889\nsub     r8d, edx                                                       ; +0xbb, 0x18000a88b\nmov     eax, edx                                                       ; +0xbe, 0x18000a88e\nsub     r8d, ecx                                                       ; +0xc0, 0x18000a890\nshl     eax, 10h                                                       ; +0xc3, 0x18000a893\nxor     r8d, eax                                                       ; +0xc6, 0x18000a896\nsub     ecx, r8d                                                       ; +0xc9, 0x18000a899\nmov     eax, r8d                                                       ; +0xcc, 0x18000a89c\nsub     ecx, edx                                                       ; +0xcf, 0x18000a89f\nshr     eax, 5                                                         ; +0xd1, 0x18000a8a1\nxor     ecx, eax                                                       ; +0xd4, 0x18000a8a4\nsub     edx, r8d                                                       ; +0xd6, 0x18000a8a6\nsub     edx, ecx                                                       ; +0xd9, 0x18000a8a9\nmov     eax, ecx                                                       ; +0xdb, 0x18000a8ab\nshr     eax, 3                                                         ; +0xdd, 0x18000a8ad\nxor     edx, eax                                                       ; +0xe0, 0x18000a8b0\nsub     r8d, edx                                                       ; +0xe2, 0x18000a8b2\nmov     eax, edx                                                       ; +0xe5, 0x18000a8b5\nsub     r8d, ecx                                                       ; +0xe7, 0x18000a8b7\nshl     eax, 0Ah                                                       ; +0xea, 0x18000a8ba\nxor     r8d, eax                                                       ; +0xed, 0x18000a8bd\nsub     ecx, r8d                                                       ; +0xf0, 0x18000a8c0\nmov     eax, r8d                                                       ; +0xf3, 0x18000a8c3\nsub     ecx, edx                                                       ; +0xf6, 0x18000a8c6\nshr     rax, 0Fh                                                       ; +0xf8, 0x18000a8c8\nmov     edx, ecx                                                       ; +0xfc, 0x18000a8cc\nmov     ecx, [r11+8]                                                   ; +0xfe, 0x18000a8ce\nxor     rdx, rax                                                       ; +0x102, 0x18000a8d2\nmov     rax, [r11]                                                     ; +0x105, 0x18000a8d5\ndec     ecx                                                            ; +0x108, 0x18000a8d8\nand     rdx, rcx                                                       ; +0x10a, 0x18000a8da\nadd     rdx, rdx                                                       ; +0x10d, 0x18000a8dd\nmov     rax, [rax+rdx*8]                                               ; +0x110, 0x18000a8e0\ntest    rax, rax                                                       ; +0x114, 0x18000a8e4\njz      short loc_18000A923                                            ; +0x117, 0x18000a8e7\nmov     rdx, [r11+20h]                                                 ; +0x119, 0x18000a8e9\nsub     rax, rdx                                                       ; +0x11d, 0x18000a8ed\njz      short loc_18000A923                                            ; +0x120, 0x18000a8f0\ncmp     dword ptr [rax+140h], 8                                        ; +0x122, 0x18000a8f2\njnz     short loc_18000A907                                            ; +0x129, 0x18000a8f9\nmov     rcx, [rax+138h]                                                ; +0x12b, 0x18000a8fb\ncmp     [rcx], r9                                                      ; +0x132, 0x18000a902\njz      short loc_18000A91C                                            ; +0x135, 0x18000a905\nmov     rax, [rax+130h]                                                ; +0x137, 0x18000a907\ntest    rax, rax                                                       ; +0x13e, 0x18000a90e\njz      short loc_18000A923                                            ; +0x141, 0x18000a911\nsub     rax, rdx                                                       ; +0x143, 0x18000a913\njnz     short loc_18000A8F2                                            ; +0x146, 0x18000a916\nmov     rax, r10                                                       ; +0x148, 0x18000a918\nretn                                                                   ; +0x14b, 0x18000a91b\nmov     r10, [rax+108h]                                                ; +0x14c, 0x18000a91c\nmov     rax, r10                                                       ; +0x153, 0x18000a923\nretn                                                                   ; +0x156, 0x18000a926", "xrefs": ["cocos2d::CCDictionary::randomObject @ 0x18000a96e", "cocos2d::CCDictionary::valueForKey @ 0x18000c565", "cocos2d::CCEGLViewProtocol::getSetOfTouchesEndOrCancel @ 0x18006b757", "cocos2d::CCEGLViewProtocol::handleTouchesBegin @ 0x18006b9d8", "cocos2d::CCEGLViewProtocol::handleTouchesMove @ 0x18006bd75", "cocos2d::CCTMXTiledMap::propertiesForGID @ 0x1800ae4ba", "cocos2d::CCTMXMapInfo::startElement @ 0x1800b1bd4", "cocos2d::CCTouchDispatcher::registerForcePrio @ 0x1800b3082", "cocos2d::CCTouchDispatcher::unregisterForcePrio @ 0x1800b377f", "<???> @ 0x1801438a8", "<???> @ 0x1801add14"], "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"}