Function at 0x487ee0
Capabilities:
Check os version

Disassembly:
sub esp, 0x510
push ebx
push ebp
push esi
push edi
call fcn.0047b280
mov ecx, dword [0x4eb2c8]
mov edx, ecx
and edx, 1
cmp dl, 1
jne 0x487f14
mov edx, eax
and edx, 1
cmp dl, 1
jne 0x487f14
mov edi, 1
mov dword [esp + 0x14], edi
jmp 0x487f37
and ecx, 2
cmp cl, 2
jne 0x48848a
and eax, 2
cmp al, cl
jne 0x48848a
mov dword [esp + 0x14], 2
mov edi, dword [esp + 0x14]
mov dword [esp + 0x2ec], 0x94
lea eax, [esp + 0x2ec]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x2fc], 2
je 0x487faa
cmp edi, 2
jne 0x487fc7
mov ecx, dword [esp + 0x534]
mov ebp, dword [esp + 0x53c]
mov eax, dword [esp + 0x538]
push ebp
mov ebp, dword [esp + 0x534]
push eax
mov edx, dword [esp + 0x534]
push ecx
mov eax, dword [esp + 0x534]
push ebp
mov ecx, dword [esp + 0x534]
push edx
push eax
push ecx
call fcn.00487770
sub esp, 0xffffffe4
pop edi
pop esi
pop ebp
pop ebx
sub esp, 0xfffffaf0
ret
cmp edi, 2
jne 0x487fc7
push 0x3e8
push edi
push 6
call fcn.0047b9e0
mov ebp, eax
add esp, 0xc
mov dword [esp + 0x10], ebp
jmp 0x487fdb
push 0x11
push 2
push 2
call fcn.0047b9e0
sub esp, 0xfffffff4
mov ebp, eax
mov dword [esp + 0x10], eax
or ebx, 0xffffffff
cmp ebp, ebx
jne 0x487ff2
mov eax, 0x3f
pop edi
pop esi
pop ebp
pop ebx
sub esp, 0xfffffaf0
ret
push ebp
call fcn.00487680
add esp, 4
push 1
call fcn.00487670
push eax
call fcn.00488d70
sub esp, 0xfffffff8
cmp eax, ebx
jne 0x488025
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0x41
pop edi
pop esi
pop ebp
pop ebx
sub esp, 0xfffffaf0
ret
mov edx, dword [0x4fd6dc]
push edx
call fcn.00482f90
add esp, 4
test eax, eax
jne 0x48806b
mov eax, dword [0x4fd6dc]
push eax
call fcn.00482fa0
mov ax, word [eax]
add esp, 4
cmp ax, 6
jne 0x488054
cmp edi, 2
je 0x48806b
cmp ax, 2
jne 0x48805f
cmp edi, 1
je 0x48806b
mov dword [0x4eb400], 1
jmp 0x488078
mov eax, dword [0x4eb400]
test eax, eax
je 0x488184
mov esi, 0x4fd6dc
push esi
call fcn.00482fc0
add esp, 4
cmp edi, 2
jne 0x4880d5
push 0xe
call fcn.004a8093
mov edi, eax
sub esp, 0xfffffffc
or edi, edi
je 0x4880e5
xor ecx, ecx
mov edx, edi
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov word [edx + 0xc], cx
mov word [edi], 6
call fcn.00487690
push eax
call fcn.0047bb10
mov ecx, ebx
lea edx, [edi + 6]
mov word [edi + 0xc], ax
lea eax, [edi + 2]
mov dword [eax], 0
mov dword [edx], ecx
mov word [edx + 4], cx
jmp 0x488131
push 0x10
call fcn.004a8093
add esp, 4
mov edi, eax
or edi, edi
jne 0x48810b
push 0
call fcn.00487670
push eax
call fcn.00488d70
sub esp, 0xfffffff8
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0x40
pop edi
pop esi
pop ebp
pop ebx
sub esp, 0xfffffaf0
ret
xor eax, eax
mov ecx, edi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov word [edi], 2
call fcn.00487690
push eax
call fcn.0047bb10
mov word [edi + 2], ax
mov dword [edi + 4], ebx
push edi
push esi
call fcn.00482fd0
mov edx, dword [0x4fd6dc]
mov dword [0x4fda28], esi
add esp, 0xc
push edx
call fcn.00482f90
sub esp, 0xfffffffc
test eax, eax
je 0x48817a
push 0
call fcn.00487670
push eax
call fcn.00488d70
sub esp, 0xfffffff8
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0x41
pop edi
pop esi
pop ebp
pop ebx
sub esp, 0xfffffaf0
ret
mov dword [0x4eb400], 0
push 0
call fcn.004beed4
sub esp, 0xfffffffc
or eax, eax
jge 0x4881a2
pop edi
mov eax, 0x4a
pop esi
pop ebp
pop ebx
sub esp, 0xfffffaf0
ret
push 0
call fcn.004beed4
add esp, 4
and eax, 0x80001fff
jns 0x4881ba
dec eax
or eax, 0xffffe000
inc eax
mov esi, dword [esp + 0x528]
lea edi, [esp + 0x15c]
mov dword [esp + 0x150], eax
mov ecx, 0x64
mov dword [esp + 0x158], ebx
xor eax, eax
mov dword [esp + 0x14c], 0x294
mov dword [esp + 0x154], 0
rep stosd dword es:[edi], eax
mov ecx, ebx
not ecx
mov edi, esi
repne scasb al, byte es:[edi]
cmp ecx, 0x190
ja 0x48821a
mov eax, ecx
lea edi, [esp + 0x15c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [0x4fd6dc]
push edi
call fcn.00482f90
add esp, 4
or eax, eax
jne 0x488276
push edi
call fcn.00482fa0
add esp, 4
lea ecx, [esp + 0x14c]
push 0x10
push eax
push 0
push 0x1a0
push ecx
call fcn.00487670
push eax
call fcn.0047ba90
sub esp, 0xffffffe8
cmp eax, 0x1a0
jne 0x488335
push edi
call fcn.00482fb0
mov edi, eax
push edi
call fcn.00482f90
add esp, 8
or eax, eax
je 0x48822d
push 0
call fcn.004beed4
mov ebp, dword [esp + 0x534]
mov ebx, dword [esp + 0x538]
mov edi, dword [esp + 0x53c]
mov ecx, dword [esp + 0x530]
mov esi, dword [esp + 0x540]
add esp, 4
add eax, ecx
mov dword [esp + 0x1c], eax
push 0
mov dword [esp + 0x28], 0
call fcn.004beed4
mov ecx, dword [esp + 0x20]
sub esp, 0xfffffffc
sub ecx, eax
mov dword [esp + 0x20], ecx
jns 0x4882cf
mov dword [esp + 0x20], 0
mov dword [esp + 0x48], 0
call fcn.00487670
mov ecx, dword [esp + 0x48]
mov dword [esp + ecx*4 + 0x4c], eax
mov edx, dword [esp + 0x48]
inc edx
mov dword [esp + 0x48], edx
lea edx, [esp + 0x20]
lea eax, [esp + 0x48]
push edx
push 0
push 0
push eax
call fcn.00487670
inc eax
push eax
call fcn.0047ba10
sub esp, 0xffffffec
cmp eax, 0xffffffff
je 0x4883fe
test eax, eax
je 0x488463
cmp dword [esp + 0x14], 2
jne 0x48834b
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0xe
push ecx
lea edx, [esp + 0x2c]
jmp 0x48835c
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0x3e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x510
ret
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x10
push ecx
lea edx, [esp + 0x3c]
push edx
push 0
lea eax, [esp + 0x38c]
push 0x1a0
push eax
call fcn.00487670
push eax
call fcn.0047bad0
add esp, 0x18
cmp eax, 0xffffffff
je 0x4882a9
mov eax, dword [esp + 0x150]
mov ecx, dword [esp + 0x384]
cmp ecx, eax
jne 0x4882a9
mov edx, dword [esp + 0x38c]
mov eax, dword [esp + 0x158]
cmp edx, eax
jne 0x4882a9
cmp dword [esp + 0x14], 2
jne 0x4883c2
lea eax, [esp + 0x28]
push eax
call fcn.0047b430
jmp 0x4883cc
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.0047b9c0
sub esp, 0xfffffffc
lea edx, [esp + 0x390]
push esi
push edi
push ebx
push ebp
push eax
push edx
call fcn.00487c30
add esp, 0x18
cmp ebp, 4
jne 0x4883f0
cmp word [esi + 0x20], 0
ja 0x488463
cmp eax, 0x40
je 0x48840f
or eax, eax
je 0x488463
jmp 0x4882a9
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
jne 0x488429
jmp 0x4882a9
mov eax, dword [esp + 0x10]
push eax
call sub.WS2_32.dll_closesocket
pop edi
pop esi
mov eax, 0x40
pop ebp
pop ebx
sub esp, 0xfffffaf0
ret
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x488445
push 0
call fcn.00487670
push eax
call fcn.00488d70
add esp, 8
mov ecx, dword [esp + 0x10]
push ecx
call sub.WS2_32.dll_closesocket
xor eax, eax
pop edi
pop esi
pop ebp
mov ecx, dword [ebx]
test ecx, ecx
setle al
pop ebx
add esp, 0x510
ret
push 0
call fcn.00487670
push eax
call fcn.00488d70
mov edx, dword [esp + 0x18]
sub esp, 0xfffffff8
push edx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x510
ret
mov eax, 0x4c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x510
ret