Function at 0x521d20
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe24
push ebx
xor edx, edx
mov dword [ebp - 0x1dc], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x522279
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [0x62908d], 0
je 0x521d59
cmp dword [0x63568c], 0
jne 0x52224d
mov byte [0x62908d], 1
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x521dda
lea eax, [ebp - 0x1b4]
mov edx, 0x11c
call fcn.0040e27c
mov dword [ebp - 0x1b4], 0x11c
push 0x522288
push 0x5222a4
call sub.kernel32.dll_GetModuleHandleW_2
push eax
call fcn.0040d544
mov ebx, eax
test ebx, ebx
je 0x521db2
lea eax, [ebp - 0x1b4]
push eax
call ebx
test eax, eax
je 0x521e34
lea eax, [ebp - 0x1b4]
push eax
call sub.kernel32.dll_GetVersionExW
test eax, eax
jne 0x521e34
mov dword [ebp - 0x1b4], 0x114
lea eax, [ebp - 0x1b4]
push eax
call sub.kernel32.dll_GetVersionExW
jmp 0x521e34
lea eax, [ebp - 0x98]
mov edx, 0x94
call fcn.0040e27c
mov dword [ebp - 0x98], 0x94
lea eax, [ebp - 0x98]
push eax
call sub.kernel32.dll_GetVersionExA
lea edx, [ebp - 0x1b4]
lea eax, [ebp - 0x98]
mov ecx, 0x94
call fcn.00404984
mov ecx, 0x80
lea eax, [ebp - 0x84]
lea edx, [ebp - 0x1a0]
movzx ebx, byte [eax]
mov word [edx], bx
add edx, 2
inc eax
dec ecx
jne 0x521e27
mov eax, dword [ebp - 0x1b0]
mov dword [0x635670], eax
mov eax, dword [ebp - 0x1ac]
mov dword [0x635674], eax
mov eax, 0x63567c
lea edx, [ebp - 0x1a0]
mov ecx, 0x80
call fcn.00407e40
mov eax, dword [ebp - 0x1a4]
cmp eax, 1
sete dl
mov byte [0x635680], dl
cmp eax, 2
sete al
mov byte [0x635682], al
cmp byte [0x635680], 0
je 0x521e93
movzx eax, word [ebp - 0x1a8]
mov dword [0x635678], eax
jmp 0x521e9e
mov eax, dword [ebp - 0x1a8]
mov dword [0x635678], eax
mov byte [0x635684], 0
xor eax, eax
mov dword [0x635688], eax
cmp byte [0x635680], 0
je 0x521f58
mov eax, dword [0x635670]
sub eax, 4
jb 0x521f40
je 0x521ec7
jmp 0x521f39
mov eax, dword [0x635674]
sub eax, 0xa
jb 0x521edb
je 0x521ef9
dec eax
sub eax, 0x50
jb 0x521f27
jmp 0x521f30
cmp dword [0x635678], 0x3e8
jbe 0x521ef0
mov byte [0x635684], 2
jmp 0x521f40
mov byte [0x635684], 1
jmp 0x521f40
mov eax, dword [0x635678]
cmp eax, 0xa8c
jbe 0x521f0e
mov byte [0x635684], 5
jmp 0x521f40
cmp eax, 0x7d0
jbe 0x521f1e
mov byte [0x635684], 4
jmp 0x521f40
mov byte [0x635684], 3
jmp 0x521f40
mov byte [0x635684], 5
jmp 0x521f40
mov byte [0x635684], 6
jmp 0x521f40
mov byte [0x635684], 6
movzx eax, byte [0x635684]
mov byte [0x635681], al
mov byte [0x635683], 0
jmp 0x522160
cmp byte [0x635682], 0
je 0x522160
mov eax, dword [0x635670]
cmp eax, 0xa
ja case.0x521f73.7
jmp dword [eax*4 + 0x521f7a]
mov byte [0x635684], 7
jmp 0x5220b3
mov byte [0x635684], 8
jmp 0x5220b3
mov eax, dword [0x635674]
sub eax, 1
jb 0x521fcc
je 0x521fd8
jmp 0x521fe4
mov byte [0x635684], 9
jmp 0x5220b3
mov byte [0x635684], 0xa
jmp 0x5220b3
cmp byte [ebp - 0x9a], 1
jne 0x521ff9
mov byte [0x635684], 0xa
jmp 0x5220b3
mov byte [0x635684], 0xb
jmp 0x5220b3
mov eax, dword [0x635674]
sub eax, 1
jb 0x522019
je 0x522037
dec eax
je 0x522052
dec eax
je 0x52206d
jmp 0x522088
cmp byte [ebp - 0x9a], 1
jne 0x52202e
mov byte [0x635684], 0xc
jmp 0x5220b3
mov byte [0x635684], 0xd
jmp 0x5220b3
cmp byte [ebp - 0x9a], 1
jne 0x522049
mov byte [0x635684], 0xe
jmp 0x5220b3
mov byte [0x635684], 0xf
jmp 0x5220b3
cmp byte [ebp - 0x9a], 1
jne 0x522064
mov byte [0x635684], 0x10
jmp 0x5220b3
mov byte [0x635684], 0x11
jmp 0x5220b3
cmp byte [ebp - 0x9a], 1
jne 0x52207f
mov byte [0x635684], 0x12
jmp 0x5220b3
mov byte [0x635684], 0x13
jmp 0x5220b3
mov byte [0x635684], 0x16
jmp 0x5220b3
cmp byte [ebp - 0x9a], 1
jne 0x5220a3
mov byte [0x635684], 0x14
jmp 0x5220b3
mov byte [0x635684], 0x15
jmp 0x5220b3
mov byte [0x635684], 0x16
mov byte [0x635681], 0
movzx eax, byte [0x635684]
mov byte [0x635683], al
cmp dword [ebp - 0x1b4], 0x11c
jb 0x5220e0
movzx eax, word [ebp - 0xa0]
mov dword [0x635688], eax
jmp 0x52211c
mov eax, dword [0x63567c]
call fcn.004073a4
cmp eax, 0xe
jl 0x52211c
mov eax, dword [0x63567c]
call fcn.004073a4
sub eax, 0xd
push eax
mov eax, 0x63567c
call fcn.0040746c
lea edx, [eax + 0x1a]
mov ebx, dword [0x62f09c]
mov ebx, dword [ebx]
xor eax, eax
pop ecx
call ebx
mov dword [0x635688], eax
push 0x5222b8
push 0x5222e0
call sub.kernel32.dll_GetModuleHandleW_2
push eax
call fcn.0040d544
mov ebx, eax
test ebx, ebx
je 0x522160
lea eax, [ebp - 0x1d8]
mov edx, 0x24
call fcn.0040e27c
lea eax, [ebp - 0x1d8]
push eax
call ebx
cmp word [ebp - 0x1d8], 9
sete al
mov byte [0x635685], al
lea eax, [ebp - 0x1dc]
movzx edx, byte [0x635684]
mov edx, dword [edx*4 + 0x629024]
mov ecx, 0
call fcn.004075e8
mov edx, dword [ebp - 0x1dc]
mov eax, 0x63568c
call fcn.00407e5c
cmp byte [0x635682], 0
je 0x52224d
push 0x59
call sub.user32.dll_GetSystemMetrics
test eax, eax
je 0x5221b5
mov eax, 0x63568c
mov edx, 0x522308
call fcn.00407f98
push 0x56
call sub.user32.dll_GetSystemMetrics
test eax, eax
je 0x5221cf
mov eax, 0x63568c
mov edx, 0x52231c
call fcn.00407f98
push 0x58
call sub.user32.dll_GetSystemMetrics
test eax, eax
je 0x5221e9
mov eax, 0x63568c
mov edx, 0x522340
call fcn.00407f98
cmp byte [0x635684], 0xc
jae 0x52220c
push 0x57
call sub.user32.dll_GetSystemMetrics
test eax, eax
je 0x52220c
mov eax, 0x63568c
mov edx, 0x522360
call fcn.00407f98
cmp byte [0x635685], 0
je 0x522224
mov eax, 0x63568c
mov edx, 0x522388
call fcn.00407f98
cmp dword [0x63567c], 0
je 0x52224d
push dword [0x63568c]
push 0x5223a0
push dword [0x63567c]
mov eax, 0x63568c
mov edx, 3
call fcn.00408078
mov eax, dword [ebp - 4]
mov edx, 0x635670
mov ecx, dword [0x521780]
call fcn.004089b0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x522280
lea eax, [ebp - 0x1dc]
call fcn.00406ed0
ret