Function at 0x477ac0
Capabilities:
Check os version

Disassembly:
sub esp, 0x9c0
push ebx
push ebp
push esi
push edi
call fcn.0046b1c0
mov ecx, dword [0x5cff30]
mov edx, ecx
and edx, 1
cmp dl, 1
jne 0x477af4
mov edx, eax
and edx, 1
cmp dl, 1
jne 0x477af4
mov esi, 1
mov dword [esp + 0x14], esi
jmp 0x477b17
and ecx, 2
cmp cl, 2
jne 0x47807e
and eax, 2
cmp al, cl
jne 0x47807e
mov dword [esp + 0x14], 2
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x14c]
mov dword [esp + 0x14c], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x15c], 2
je 0x477b8a
cmp esi, 2
jne 0x477ba7
mov ecx, dword [esp + 0x9ec]
mov edx, dword [esp + 0x9e8]
mov eax, dword [esp + 0x9e4]
push ecx
mov ecx, dword [esp + 0x9e4]
push edx
mov edx, dword [esp + 0x9e4]
push eax
mov eax, dword [esp + 0x9e4]
push ecx
mov ecx, dword [esp + 0x9e4]
push edx
push eax
push ecx
call fcn.00477340
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c0
ret
cmp esi, 2
jne 0x477ba7
push 0x3e8
push esi
push 6
call fcn.0046b950
mov ebp, eax
add esp, 0xc
mov dword [esp + 0x10], ebp
jmp 0x477bbb
push 0x11
push 2
push 2
call fcn.0046b950
add esp, 0xc
mov dword [esp + 0x10], eax
mov ebp, eax
or ebx, 0xffffffff
cmp ebp, ebx
jne 0x477bd2
pop edi
pop esi
pop ebp
mov eax, 0x3f
pop ebx
add esp, 0x9c0
ret
push ebp
call fcn.00477270
add esp, 4
push 1
call fcn.00477260
push eax
call fcn.004789a0
add esp, 8
cmp eax, ebx
jne 0x477c05
push ebp
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x41
pop ebx
add esp, 0x9c0
ret
mov edx, dword [0x5dabfc]
push edx
call fcn.00479b70
add esp, 4
test eax, eax
jne 0x477c5f
mov eax, dword [0x5dabfc]
push eax
call fcn.00479b80
add esp, 4
test eax, eax
jne 0x477c3a
pop edi
pop esi
pop ebp
mov eax, 0x4a
pop ebx
add esp, 0x9c0
ret
mov ax, word [eax]
cmp ax, 6
jne 0x477c48
cmp esi, 2
je 0x477c5f
cmp ax, 2
jne 0x477c53
cmp esi, 1
je 0x477c5f
mov dword [0x5cffbc], 1
jmp 0x477c6c
mov eax, dword [0x5cffbc]
test eax, eax
je 0x477d78
mov edi, 0x5dabfc
push edi
call fcn.00479ba0
add esp, 4
cmp esi, 2
jne 0x477cc9
push 0xe
call fcn.004cf255
mov esi, eax
add esp, 4
test esi, esi
je 0x477cd9
mov edx, esi
xor ecx, ecx
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov word [edx + 0xc], cx
mov word [esi], 6
call fcn.00477280
push eax
call fcn.0046ba80
mov word [esi + 0xc], ax
lea eax, [esi + 2]
lea edx, [esi + 6]
mov ecx, ebx
mov dword [eax], 0
mov dword [edx], ecx
mov word [edx + 4], cx
jmp 0x477d25
push 0x10
call fcn.004cf255
mov esi, eax
add esp, 4
test esi, esi
jne 0x477cff
push 0
call fcn.00477260
push eax
call fcn.004789a0
add esp, 8
push ebp
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x40
pop ebx
add esp, 0x9c0
ret
mov ecx, esi
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov word [esi], 2
call fcn.00477280
push eax
call fcn.0046ba80
mov word [esi + 2], ax
mov dword [esi + 4], ebx
push esi
push edi
call fcn.00479bb0
mov edx, dword [0x5dabfc]
add esp, 0xc
mov dword [0x5db400], edi
push edx
call fcn.00479b70
add esp, 4
test eax, eax
je 0x477d6e
push 0
call fcn.00477260
push eax
call fcn.004789a0
add esp, 8
push ebp
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x41
pop ebx
add esp, 0x9c0
ret
mov dword [0x5cffbc], 0
push 0
call fcn.004e7776
add esp, 4
test eax, eax
jge 0x477d96
pop edi
pop esi
pop ebp
mov eax, 0x4a
pop ebx
add esp, 0x9c0
ret
push 0
call fcn.004e7776
add esp, 4
and eax, 0x80001fff
jns 0x477dae
dec eax
or eax, 0xffffe000
inc eax
mov esi, dword [esp + 0x9d8]
mov dword [esp + 0x1e4], eax
mov ecx, 0xfa
xor eax, eax
lea edi, [esp + 0x1f0]
mov dword [esp + 0x1ec], ebx
mov dword [esp + 0x1e0], 0x2c6
mov dword [esp + 0x1e8], 0
rep stosd dword es:[edi], eax
mov edi, esi
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3e8
ja 0x477e0e
mov eax, ecx
lea edi, [esp + 0x1f0]
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 [0x5dabfc]
push esi
call fcn.00479b70
add esp, 4
test eax, eax
jne 0x477e6a
push esi
call fcn.00479b80
add esp, 4
lea ecx, [esp + 0x1e0]
push 0x10
push eax
push 0
push 0x1a0
push ecx
call fcn.00477260
push eax
call fcn.0046ba00
add esp, 0x18
cmp eax, 0x1a0
jne 0x477f29
push esi
call fcn.00479b90
mov esi, eax
push esi
call fcn.00479b70
add esp, 8
test eax, eax
je 0x477e21
push 0
call fcn.004e7776
mov ecx, dword [esp + 0x9e0]
mov edi, dword [esp + 0x9f0]
mov ebp, dword [esp + 0x9ec]
mov ebx, dword [esp + 0x9e8]
mov esi, dword [esp + 0x9e4]
add esp, 4
add eax, ecx
mov dword [esp + 0x1c], eax
push 0
mov dword [esp + 0x28], 0
call fcn.004e7776
mov edx, dword [esp + 0x20]
add esp, 4
sub edx, eax
mov dword [esp + 0x20], edx
jns 0x477ec3
mov dword [esp + 0x20], 0
mov dword [esp + 0x48], 0
call fcn.00477260
mov ecx, dword [esp + 0x48]
mov dword [esp + ecx*4 + 0x4c], eax
mov edx, dword [esp + 0x48]
inc edx
lea eax, [esp + 0x48]
mov dword [esp + 0x48], edx
lea edx, [esp + 0x20]
push edx
push 0
push 0
push eax
call fcn.00477260
inc eax
push eax
call fcn.0046b980
add esp, 0x14
cmp eax, 0xffffffff
je 0x477ff2
test eax, eax
je 0x478057
cmp dword [esp + 0x14], 2
jne 0x477f3f
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0xe
push ecx
lea edx, [esp + 0x2c]
jmp 0x477f50
push ebp
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x3e
pop ebx
add esp, 0x9c0
ret
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x10
push ecx
lea edx, [esp + 0x3c]
push edx
push 0
lea eax, [esp + 0x5e4]
push 0x3f8
push eax
call fcn.00477260
push eax
call fcn.0046ba40
add esp, 0x18
cmp eax, 0xffffffff
je 0x477e9d
mov ecx, dword [esp + 0x5dc]
mov eax, dword [esp + 0x1e4]
cmp ecx, eax
jne 0x477e9d
mov edx, dword [esp + 0x5e4]
mov eax, dword [esp + 0x1ec]
cmp edx, eax
jne 0x477e9d
cmp dword [esp + 0x14], 2
jne 0x477fb6
lea eax, [esp + 0x28]
push eax
call fcn.0046b370
jmp 0x477fc0
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.0046b930
add esp, 4
lea edx, [esp + 0x5e8]
push edi
push ebp
push ebx
push esi
push eax
push edx
call fcn.00477800
add esp, 0x18
cmp esi, 4
jne 0x477fe4
cmp word [edi + 0x40], 0
ja 0x478057
cmp eax, 0x40
je 0x478003
test eax, eax
je 0x478057
jmp 0x477e9d
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
jne 0x47801d
jmp 0x477e9d
mov eax, dword [esp + 0x10]
push eax
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x40
pop ebx
add esp, 0x9c0
ret
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x478039
push 0
call fcn.00477260
push eax
call fcn.004789a0
add esp, 8
mov ecx, dword [esp + 0x10]
push ecx
call sub.WSOCK32.dll_closesocket
mov ecx, dword [ebx]
xor eax, eax
pop edi
pop esi
test ecx, ecx
pop ebp
pop ebx
setle al
add esp, 0x9c0
ret
push 0
call fcn.00477260
push eax
call fcn.004789a0
mov edx, dword [esp + 0x18]
add esp, 8
push edx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x9c0
ret
pop edi
pop esi
pop ebp
mov eax, 0x4c
pop ebx
add esp, 0x9c0
ret