Function at 0x4f6580
Capabilities:
Check os version

Disassembly:
sub esp, 0x508
push ebx
push esi
push edi
push ebp
call fcn.004f8c50
test byte [0x4e92e0], 1
je 0x4f65a3
test al, 1
je 0x4f65a3
mov ebx, 1
jmp 0x4f65bd
test byte [0x4e92e0], 2
je 0x4f6b1d
test al, 2
je 0x4f6b1d
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 0x4f6632
cmp ebx, 2
jne 0x4f6642
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.004f5e70
add esp, 0x1c
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
cmp ebx, 2
jne 0x4f6642
push 0x3e8
push 2
push 6
jmp 0x4f6648
push 0x11
push 2
push 2
call fcn.004f5a80
add esp, 0xc
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4f6667
mov eax, 0x3f
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
push ebp
call fcn.004f5d80
add esp, 4
push 1
call fcn.004f5d70
push eax
call fcn.004f7430
add esp, 8
cmp eax, 0xffffffff
jne 0x4f669b
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 [0x4eb7d4]
push eax
call fcn.004f2030
add esp, 4
test eax, eax
jne 0x4f66de
mov eax, dword [0x4eb7d4]
push eax
call fcn.004f2040
mov ax, word [eax]
add esp, 4
cmp ax, 6
jne 0x4f66c9
cmp ebx, 2
je 0x4f66de
cmp ax, 2
jne 0x4f66d4
cmp ebx, 1
je 0x4f66de
mov dword [0x4e9484], 1
cmp dword [0x4e9484], 0
je 0x4f6829
push 0x4eb7d4
call fcn.004f2060
add esp, 4
cmp ebx, 2
jne 0x4f676d
push 0xe
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov esi, eax
test esi, esi
jne 0x4f6734
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
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.004f5d90
push eax
call fcn.004f5bb0
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 0x4f67cf
push 0x10
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov esi, eax
test esi, esi
jne 0x4f67a4
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
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.004f5d90
push eax
call fcn.004f5bb0
mov word [esi + 2], ax
add esp, 4
mov dword [esi + 4], 0xffffffff
push esi
push 0x4eb7d4
call fcn.004f2070
add esp, 8
mov eax, dword [0x4eb7d4]
mov dword [0x4eb480], eax
mov eax, dword [0x4eb7d4]
push eax
call fcn.004f2030
add esp, 4
test eax, eax
je 0x4f681f
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
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 [0x4e9484], 0
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
test eax, eax
jge 0x4f6848
mov eax, 0x4a
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x508
ret
push 0
call dword [sym.imp.MSVCRT.dll_time]
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], 0x189d
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 [0x4eb7d4]
push esi
call fcn.004f2030
add esp, 4
test eax, eax
jne 0x4f690c
push esi
call fcn.004f2040
add esp, 4
push 0x10
push eax
lea eax, [esp + 0x48]
push 0
push 0x1a0
push eax
call fcn.004f5d70
push eax
call fcn.004f5b30
add esp, 0x18
cmp eax, 0x1a0
jne 0x4f69b2
push esi
call fcn.004f2050
add esp, 4
mov esi, eax
push esi
call fcn.004f2030
add esp, 4
test eax, eax
je 0x4f68c3
push 0
xor esi, esi
call dword [sym.imp.MSVCRT.dll_time]
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 dword [sym.imp.MSVCRT.dll_time]
add esp, 4
sub edi, eax
mov dword [esp + 0x14], edi
jns 0x4f694b
mov dword [esp + 0x14], 0
mov dword [esp + 0x274], 0
call fcn.004f5d70
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.004f5d70
inc eax
push eax
call fcn.004f5ab0
add esp, 0x14
cmp eax, 0xffffffff
je 0x4f6a94
test eax, eax
je 0x4f6ad7
cmp ebx, 2
jne 0x4f69c8
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
mov dword [esp + 0x10], 0xe
push eax
jmp 0x4f69d9
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.004f5d70
push eax
call fcn.004f5b70
add esp, 0x18
cmp eax, 0xffffffff
je 0x4f6adc
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x37c], eax
jne 0x4f6adc
mov eax, dword [esp + 0x4c]
cmp dword [esp + 0x384], eax
jne 0x4f6adc
cmp ebx, 2
jne 0x4f6a33
lea eax, [esp + 0x20]
push eax
call fcn.004f8e00
jmp 0x4f6a3d
mov eax, dword [esp + 0x34]
push eax
call fcn.004f5a50
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.004f6350
add esp, 0x18
cmp dword [esp + 0x528], 4
jne 0x4f6a89
mov ecx, dword [esp + 0x534]
cmp word [ecx + 0x20], 0
ja 0x4f6ad7
cmp eax, 0x40
je 0x4f6b07
test eax, eax
jne 0x4f6adc
jmp 0x4f6ad7
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x4f6adc
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
add esp, 8
push ebp
call sub.WSOCK32.dll_closesocket
mov ecx, dword [esp + 0x52c]
mov eax, 0
cmp dword [ecx], 0
jg 0x4f6b22
pop ebp
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x508
ret
mov esi, 1
test esi, esi
je 0x4f6924
push 0
call fcn.004f5d70
push eax
call fcn.004f7430
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