Function at 0x4086ec
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
xor esi, esi
push edi
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x425540
mov ebx, eax
mov dword [0x425540], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [0x425550], 2
push 3
pop eax
jne 0x408748
cmp dword [0x425544], eax
jne 0x408748
mov ecx, dword [0x425548]
cmp ecx, 5
je 0x40873c
cmp ecx, 0x33
jne 0x408748
mov dword [0x42235c], 0x15
jmp 0x408752
mov dword [0x42235c], 0x19
mov edi, 0x7f00
mov dword [ebp - 0x3c], eax
push edi
push esi
mov dword [ebp - 0x38], 0x408d21
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.USER32.dll_LoadIconA]
push edi
push esi
mov dword [ebp - 0x28], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 4
mov dword [ebp - 0x24], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
cmp dword [ebp + 0xc], esi
mov dword [ebp - 0x20], eax
mov eax, dword [0x422498]
mov dword [ebp - 0x1c], esi
jne 0x40879d
mov eax, dword [str.tkLibWClass]
cmp dword [ebp + 0xc], esi
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x3c]
push eax
je 0x4087b1
call dword [sym.imp.USER32.dll_RegisterClassW]
jmp 0x4087b7
call dword [sym.imp.USER32.dll_RegisterClassA]
cmp ax, si
jne 0x4087ce
push str.Failed_to_register_window_class_n
call fcn.004099f6
pop ecx
xor eax, eax
jmp 0x40897a
mov eax, dword [0x422338]
mov ecx, dword [0x422340]
mov dword [ebp - 0x14], eax
add eax, ecx
mov ecx, dword [0x422344]
mov dword [ebp - 0xc], eax
mov eax, dword [0x42233c]
push esi
mov dword [ebp - 0x10], eax
add eax, ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push 0xcf0000
push eax
call dword [sym.imp.USER32.dll_AdjustWindowRect]
cmp dword [ebp + 0xc], esi
mov eax, dword [0x422354]
mov ecx, 0x80000000
je 0x40884e
cmp eax, esi
mov edx, ecx
jne 0x40881c
mov edx, dword [ebp - 0x10]
cmp eax, esi
jne 0x408823
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
push esi
sub eax, dword [ebp - 0x10]
push ebx
push esi
push esi
push eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
push eax
push edx
push ecx
push 0x6cf0000
push dword [ebp + 8]
push dword [0x422498]
push esi
call dword [sym.imp.USER32.dll_CreateWindowExW]
jmp 0x408887
cmp eax, esi
mov edx, ecx
jne 0x408857
mov edx, dword [ebp - 0x10]
cmp eax, esi
jne 0x40885e
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
push esi
sub eax, dword [ebp - 0x10]
push ebx
push esi
push esi
push eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
push eax
push edx
push ecx
push 0x6cf0000
push dword [ebp + 8]
push dword [0x422494]
push esi
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, esi
mov dword [0x424cf4], eax
je 0x40895c
cmp dword [0x422354], esi
je 0x4088d9
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x20
call edi
add eax, dword [ebp - 0x14]
push 6
mov dword [0x422338], eax
call edi
mov ebx, dword [ebp - 0x10]
push 4
sub ebx, eax
call edi
push 0x21
add ebx, eax
call edi
add ebx, eax
mov eax, dword [0x424cf4]
mov dword [0x42233c], ebx
push eax
call dword [sym.imp.USER32.dll_GetDC]
cmp eax, esi
mov dword [0x424cf8], eax
je 0x408949
push 0xa
push dword [0x424cf4]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x422348]
push dword [0x424cf8]
call fcn.00409761
test eax, eax
je 0x408967
push dword [0x424cf8]
call dword [sym.imp.OPENGL32.dll_wglCreateContext]
cmp eax, esi
mov dword [0x424cfc], eax
je 0x408942
push eax
push dword [0x424cf8]
call dword [sym.imp.OPENGL32.dll_wglMakeCurrent]
test eax, eax
je 0x40893b
mov dword [ebp - 4], 1
jmp 0x408967
push str.wglMakeCurrent_Failed_n
jmp 0x408961
push str.wglCreateContext_Failed_n
jmp 0x408961
push dword [0x424cf4]
push str.Could_not_get_an_HDC_for_window_0x_08lX_n
call fcn.004099f6
pop ecx
jmp 0x408966
push str.create_window_failed_n
call fcn.004099f6
pop ecx
cmp dword [ebp - 4], esi
jne 0x408977
push dword [0x424cf4]
call fcn.00409b51
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8