Function at 0x40d310
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41aa68
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x427664]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
push 0xffffffffffffffff
xor ebx, ebx
push ebx
mov ecx, edi
mov dword [ebp - 0x12c], edi
call fcn.0040bd80
lea eax, [ebp - 0x124]
push eax
mov dword [ebp - 0x124], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40d3bd
lea ecx, [ebp - 0x128]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x128]
push str.Could_not_get_OS_version.__err_lx_
push ecx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0xc
lea edx, [ebp - 0x128]
push edx
lea ecx, [ebp - 0x12c]
call dword [0x41c710]
push 0x423ca4
lea eax, [ebp - 0x12c]
push eax
call sub.MSVCR100.dll__CxxThrowException
cmp dword [ebp - 0x120], 5
push edi
jae 0x40d3de
cmp dword [ebp - 0x114], 2
jne 0x40d3d7
call fcn.0040ca60
jmp 0x40d3e3
call fcn.0040cf70
jmp 0x40d3e3
call fcn.0040c610
mov eax, dword [edi + 8]
add esp, 4
cmp eax, ebx
jle 0x40d4f8
mov dword [ebp - 0x128], ebx
test ebx, ebx
js 0x40d514
cmp ebx, eax
jge 0x40d514
mov esi, dword [edi + 4]
add esi, dword [ebp - 0x128]
cmp dword [ebp + 0xc], 0
je 0x40d451
mov eax, dword [esi]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40d44a
push 1
push ebx
mov ecx, edi
call fcn.0040c440
dec ebx
sub dword [ebp - 0x128], 0x14
jmp 0x40d4e5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 8]
cmp dword [ecx - 0xc], 0
lea edi, [esi + 8]
jne 0x40d469
lea edx, [esi + 4]
push edx
mov ecx, edi
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
mov eax, dword [esi + 0x10]
add esi, 0x10
cmp dword [eax - 0xc], 0
jne 0x40d4df
push edi
mov ecx, esi
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
push 0
push 0x41f264
mov ecx, esi
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Find]
push 0
push 0x41f260
mov ecx, esi
mov edi, eax
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Find]
test edi, edi
jle 0x40d4df
mov ecx, dword [esi]
mov ecx, dword [ecx - 0xc]
dec ecx
cmp eax, ecx
jne 0x40d4df
push edi
lea edx, [ebp - 0x130]
push edx
mov ecx, esi
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Left]
push eax
mov ecx, esi
mov dword [ebp - 4], 1
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ecx, [ebp - 0x130]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov edi, dword [ebp - 0x12c]
mov eax, dword [edi + 8]
add dword [ebp - 0x128], 0x14
inc ebx
cmp ebx, eax
jl 0x40d3f7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00418c9e
mov esp, ebp
pop ebp
ret
call sub.mfc100u.dll_AfxThrowInvalidArgException
int3