Function at 0x40aa90
Capabilities:
Check os version

Disassembly:
sub esp, 0x508
push ebx
push esi
push edi
push ebp
call fcn.00408f20
test byte [0x424090], 1
je 0x40aab3
test al, 1
je 0x40aab3
mov ebx, 1
jmp 0x40aacd
test byte [0x424090], 2
je 0x40b01d
test al, 2
je 0x40b01d
mov ebx, 2
lea eax, [esp + 0x1e0]
mov ebp, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [esp + 0x1e0], 0x94
push eax
call ebp
cmp dword [esp + 0x1f0], 2
je 0x40ab42
cmp ebx, 2
jne 0x40ab52
mov ecx, dword [esp + 0x534]
mov eax, dword [esp + 0x530]
mov edx, dword [esp + 0x52c]
push ecx
mov ecx, dword [esp + 0x52c]
push eax
mov eax, dword [esp + 0x52c]
push edx
mov esi, dword [esp + 0x52c]
push ecx
mov ecx, dword [esp + 0x52c]
push eax
push esi
push ecx
call fcn.0040a380
add esp, 0x1c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
cmp ebx, 2
jne 0x40ab52
push 0x3e8
push 2
push 6
jmp 0x40ab58
push 0x11
push 2
push 2
call fcn.00409ce0
add esp, 0xc
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40ab77
mov eax, 0x3f
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
push ebp
call fcn.0040a290
add esp, 4
push 1
call fcn.0040a280
push eax
call fcn.0040b930
add esp, 8
cmp eax, 0xffffffff
jne 0x40abab
push ebp
call sub.WSOCK32.dll_closesocket
mov eax, 0x41
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
mov eax, dword [0x426bec]
push eax
call fcn.00405720
add esp, 4
test eax, eax
jne 0x40abee
mov eax, dword [0x426bec]
push eax
call fcn.00405730
mov ax, word [eax]
add esp, 4
cmp ax, 6
jne 0x40abd9
cmp ebx, 2
je 0x40abee
cmp ax, 2
jne 0x40abe4
cmp ebx, 1
je 0x40abee
mov dword [0x4251f0], 1
cmp dword [0x4251f0], 0
je 0x40ad2d
push 0x426bec
call fcn.00405750
add esp, 4
cmp ebx, 2
jne 0x40ac7c
push 0xe
call fcn.00413664
add esp, 4
mov esi, eax
test esi, esi
jne 0x40ac43
push 0
call fcn.0040a280
push eax
call fcn.0040b930
add esp, 8
push ebp
call sub.WSOCK32.dll_closesocket
mov eax, 0x40
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
xor edi, edi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov word [esi + 0xc], di
mov word [esi], 6
call fcn.0040a2a0
push eax
call fcn.00409e10
mov word [esi + 0xc], ax
add esp, 4
lea eax, [esi + 6]
mov dword [esi + 2], edi
mov dword [eax], 0xffffffff
mov word [eax + 4], 0xffff
jmp 0x40acdd
push 0x10
call fcn.00413664
add esp, 4
mov esi, eax
test esi, esi
jne 0x40acb2
push 0
call fcn.0040a280
push eax
call fcn.0040b930
add esp, 8
push ebp
call sub.WSOCK32.dll_closesocket
mov eax, 0x40
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov word [esi], 2
call fcn.0040a2a0
push eax
call fcn.00409e10
mov word [esi + 2], ax
add esp, 4
mov dword [esi + 4], 0xffffffff
push esi
push 0x426bec
call fcn.00405760
add esp, 8
mov eax, dword [0x426bec]
push eax
call fcn.00405720
add esp, 4
test eax, eax
je 0x40ad23
push 0
call fcn.0040a280
push eax
call fcn.0040b930
add esp, 8
push ebp
call sub.WSOCK32.dll_closesocket
mov eax, 0x41
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
mov dword [0x4251f0], 0
push 0
call fcn.004138b4
add esp, 4
test eax, eax
jge 0x40ad4b
mov eax, 0x4a
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
push 0
call fcn.004138b4
cdq
add esp, 4
xor eax, edx
sub eax, edx
mov dword [esp + 0x4c], 0xffffffff
and eax, 0x1fff
lea edi, [esp + 0x50]
xor eax, edx
mov ecx, 0x64
mov dword [esp + 0x40], 0x3f
mov dword [esp + 0x48], 0
sub eax, edx
mov dword [esp + 0x44], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov esi, dword [esp + 0x520]
mov ecx, 0xffffffff
mov edi, esi
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
mov eax, ecx
lea edi, [esp + 0x50]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [0x426bec]
push esi
call fcn.00405720
add esp, 4
test eax, eax
jne 0x40ae0e
push esi
call fcn.00405730
add esp, 4
push 0x10
push eax
lea eax, [esp + 0x48]
push 0
push 0x1a0
push eax
call fcn.0040a280
push eax
call fcn.00409d90
add esp, 0x18
cmp eax, 0x1a0
jne 0x40aeb2
push esi
call fcn.00405740
add esp, 4
mov esi, eax
push esi
call fcn.00405720
add esp, 4
test eax, eax
je 0x40adc5
push 0
xor esi, esi
call fcn.004138b4
add eax, dword [esp + 0x528]
mov dword [esp + 0x20], eax
add esp, 4
mov edi, dword [esp + 0x1c]
push 0
mov dword [esp + 0x1c], 0
call fcn.004138b4
add esp, 4
sub edi, eax
mov dword [esp + 0x14], edi
jns 0x40ae4b
mov dword [esp + 0x14], 0
mov dword [esp + 0x274], 0
call fcn.0040a280
lea ecx, [esp + 0x274]
mov dword [esp + 0x278], eax
lea eax, [esp + 0x14]
inc dword [esp + 0x274]
push eax
push 0
push 0
push ecx
call fcn.0040a280
inc eax
push eax
call fcn.00409d10
add esp, 0x14
cmp eax, 0xffffffff
je 0x40af94
test eax, eax
je 0x40afd7
cmp ebx, 2
jne 0x40aec8
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
mov dword [esp + 0x10], 0xe
push eax
jmp 0x40aed9
push ebp
call sub.WSOCK32.dll_closesocket
mov eax, 0x3e
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x30]
mov dword [esp + 0x10], 0x10
push eax
lea edx, [esp + 0x37c]
push ecx
push 0
push 0x1a0
push edx
call fcn.0040a280
push eax
call fcn.00409dd0
add esp, 0x18
cmp eax, 0xffffffff
je 0x40afdc
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x37c], eax
jne 0x40afdc
mov eax, dword [esp + 0x4c]
cmp dword [esp + 0x384], eax
jne 0x40afdc
cmp ebx, 2
jne 0x40af33
lea eax, [esp + 0x20]
push eax
call fcn.004090d0
jmp 0x40af3d
mov eax, dword [esp + 0x34]
push eax
call fcn.00409cb0
mov ecx, dword [esp + 0x538]
mov edx, dword [esp + 0x534]
mov edi, dword [esp + 0x530]
add esp, 4
push ecx
push edx
mov ecx, dword [esp + 0x530]
push edi
push ecx
push eax
lea eax, [esp + 0x39c]
push eax
call fcn.0040a860
add esp, 0x18
cmp dword [esp + 0x528], 4
jne 0x40af89
mov ecx, dword [esp + 0x534]
cmp word [ecx + 0x20], 0
ja 0x40afd7
cmp eax, 0x40
je 0x40b007
test eax, eax
jne 0x40afdc
jmp 0x40afd7
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x40afdc
push 0
call fcn.0040a280
push eax
call fcn.0040b930
add esp, 8
push ebp
call sub.WSOCK32.dll_closesocket
mov ecx, dword [esp + 0x52c]
mov eax, 0
cmp dword [ecx], 0
jg 0x40b022
pop ebp
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x508
ret
mov esi, 1
test esi, esi
je 0x40ae25
push 0
call fcn.0040a280
push eax
call fcn.0040b930
add esp, 8
push ebp
call sub.WSOCK32.dll_closesocket
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
push ebp
call sub.WSOCK32.dll_closesocket
mov eax, 0x40
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
mov eax, 0x4c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret