// // sub_1800DCD80 from 0x1800dcd80 to 0x1800dd12d (941 bytes) // // 4 xrefs: // > sub_1800D6480 @ 0x1800d64c3 // > @ 0x18014338c // > @ 0x1801433c4 // > @ 0x1801badd0 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 sub_1800DCD80() { HMODULE LibraryA; // rax HDC DC; // rsi int v3; // eax __int64 v4; // rbx HDC CurrentDC; // rbp HGLRC CurrentContext; // r14 PIXELFORMATDESCRIPTOR ppfd; // [rsp+20h] [rbp-38h] BYREF if ( qword_1801AC0C8 ) return 1; LibraryA = LoadLibraryA("opengl32.dll"); qword_1801AC0C8 = LibraryA; if ( LibraryA ) { wglCreateContext = (HGLRC (__stdcall *)(HDC))GetProcAddress(LibraryA, "wglCreateContext"); wglDeleteContext = (BOOL (__stdcall *)(HGLRC))GetProcAddress(qword_1801AC0C8, "wglDeleteContext"); wglGetProcAddress_0 = (PROC (__stdcall *)(LPCSTR))GetProcAddress(qword_1801AC0C8, "wglGetProcAddress"); wglGetCurrentDC = (HDC (__stdcall *)())GetProcAddress(qword_1801AC0C8, "wglGetCurrentDC"); wglGetCurrentContext = (HGLRC (__stdcall *)())GetProcAddress(qword_1801AC0C8, "wglGetCurrentContext"); wglMakeCurrent = (BOOL (__stdcall *)(HDC, HGLRC))GetProcAddress(qword_1801AC0C8, "wglMakeCurrent"); wglShareLists = (BOOL (__stdcall *)(HGLRC, HGLRC))GetProcAddress(qword_1801AC0C8, "wglShareLists"); *(_QWORD *)&ppfd.iPixelType = 6144; DC = GetDC((HWND)hRecipient); *(_DWORD *)&ppfd.nSize = 65576; ppfd.dwFlags = 37; memset(&ppfd.cAlphaBits, 0, 24); v3 = ChoosePixelFormat(DC, &ppfd); if ( SetPixelFormat(DC, v3, &ppfd) ) { v4 = ((__int64 (__fastcall *)(HDC))wglCreateContext)(DC); if ( v4 ) { CurrentDC = wglGetCurrentDC(); CurrentContext = wglGetCurrentContext(); if ( (unsigned int)((__int64 (__fastcall *)(HDC, __int64))wglMakeCurrent)(DC, v4) ) { qword_1801AC118 = ((__int64 (__fastcall *)(const CHAR *))wglGetProcAddress_0)("wglGetExtensionsStringEXT"); qword_1801AC120 = ((__int64 (__fastcall *)(const char *))wglGetProcAddress_0)("wglGetExtensionsStringARB"); qword_1801AC128 = (__int64 (__fastcall *)(_QWORD, _QWORD, _QWORD))((__int64 (__fastcall *)(const char *))wglGetProcAddress_0)("wglCreateContextAttribsARB"); qword_1801AC108 = ((__int64 (__fastcall *)(const CHAR *))wglGetProcAddress_0)("wglSwapIntervalEXT"); qword_1801AC110 = ((__int64 (__fastcall *)(const char *))wglGetProcAddress_0)("wglGetPixelFormatAttribivARB"); dword_1801AC138 = sub_1800DDA10("WGL_ARB_multisample"); dword_1801AC13C = sub_1800DDA10("WGL_ARB_framebuffer_sRGB"); dword_1801AC140 = sub_1800DDA10("WGL_EXT_framebuffer_sRGB"); dword_1801AC148 = sub_1800DDA10("WGL_ARB_create_context"); dword_1801AC14C = sub_1800DDA10("WGL_ARB_create_context_profile"); dword_1801AC150 = sub_1800DDA10("WGL_EXT_create_context_es2_profile"); dword_1801AC154 = sub_1800DDA10("WGL_ARB_create_context_robustness"); dword_1801AC158 = sub_1800DDA10("WGL_ARB_create_context_no_error"); dword_1801AC130 = sub_1800DDA10("WGL_EXT_swap_control"); dword_1801AC134 = sub_1800DDA10("WGL_EXT_colorspace"); dword_1801AC144 = sub_1800DDA10("WGL_ARB_pixel_format"); dword_1801AC15C = sub_1800DDA10("WGL_ARB_context_flush_control"); ((void (__fastcall *)(HDC, HGLRC))wglMakeCurrent)(CurrentDC, CurrentContext); ((void (__fastcall *)(__int64))wglDeleteContext)(v4); return 1; } else { sub_1800D9BA0(0x10008u, "WGL: Failed to make dummy context current"); ((void (__fastcall *)(HDC, HGLRC))wglMakeCurrent)(CurrentDC, CurrentContext); ((void (__fastcall *)(__int64))wglDeleteContext)(v4); return 0; } } else { sub_1800D9BA0(0x10008u, "WGL: Failed to create dummy context"); return 0; } } else { sub_1800D9BA0(0x10008u, "WGL: Failed to set pixel format for dummy context"); return 0; } } else { sub_1800D9BA0(0x10008u, "WGL: Failed to load opengl32.dll"); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source