{"type": "func", "start": 6442492720, "end": 6442492928, "name": "cocos2d::CCDictionary::getFirstKey", "pseudocode": "// \n// cocos2d::CCDictionary::getFirstKey from 0x18000a330 to 0x18000a400 (208 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801adcf0\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\n// Hidden C++ exception states: #wind=1\n_QWORD *__fastcall cocos2d::CCDictionary::getFirstKey(__int64 a1, _QWORD *a2)\n{\n  _QWORD *v4; // r9\n  unsigned __int64 Size; // rdi\n  __int64 v6; // rcx\n  unsigned __int64 v7; // rdx\n  _QWORD *v8; // rax\n  char *v9; // rbx\n\n  sub_180005910(a2, Buf2);\n  v4 = *(_QWORD **)(a1 + 56);\n  if ( v4 && *(_DWORD *)(v4[34] + 16LL) && *(_DWORD *)(a1 + 64) == 1 )\n  {\n    Size = -1;\n    do\n      ++Size;\n    while ( *((_BYTE *)v4 + Size) );\n    v6 = a2[2];\n    v7 = a2[3];\n    if ( Size > v7 - v6 )\n    {\n      sub_180007900(a2, Size, 0, v4, Size);\n    }\n    else\n    {\n      a2[2] = v6 + Size;\n      v8 = a2;\n      if ( v7 > 0xF )\n        v8 = (_QWORD *)*a2;\n      v9 = (char *)v8 + v6;\n      memmove((char *)v8 + v6, v4, Size);\n      v9[Size] = 0;\n    }\n  }\n  return a2;\n}", "assembly": "; \n; cocos2d::CCDictionary::getFirstKey from 0x18000a330 to 0x18000a400 (208 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801adcf0\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_10], rbx                                              ; +0x0, 0x18000a330\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x18000a335\nmov     [rsp+arg_8], rdx                                               ; +0xa, 0x18000a33a\npush    rdi                                                            ; +0xf, 0x18000a33f\nsub     rsp, 30h                                                       ; +0x10, 0x18000a340\nmov     rsi, rdx                                                       ; +0x14, 0x18000a344\nmov     rbx, rcx                                                       ; +0x17, 0x18000a347\nmov     [rsp+38h+arg_0], 1                                             ; +0x1a, 0x18000a34a\nlea     rdx, Buf2                                                      ; +0x22, 0x18000a352\nmov     rcx, rsi                                                       ; +0x29, 0x18000a359\ncall    sub_180005910                                                  ; +0x2c, 0x18000a35c\nnop                                                                    ; +0x31, 0x18000a361\nmov     [rsp+38h+arg_0], 1                                             ; +0x32, 0x18000a362\nmov     r9, [rbx+38h]                                                  ; +0x3a, 0x18000a36a\ntest    r9, r9                                                         ; +0x3e, 0x18000a36e\njz      short loc_18000A3ED                                            ; +0x41, 0x18000a371\nmov     rax, [r9+110h]                                                 ; +0x43, 0x18000a373\ncmp     dword ptr [rax+10h], 0                                         ; +0x4a, 0x18000a37a\njbe     short loc_18000A3ED                                            ; +0x4e, 0x18000a37e\ncmp     dword ptr [rbx+40h], 1                                         ; +0x50, 0x18000a380\njnz     short loc_18000A3ED                                            ; +0x54, 0x18000a384\nmov     rdi, 0FFFFFFFFFFFFFFFFh                                        ; +0x56, 0x18000a386\nnop     dword ptr [rax]                                                ; +0x5d, 0x18000a38d\ninc     rdi                                                            ; +0x60, 0x18000a390\ncmp     byte ptr [r9+rdi], 0                                           ; +0x63, 0x18000a393\njnz     short loc_18000A390                                            ; +0x68, 0x18000a398\nmov     rcx, [rsi+10h]                                                 ; +0x6a, 0x18000a39a\nmov     rdx, [rsi+18h]                                                 ; +0x6e, 0x18000a39e\nmov     rax, rdx                                                       ; +0x72, 0x18000a3a2\nsub     rax, rcx                                                       ; +0x75, 0x18000a3a5\ncmp     rdi, rax                                                       ; +0x78, 0x18000a3a8\nja      short loc_18000A3D9                                            ; +0x7b, 0x18000a3ab\nlea     rax, [rcx+rdi]                                                 ; +0x7d, 0x18000a3ad\nmov     [rsi+10h], rax                                                 ; +0x81, 0x18000a3b1\nmov     rax, rsi                                                       ; +0x85, 0x18000a3b5\ncmp     rdx, 0Fh                                                       ; +0x88, 0x18000a3b8\njbe     short loc_18000A3C1                                            ; +0x8c, 0x18000a3bc\nmov     rax, [rsi]                                                     ; +0x8e, 0x18000a3be\nlea     rbx, [rax+rcx]                                                 ; +0x91, 0x18000a3c1\nmov     r8, rdi; Size                                                  ; +0x95, 0x18000a3c5\nmov     rdx, r9; Src                                                   ; +0x98, 0x18000a3c8\nmov     rcx, rbx; void *                                               ; +0x9b, 0x18000a3cb\ncall    memmove                                                        ; +0x9e, 0x18000a3ce\nmov     byte ptr [rbx+rdi], 0                                          ; +0xa3, 0x18000a3d3\njmp     short loc_18000A3ED                                            ; +0xa7, 0x18000a3d7\nmov     [rsp+38h+Size], rdi; Size                                      ; +0xa9, 0x18000a3d9\nxor     r8d, r8d                                                       ; +0xae, 0x18000a3de\nmov     rdx, rdi                                                       ; +0xb1, 0x18000a3e1\nmov     rcx, rsi; Src                                                  ; +0xb4, 0x18000a3e4\ncall    sub_180007900                                                  ; +0xb7, 0x18000a3e7\nnop                                                                    ; +0xbc, 0x18000a3ec\nmov     rax, rsi                                                       ; +0xbd, 0x18000a3ed\nmov     rbx, [rsp+38h+arg_10]                                          ; +0xc0, 0x18000a3f0\nmov     rsi, [rsp+38h+arg_18]                                          ; +0xc5, 0x18000a3f5\nadd     rsp, 30h                                                       ; +0xca, 0x18000a3fa\npop     rdi                                                            ; +0xce, 0x18000a3fe\nretn                                                                   ; +0xcf, 0x18000a3ff", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801adcf0"], "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"}