38 lines
1.3 KiB
C
38 lines
1.3 KiB
C
/* Agent_Release_x64.exe sha256 6f2be7b8eb799ba51b359d1958720aac5baee5b7ee0d1d36684d3cbd72d45469
|
|
* Ghidra 12.1.2 decompiler output for 0x14003a538 ATL::CAtlBaseModule::GetHInstanceAt
|
|
* Pseudocode, not original source. */
|
|
|
|
/* Library Function - Single Match
|
|
public: struct HINSTANCE__ * __ptr64 __cdecl ATL::CAtlBaseModule::GetHInstanceAt(int) __ptr64
|
|
|
|
Libraries: Visual Studio 2008 Release, Visual Studio 2010 Release */
|
|
|
|
HINSTANCE__ * __thiscall ATL::CAtlBaseModule::GetHInstanceAt(CAtlBaseModule *this,int param_1)
|
|
|
|
{
|
|
code *pcVar1;
|
|
HINSTANCE__ *pHVar2;
|
|
|
|
EnterCriticalSection((LPCRITICAL_SECTION)(this + 0x28));
|
|
if ((*(int *)(this + 0x58) < param_1) || (param_1 < 0)) {
|
|
LeaveCriticalSection((LPCRITICAL_SECTION)(this + 0x28));
|
|
pHVar2 = (HINSTANCE__ *)0x0;
|
|
}
|
|
else {
|
|
if (param_1 == *(int *)(this + 0x58)) {
|
|
pHVar2 = *(HINSTANCE__ **)(this + 0x10);
|
|
}
|
|
else {
|
|
if (*(int *)(this + 0x58) <= param_1) {
|
|
RaiseException(0xc000008c,1,0,(ULONG_PTR *)0x0);
|
|
pcVar1 = (code *)swi(3);
|
|
pHVar2 = (HINSTANCE__ *)(*pcVar1)();
|
|
return pHVar2;
|
|
}
|
|
pHVar2 = *(HINSTANCE__ **)(*(longlong *)(this + 0x50) + (longlong)param_1 * 8);
|
|
}
|
|
LeaveCriticalSection((LPCRITICAL_SECTION)(this + 0x28));
|
|
}
|
|
return pHVar2;
|
|
}
|
|
|