Function at 0x401578
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x40300c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor ebx, ebx
test eax, eax
js 0x4015c6
cmp al, 6
jb 0x4015c6
push 0x4010f0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4015c6
push 0x40110c
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4015c6
push ebx
push ebx
push 1
push ebx
call eax
call fcn.00401b1b
cmp dword [0x403388], 2
jne 0x40161d
cmp dword [0x40337c], 6
jne 0x40161d
cmp dword [0x403380], 1
jne 0x40161d
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], ebx
call dword [sym.imp.msvcrt.dll_rand_s]
pop ecx
test eax, eax
jne 0x40161d
movzx eax, byte [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
mov esi, ebx
je 0x40161d
push 1
push 0x2000
push 0x10000
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
inc esi
cmp esi, dword [ebp - 0x28]
jb 0x401604
test edi, edi
je 0x401696
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.00401a13
mov esi, eax
test esi, esi
js 0x401786
cmp dword [ebp - 0x28], 1
mov edi, dword [ebp - 0x2c]
je 0x40167d
cmp dword [ebp - 0x28], 2
je 0x401678
cmp dword [ebp - 0x28], 4
jne 0x401671
mov ecx, dword [edi + 8]
lea eax, [ebp - 0x24]
push eax
push dword [edi + 0xc]
lea eax, [ebp - 0x14]
push eax
push dword [edi + 4]
lea eax, [ebp - 0x28]
push eax
mov eax, dword [edi]
lea ebx, [ebp - 0x2c]
call fcn.00401483
xor ebx, ebx
jmp 0x40168b
mov esi, 0x80070667
jmp 0x40168d
mov eax, dword [edi + 4]
jmp 0x40167f
mov eax, ebx
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [edi]
call fcn.004011e5
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40169b
mov esi, 0x80070667
test esi, esi
js 0x401786
push 2
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov esi, eax
test esi, esi
js 0x401786
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x28]
push eax
cmp edi, 6
je 0x401748
push 0x401130
push 1
push ebx
push 0x401150
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
test esi, esi
js 0x401780
cmp edi, 9
ja case.0x4016e8.6
jmp dword [edi*4 + 0x4017a0]
push ebx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
jmp 0x401775
push 1
jmp 0x4016f0
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
jmp 0x401775
push 1
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
jmp 0x401775
push ebx
jmp 0x40170c
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x18]
jmp 0x401775
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
jmp 0x401775
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
jmp 0x401775
mov esi, ebx
jmp 0x401777
mov esi, 0x80004001
jmp 0x401777
push 0x401120
push 1
push ebx
push 0x401140
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
test esi, esi
js 0x401780
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
lea edx, [ebp - 0x24]
push edx
push eax
call dword [ecx + 0xc]
mov esi, eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
pop edi
sets al
pop esi
xor ecx, ebp
pop ebx
call fcn.00401e67
leave
ret 0x10