// // cocos2d::CCEGLView::pumpRawInput from 0x18007aca0 to 0x18007b49e (2046 bytes) // // 3 xrefs: // > cocos2d::CCApplication::run @ 0x18007628d // > @ 0x18014cf68 // > @ 0x1801bed70 // // 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 11:22:00 +0000 // // Hidden C++ exception states: #wind=1 void __fastcall cocos2d::CCEGLView::pumpRawInput(cocos2d::CCEGLView *this) { char v2; // si char v3; // al cocos2d::CCApplication *v4; // rax __int64 v5; // rcx HWND v6; // rbx HWND v7; // rax char v8; // si int v9; // eax int v10; // ecx float x; // xmm0_4 float y; // xmm1_4 __int64 v13; // rcx HWND v14; // rbx float v15; // xmm0_4 float v16; // xmm1_4 float v17; // xmm2_4 void ***v18; // rax _QWORD *v19; // rax void ***v20; // rcx void *v21; // rdx __int64 v22; // rdx __int64 v23; // rdx __int64 v24; // rdx int v25; // r11d __int64 v26; // rdx __int64 v27; // rcx int v28; // r11d __int64 v29; // rdx __int64 v30; // rcx char v31; // r14 int v32; // r10d __int64 v33; // r12 __int64 v34; // rdx __int64 v35; // rbx __int64 v36; // r8 char v37; // r15 __int64 v38; // rbx __int64 v39; // xmm6_8 unsigned int v40; // ecx unsigned int v41; // esi struct cocos2d::CCDirector *v42; // rax cocos2d::CCKeyboardDispatcher *v43; // r13 unsigned __int8 v44; // r14 cocos2d::CCIMEDispatcher *v45; // rax bool hasDelegate; // r15 cocos2d::CCIMEDispatcher *v47; // rax struct cocos2d::CCIMEDispatcher *v48; // rax __int64 v49; // r9 char *v50; // rdx cocos2d::CCIMEDispatcher *v51; // rax int v52; // eax cocos2d::CCRect *v53; // rax float *v54; // rbx cocos2d::CCRect *v55; // rax cocos2d::CCRect *ViewPortRect; // rax float *v57; // rbx cocos2d::CCRect *v58; // rax char v59; // al void *v60; // rcx char v61; // [rsp+30h] [rbp-49h] char v62; // [rsp+31h] [rbp-48h] BYREF void *Block[2]; // [rsp+38h] [rbp-41h] BYREF __int128 v64; // [rsp+48h] [rbp-31h] __int64 v65; // [rsp+58h] [rbp-21h] int v66; // [rsp+60h] [rbp-19h] BYREF __int64 v67; // [rsp+68h] [rbp-11h] float v68; // [rsp+70h] [rbp-9h] BYREF float v69; // [rsp+78h] [rbp-1h] BYREF struct tagPOINT Point; // [rsp+E0h] [rbp+67h] BYREF char v71; // [rsp+E8h] [rbp+6Fh] bool v72; // [rsp+F0h] [rbp+77h] int v73; // [rsp+F8h] [rbp+7Fh] BYREF v2 = byte_1801ACB90; v61 = byte_1801ACB90; v3 = byte_1801B2578; byte_1801B2578 = 0; if ( v3 ) { v4 = cocos2d::CCApplication::sharedApplication(); cocos2d::CCApplication::resyncVerticalSync(v4); } v5 = *((_QWORD *)this + 25); if ( v5 ) v6 = (HWND)sub_1800D9CB0(v5); else v6 = nullptr; if ( !v2 && (!v6 || !GetCursorPos(&Point) || (v7 = WindowFromPoint(Point)) == nullptr || GetAncestor(v7, 2u) != v6) ) { v8 = 0; LOBYTE(v73) = 0; _InterlockedExchange(&dword_1801B2570, 0); _InterlockedExchange(&dword_1801B2574, 0); goto LABEL_24; } v8 = 1; LOBYTE(v73) = 1; v9 = _InterlockedExchange(&dword_1801B2570, 0); v10 = _InterlockedExchange(&dword_1801B2574, 0); if ( *((_BYTE *)this + 236) ) { x = (float)v9 + *((float *)this + 56); y = (float)v10 + *((float *)this + 57); } else { v13 = *((_QWORD *)this + 25); if ( !v13 ) goto LABEL_19; v14 = (HWND)sub_1800D9CB0(v13); if ( !GetCursorPos(&Point) || !ScreenToClient(v14, &Point) ) goto LABEL_19; x = (float)Point.x; y = (float)Point.y; } *((float *)this + 57) = y; *((float *)this + 56) = x; LABEL_19: v15 = *((float *)this + 48); v16 = *((float *)this + 56) / v15; *((float *)this + 56) = v16; v17 = *((float *)this + 57) / v15; *((float *)this + 57) = v17; if ( *((_BYTE *)this + 178) && *((_DWORD *)this + 45) == 1 ) { *((float *)this + 56) = v16 + v16; *((float *)this + 57) = v17 + v17; } if ( *((_BYTE *)this + 176) ) { Point.x = 0; (*(void (__fastcall **)(cocos2d::CCEGLView *, __int64, struct tagPOINT *))(*(_QWORD *)this + 144LL))( this, 1, &Point); LOBYTE(v73) = 1; } LABEL_24: *(_OWORD *)Block = 0; v64 = 0; v65 = 0; v18 = (void ***)sub_1800E4AC0(0x10u); v18[1] = nullptr; Block[0] = v18; *v18 = Block; if ( Mtx_lock((_Mtx_t)&unk_1801B2588) ) { std::_Throw_Cpp_error(5); JUMPOUT(0x18007B49DLL); } if ( dword_1801B25D4 == 0x7FFFFFFF ) { dword_1801B25D4 = 2147483646; std::_Throw_Cpp_error(6); __debugbreak(); } v19 = Block[0]; v20 = (void ***)qword_1801B25D8; Block[0] = qword_1801B25D8; qword_1801B25D8 = v19; if ( Block[0] ) { *v20 = Block; v19 = qword_1801B25D8; } if ( v19 ) *v19 = &qword_1801B25D8; v21 = Block[1]; Block[1] = (void *)qword_1801B25E0; qword_1801B25E0 = (__int64)v21; v22 = v64; *(_QWORD *)&v64 = qword_1801B25E8; qword_1801B25E8 = v22; v23 = *((_QWORD *)&v64 + 1); *((_QWORD *)&v64 + 1) = qword_1801B25F0; qword_1801B25F0 = v23; v24 = v65; v65 = qword_1801B25F8; qword_1801B25F8 = v24; Mtx_unlock((_Mtx_t)&unk_1801B2588); v25 = GetKeyState(16) & 0x8000; v26 = *((_QWORD *)&v64 + 1); if ( *((_QWORD *)&v64 + 1) == *((_QWORD *)&v64 + 1) + v65 ) { LABEL_34: v71 = v25 != 0; } else { while ( 1 ) { v27 = *((_QWORD *)Block[1] + (v26 & (v64 - 1))); if ( !*(_BYTE *)v27 && *(_DWORD *)(v27 + 16) == 16 ) break; if ( ++v26 == *((_QWORD *)&v64 + 1) + v65 ) goto LABEL_34; } v71 = *(_BYTE *)(v27 + 21) || !*(_BYTE *)(v27 + 20); } v28 = GetKeyState(17) & 0x8000; v29 = *((_QWORD *)&v64 + 1); if ( *((_QWORD *)&v64 + 1) == *((_QWORD *)&v64 + 1) + v65 ) { LABEL_39: v31 = v28 != 0; } else { while ( 1 ) { v30 = *((_QWORD *)Block[1] + (v29 & (v64 - 1))); if ( !*(_BYTE *)v30 && *(_DWORD *)(v30 + 16) == 17 ) break; if ( ++v29 == *((_QWORD *)&v64 + 1) + v65 ) goto LABEL_39; } v31 = *(_BYTE *)(v30 + 21) || !*(_BYTE *)(v30 + 20); } LOBYTE(Point.x) = v31; v32 = GetKeyState(18) & 0x8000; v33 = *((_QWORD *)&v64 + 1); v34 = *((_QWORD *)&v64 + 1); v35 = *((_QWORD *)&v64 + 1) + v65; v67 = *((_QWORD *)&v64 + 1) + v65; if ( *((_QWORD *)&v64 + 1) != *((_QWORD *)&v64 + 1) + v65 ) { while ( 1 ) { v36 = *((_QWORD *)Block[1] + (v34 & (v64 - 1))); if ( !*(_BYTE *)v36 && *(_DWORD *)(v36 + 16) == 18 ) break; if ( ++v34 == v35 ) goto LABEL_44; } if ( *(_BYTE *)(v36 + 21) || !*(_BYTE *)(v36 + 20) ) { v37 = 1; v72 = 1; v67 = *((_QWORD *)&v64 + 1) + v65; } else { v37 = 0; v72 = 0; v67 = *((_QWORD *)&v64 + 1) + v65; } while ( 1 ) { LABEL_45: v38 = *((_QWORD *)Block[1] + (v33 & (v64 - 1))); v39 = *(_QWORD *)(v38 + 8); if ( *(_BYTE *)v38 ) { if ( *(_BYTE *)v38 == 1 && v8 ) { v52 = *(_DWORD *)(v38 + 24); if ( v52 ) { if ( v52 == 1 ) { if ( *(_BYTE *)(v38 + 20) ) { ViewPortRect = cocos2d::CCEGLViewProtocol::getViewPortRect(this); if ( cocos2d::CCRect::equals(ViewPortRect, (const struct cocos2d::CCRect *)&unk_1801B2650) || (v57 = kmVec2Fill(&v69, *((float *)this + 56), *((float *)this + 57)), v58 = cocos2d::CCEGLViewProtocol::getViewPortRect(this), cocos2d::CCRect::containsPoint(v58, (const struct cocos2d::CCPoint *)v57)) ) { cocos2d::CCEGLViewProtocol::handleRightClick(this, *((float *)this + 56), *((float *)this + 57)); } } } } else if ( *(_BYTE *)(v38 + 20) ) { v53 = cocos2d::CCEGLViewProtocol::getViewPortRect(this); if ( cocos2d::CCRect::equals(v53, (const struct cocos2d::CCRect *)&unk_1801B2650) || (v54 = kmVec2Fill(&v68, *((float *)this + 56), *((float *)this + 57)), v55 = cocos2d::CCEGLViewProtocol::getViewPortRect(this), cocos2d::CCRect::containsPoint(v55, (const struct cocos2d::CCPoint *)v54)) || *((_BYTE *)this + 236) ) { *((_BYTE *)this + 176) = 1; v73 = 0; (*(void (__fastcall **)(cocos2d::CCEGLView *, __int64, int *, char *, char *, __int64))(*(_QWORD *)this + 136LL))( this, 1, &v73, (char *)this + 224, (char *)this + 228, v39); LOBYTE(v73) = v8; } } else if ( *((_BYTE *)this + 176) ) { *((_BYTE *)this + 176) = 0; v66 = 0; (*(void (__fastcall **)(cocos2d::CCEGLView *, __int64, int *, char *, char *, __int64))(*(_QWORD *)this + 152LL))( this, 1, &v66, (char *)this + 224, (char *)this + 228, v39); } } goto LABEL_105; } v40 = *(_DWORD *)(v38 + 16); switch ( v40 ) { case 0x10u: v71 = *(_BYTE *)(v38 + 20); break; case 0x11u: v31 = *(_BYTE *)(v38 + 20); LOBYTE(Point.x) = v31; break; case 0x12u: v37 = *(_BYTE *)(v38 + 20); v72 = v37; break; } if ( v61 ) break; LABEL_105: ++v33; v31 = Point.x; v37 = v72; v8 = v73; if ( v33 == v67 ) goto LABEL_106; } v41 = cocos2d::CCKeyboardDispatcher::convertKeyCode(v40); v42 = cocos2d::CCDirector::sharedDirector(); v43 = (cocos2d::CCKeyboardDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v42 + 176LL))(v42); cocos2d::CCKeyboardDispatcher::updateModifierKeys(v43, v71, v31, v37, 0); v44 = *(_BYTE *)(v38 + 20) || *(_BYTE *)(v38 + 21); v45 = cocos2d::CCIMEDispatcher::sharedDispatcher(); hasDelegate = cocos2d::CCIMEDispatcher::hasDelegate(v45); if ( hasDelegate && v44 ) { if ( v41 - 37 <= 3 ) { v62 = 97; v48 = cocos2d::CCIMEDispatcher::sharedDispatcher(); v49 = v41; v50 = &v62; goto LABEL_77; } if ( v41 == 46 ) { v47 = cocos2d::CCIMEDispatcher::sharedDispatcher(); cocos2d::CCIMEDispatcher::dispatchDeleteForward(v47); goto LABEL_78; } if ( v41 == 13 ) { v48 = cocos2d::CCIMEDispatcher::sharedDispatcher(); v49 = 13; v50 = "\n"; LABEL_77: cocos2d::CCIMEDispatcher::dispatchInsertText(v48, v50, 1, v49); } } LABEL_78: if ( *(_DWORD *)(v38 + 16) == 8 && v44 ) { v51 = cocos2d::CCIMEDispatcher::sharedDispatcher(); cocos2d::CCIMEDispatcher::dispatchDeleteBackward(v51); } if ( !hasDelegate || v41 == 27 || v41 == 13 ) cocos2d::CCKeyboardDispatcher::dispatchKeyboardMSG((__int64)v43, v41, v44, *(_BYTE *)(v38 + 21), v39); if ( *(_BYTE *)(v38 + 20) && !*(_BYTE *)(v38 + 21) && v41 == 86 && LOBYTE(Point.x) ) byte_1801B2548 = 1; goto LABEL_105; } LABEL_44: v37 = v32 != 0; v72 = v32 != 0; if ( *((_QWORD *)&v64 + 1) != v35 ) goto LABEL_45; LABEL_106: if ( v61 ) { v59 = byte_1801B2548; byte_1801B2548 = 0; if ( v59 ) cocos2d::CCEGLView::performSafeClipboardPaste(this); } sub_180078BA0(Block); v60 = Block[0]; Block[0] = nullptr; j_j_free_0(v60); }
GD Web Decomp Icon

GD Web Decomp

Raw Source