Function at 0x40bf28
Capabilities:
Terminate thread

Disassembly:
push ebx
add esp, 0xfffffff4
mov eax, dword [0x41ce00]
mov edx, dword [eax]
test edx, edx
je 0x40bfa6
mov ecx, dword [0x41cdfc]
push 0
push 0
push 0x6001
mov eax, dword [ecx]
push eax
call sub.USER32.DLL_PostThreadMessageA
mov dword [esp], 0x103
push 0x14
call sub.KERNEL32.DLL_Sleep
push esp
mov edx, dword [0x41ce00]
mov ecx, dword [edx]
push ecx
call sub.KERNEL32.DLL_GetExitCodeThread
mov eax, dword [esp]
cmp eax, 0x103
jne 0x40bf85
push 0
mov edx, dword [0x41ce00]
mov ecx, dword [edx]
push ecx
call sub.KERNEL32.DLL_TerminateThread
mov eax, dword [0x41ce00]
mov edx, dword [eax]
push edx
call sub.KERNEL32.DLL_CloseHandle
mov ecx, dword [0x41ce00]
xor eax, eax
mov dword [ecx], eax
mov edx, dword [0x41cdfc]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [0x41ca0c]
mov eax, dword [eax]
test eax, eax
je 0x40bfc5
test eax, eax
je 0x40bfbb
push eax
call sub.OPENGL32.DLL_wglDeleteContext
mov edx, dword [0x41ca0c]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [0x41ca6c]
mov eax, dword [eax]
test eax, eax
je 0x40bfd7
push eax
call fcn.00411430
pop ecx
mov edx, dword [0x41ca6c]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [0x41c9ac]
mov dl, byte [eax]
test dl, dl
jne 0x40c001
mov ecx, dword [0x41c890]
mov eax, dword [ecx]
test eax, eax
jne 0x40c001
push 4
push 0
call sub.USER32.DLL_ChangeDisplaySettingsA
mov edx, dword [0x41ca94]
xor ecx, ecx
mov dword [edx], ecx
xor eax, eax
mov ecx, dword [0x41c9a4]
mov edx, eax
shl edx, 8
mov ecx, dword [ecx]
mov word [ecx + eax*2], dx
mov word [ecx + eax*2 + 0x200], dx
mov word [ecx + eax*2 + 0x400], dx
inc eax
cmp eax, 0x100
jl 0x40c00d
mov eax, dword [0x41c9a8]
mov edx, dword [eax]
test edx, edx
jne 0x40c056
mov eax, dword [0x41c824]
mov edx, dword [eax]
push edx
call sub.USER32.DLL_GetDC
mov ecx, dword [0x41c9a8]
mov dword [ecx], eax
mov eax, dword [0x41c9a4]
mov ecx, dword [0x41c9a8]
mov edx, dword [eax]
push edx
mov eax, dword [ecx]
push eax
call sub.GDI32.DLL_SetDeviceGammaRamp
mov edx, dword [0x41c9a8]
mov eax, dword [edx]
test eax, eax
je 0x40c087
push eax
mov edx, dword [0x41c824]
mov ecx, dword [edx]
push ecx
call sub.USER32.DLL_ReleaseDC
mov eax, dword [0x41c9a8]
xor edx, edx
mov dword [eax], edx
mov ecx, dword [0x41c824]
mov eax, dword [ecx]
test eax, eax
je 0x40c0a2
push eax
call sub.USER32.DLL_DestroyWindow
mov edx, dword [0x41c824]
xor ecx, ecx
mov dword [edx], ecx
xor ebx, ebx
mov eax, dword [0x41ca88]
mov eax, dword [eax + ebx*4]
test eax, eax
je 0x40c0c7
mov edx, dword [0x41ca88]
push eax
call fcn.00411430
pop ecx
mov ecx, dword [0x41ca88]
xor eax, eax
mov dword [ecx + ebx*4], eax
inc ebx
cmp ebx, 9
jl 0x40c0ae
mov edx, dword [0x41c7fc]
mov eax, dword [edx]
test eax, eax
je 0x40c0eb
push eax
call fcn.00411430
pop ecx
mov edx, dword [0x41c7fc]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [0x41ca28]
mov eax, dword [eax]
test eax, eax
je 0x40c110
push eax
call sub.GDI32.DLL_DeleteObject
mov edx, dword [0x41ca28]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [0x41cbc4]
mov eax, dword [eax]
test eax, eax
je 0x40c122
push eax
call fcn.00411430
pop ecx
mov edx, dword [0x41cbc4]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [0x41c9a4]
mov eax, dword [eax]
test eax, eax
je 0x40c13e
push eax
call fcn.00411430
pop ecx
mov edx, dword [0x41cdec]
mov eax, dword [edx]
test eax, eax
je 0x40c151
push eax
call fcn.00411430
pop ecx
mov edx, dword [0x41cdec]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [0x41c9a4]
xor edx, edx
mov dword [eax], edx
push 0
call sub.USER32.DLL_ClipCursor
mov ecx, dword [0x41cde0]
mov al, byte [ecx]
test al, al
je 0x40c1b2
push str.dwmapi.dll
call sub.KERNEL32.DLL_LoadLibraryA
mov ebx, eax
test ebx, ebx
je 0x40c1b2
push str.DwmEnableComposition
push ebx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
test eax, eax
je 0x40c1ac
mov eax, dword [esp + 4]
mov dword [esp + 8], eax
push 1
call dword [esp + 0xc]
push ebx
call sub.KERNEL32.DLL_FreeLibrary
add esp, 0xc
pop ebx
ret