// // cocos2d::CCKeyboardDispatcher::dispatchKeyboardMSG from 0x8099d0 to 0x809c1c (588 bytes) // // 1 xrefs: // > Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeKeyboardEvent @ 0x7ee214 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:01:28 +0000 // int __fastcall cocos2d::CCKeyboardDispatcher::dispatchKeyboardMSG(int a1, int a2, int a3, int a4, int a5, int a6) { cocos2d::CCDirector *v10; // r0 char *v11; // r0 char *v12; // r6 _DWORD *v13; // r0 _DWORD *v14; // r0 _DWORD *v15; // r3 char **v16; // r8 int v17; // r1 unsigned int v18; // r5 char *v19; // r8 char *v20; // r2 char *v21; // r3 char *v22; // r1 int v24; // r1 void **v25; // r0 char *v26; // r1 char *v27; // r2 void *v28; // [sp+Ch] [bp-20h] BYREF char *v29; // [sp+10h] [bp-1Ch] char *v30; // [sp+14h] [bp-18h] char *v31; // [sp+18h] [bp-14h] BYREF char *v32; // [sp+1Ch] [bp-10h] char *v33; // [sp+20h] [bp-Ch] if ( a3 ) { v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)a1); cocos2d::CCDirector::noteInput(v10); } if ( !a4 || !*(_BYTE *)(a1 + 92) ) { *(_BYTE *)(a1 + 93) = a4; v11 = (char *)cocos2d::CCKeyboardDispatcher::convertKeyCode(a2); v12 = v11; if ( (int)v11 < 16 || (int)v11 > 18 && v11 != (_BYTE *)&stru_3EC.st_value + 3 ) { v31 = v11; v28 = nullptr; v13 = (_DWORD *)(a1 + 68); v29 = nullptr; v30 = nullptr; if ( a3 ) { v14 = std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::find( v13, (unsigned int *)&v31); v15 = v14; if ( a4 && v14 ) { v25 = &v28; if ( &v28 == v15 + 3 ) goto LABEL_18; v26 = (char *)v15[3]; v27 = (char *)v15[4]; goto LABEL_41; } v24 = *(_DWORD *)(a1 + 96); if ( v24 ) { (*(void (__fastcall **)(char **, int, char *, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v24 + 40))( &v31, v24, v12, *(unsigned __int8 *)(a1 + 89), *(unsigned __int8 *)(a1 + 90), *(unsigned __int8 *)(a1 + 88)); v28 = v31; v29 = v32; v30 = v33; v33 = nullptr; v32 = nullptr; v31 = nullptr; std::__vector_base::~__vector_base(&v31); } v31 = v12; v25 = (void **)std::unordered_map>::operator[](a1 + 68, (unsigned int *)&v31); if ( &v28 != v25 ) { v26 = (char *)v28; v27 = v29; LABEL_41: std::vector::assign(v25, v26, v27); } } else { v16 = (char **)std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::find( v13, (unsigned int *)&v31); if ( v16 ) { if ( &v28 != (void **)(v16 + 3) ) std::vector::assign(&v28, v16[3], v16[4]); std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::erase( (_DWORD *)(a1 + 68), v16); } else { v17 = *(_DWORD *)(a1 + 96); if ( v17 ) { (*(void (__fastcall **)(char **, int, char *, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v17 + 40))( &v31, v17, v12, *(unsigned __int8 *)(a1 + 89), *(unsigned __int8 *)(a1 + 90), *(unsigned __int8 *)(a1 + 88)); v28 = v31; v29 = v32; v30 = v33; v33 = nullptr; v32 = nullptr; v31 = nullptr; std::__vector_base::~__vector_base(&v31); } } } LABEL_18: if ( *(_DWORD *)(a1 + 96) ) { v18 = *(unsigned __int8 *)(a1 + 94); if ( !*(_BYTE *)(a1 + 94) ) { v19 = (char *)*(unsigned __int8 *)(a1 + 94); v31 = v19; v32 = (char *)v18; v33 = (char *)v18; while ( v18 < (v29 - (_BYTE *)v28) >> 2 ) { if ( (*(int (__fastcall **)(_DWORD, _DWORD, int))(**(_DWORD **)(a1 + 96) + 44))( *(_DWORD *)(a1 + 96), *((_DWORD *)v28 + v18), a3) ) { v19 = (_BYTE *)(&dword_0 + 1); } else if ( v32 == v33 ) { std::vector::__push_back_slow_path((int)&v31, (_DWORD *)v28 + v18); } else { if ( v32 ) *(_DWORD *)v32 = *((_DWORD *)v28 + v18); v32 += 4; } ++v18; } v20 = v31; v31 = (char *)v28; v21 = v32; v32 = v29; v22 = v30; v28 = v20; v30 = v33; v29 = v21; v33 = v22; if ( v20 == v21 && v19 ) { std::__vector_base::~__vector_base(&v31); LABEL_35: std::__vector_base::~__vector_base((char **)&v28); return 1; } std::__vector_base::~__vector_base(&v31); } } *(_BYTE *)(a1 + 56) = 1; cocos2d::CCKeyboardDispatcher::dispatchToTopDelegate(a1, (int)v12, a3, &v28, a5, a6); *(_BYTE *)(a1 + 56) = 0; cocos2d::CCKeyboardDispatcher::flushPendingDelegates((cocos2d::CCKeyboardDelegate *)a1); goto LABEL_35; } } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source