// // cocos2d::CCKeypadDispatcher::dispatchKeypadMSG from 0x1006d0560 to 0x1006d07e4 (644 bytes) // // 2 xrefs: // > cocos2d::CCLayer::keyDown @ 0x1004aa05b // > sub_1004AA070 @ 0x1004aa09b // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // 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:35:38 +0000 // char __fastcall cocos2d::CCKeypadDispatcher::dispatchKeypadMSG(__int64 a1, int a2) { __int64 v2; // rbx __int64 v3; // r14 int v4; // eax __int64 v5; // rax __int64 v6; // rax __int64 v7; // r14 int v8; // eax __int64 v9; // rax void (__fastcall ***Delegate)(_QWORD); // rax __int64 v11; // r14 int v12; // eax unsigned int v13; // r15d int v14; // r12d __int64 v15; // r14 int v16; // eax __int64 v17; // rax unsigned int *v18; // rdi __int64 v19; // rax unsigned __int64 v20; // r15 unsigned int *v21; // rax __int64 v22; // r12 __int64 *v23; // r13 __int64 *v24; // rbx __int64 v25; // r14 unsigned int *v26; // rdi unsigned __int64 v27; // r14 _QWORD *v28; // rax __int64 v30; // [rsp+0h] [rbp-30h] v2 = a1; if ( *(_BYTE *)(cocos2d::CCDirector::sharedDirector() + 176) ) return 1; *(_BYTE *)(a1 + 64) = 1; if ( !(unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 56)) || !(unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 56)) ) goto LABEL_15; if ( a2 == 1 ) { v7 = *(_QWORD *)(a1 + 56); v8 = sub_1007FEF90(v7); v9 = sub_1007FEFE0(v7, (unsigned int)(v8 - 1)); if ( !v9 ) goto LABEL_15; Delegate = (void (__fastcall ***)(_QWORD))cocos2d::CCKeypadHandler::getDelegate(v9); (**Delegate)(Delegate); if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 56)) <= 1 ) goto LABEL_15; goto LABEL_11; } if ( a2 != 2 ) { v13 = 0; v14 = -1; do { v15 = *(_QWORD *)(a1 + 56); v16 = sub_1007FEF90(v15); v17 = sub_1007FEFE0(v15, (unsigned int)(v16 + v14)); if ( !v17 ) break; cocos2d::CCKeypadHandler::getDelegate(v17); ++v13; --v14; } while ( v13 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 56)) ); goto LABEL_15; } v3 = *(_QWORD *)(a1 + 56); v4 = sub_1007FEF90(v3); v5 = sub_1007FEFE0(v3, (unsigned int)(v4 - 1)); if ( v5 ) { v6 = cocos2d::CCKeypadHandler::getDelegate(v5); (*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 8LL))(v6); if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 56)) > 1 ) { LABEL_11: v11 = *(_QWORD *)(a1 + 56); v12 = sub_1007FEF90(v11); sub_1007FEFE0(v11, (unsigned int)(v12 - 2)); } } LABEL_15: *(_BYTE *)(a1 + 64) = 0; if ( *(_BYTE *)(a1 + 66) == 1 ) { *(_BYTE *)(a1 + 66) = 0; v18 = *(unsigned int **)(a1 + 80); if ( *v18 ) { v19 = *(_QWORD *)(v2 + 56); if ( v19 ) { v30 = v2; v20 = 0; LABEL_19: v21 = *(unsigned int **)(v19 + 56); if ( !*v21 ) goto LABEL_26; v22 = *(_QWORD *)(*((_QWORD *)v18 + 2) + 8 * v20); v23 = *((__int64 **)v21 + 2); v24 = &v23[*v21 - 1]; do { v25 = *v23; if ( !*v23 ) break; if ( cocos2d::CCKeypadHandler::getDelegate(*v23) == v22 ) { sub_1007FF140(*(_QWORD *)(v30 + 56), v25, 1); break; } ++v23; } while ( v23 <= v24 ); LABEL_26: while ( 1 ) { ++v20; v2 = v30; v18 = *(unsigned int **)(v30 + 80); if ( v20 >= *v18 ) break; v19 = *(_QWORD *)(v30 + 56); if ( v19 ) goto LABEL_19; } } } sub_1007477D0(); } if ( *(_BYTE *)(v2 + 65) == 1 ) { *(_BYTE *)(v2 + 65) = 0; v26 = *(unsigned int **)(v2 + 72); if ( *v26 ) { v27 = 0; do { v28 = cocos2d::CCKeypadHandler::handlerWithDelegate(*(void **)(*((_QWORD *)v26 + 2) + 8 * v27)); if ( v28 ) sub_1007FEBF0(*(_QWORD *)(v2 + 56), v28); ++v27; v26 = *(unsigned int **)(v2 + 72); } while ( v27 < *v26 ); } sub_1007477D0(); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source