Function at 0x577910
Capabilities:
Act as tcp client
Check for time delay via gettickcount
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa70
mov eax, dword [0x632b20]
xor eax, ebp
mov dword [ebp - 4], eax
movsx eax, byte [0xfd576c]
test eax, eax
jne 0x577935
xor eax, eax
jmp 0x577f80
cmp dword [0xfda0f4], 0
jne 0x577b63
call dword [sym.imp.kernel32.dll_GetTickCount]
cmp eax, 0x35a4e900
jbe 0x577966
call dword [sym.imp.kernel32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x35a4e900
div ecx
mov dword [ebp - 0xa6c], edx
jmp 0x577972
call dword [sym.imp.kernel32.dll_GetTickCount]
mov dword [ebp - 0xa6c], eax
mov edx, dword [ebp - 0xa6c]
mov dword [0xfda0e0], edx
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xa0]
push ecx
movsx edx, word [0x62f350]
push edx
call fcn.00576c60
add esp, 0xc
test eax, eax
jge 0x5779b9
push 0x5f7100
push 0xfd9b28
call fcn.005cc4f5
add esp, 8
mov eax, 0xfffffffe
jmp 0x577f80
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [0xfd5768], eax
cmp dword [0xfd5768], 0xffffffff
jne 0x5779ee
push 0x5f7118
push 0xfd9b28
call fcn.005cc4f5
add esp, 8
mov eax, 0xfffffffd
jmp 0x577f80
mov dword [ebp - 0xa4], 1
lea eax, [ebp - 0xa4]
push eax
push 0x8004667e
mov ecx, dword [0xfd5768]
push ecx
call sub.WSOCK32.dll_ioctlsocket
cmp dword [0x607ed8], 0
je 0x577a49
mov dword [ebp - 0xa8], 1
push 4
lea edx, [ebp - 0xa8]
push edx
push 1
push 6
mov eax, dword [0xfd5768]
push eax
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x577a49
mov eax, 0xffffff9c
jmp 0x577f80
mov ecx, 2
mov word [ebp - 0x14], cx
movzx edx, word [ebp - 0x1c]
push edx
call sub.WSOCK32.dll_htons
mov word [ebp - 0x12], ax
lea eax, [ebp - 0xa0]
push eax
call sub.WSOCK32.dll_inet_addr
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x577ac5
lea ecx, [ebp - 0xa0]
push ecx
call sub.WSOCK32.dll_gethostbyname
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x577ab8
lea edx, [ebp - 0xa0]
push edx
push 0x5f7134
push 0xfd9b28
call fcn.005cc4f5
add esp, 0xc
mov eax, dword [0xfd5768]
push eax
call sub.WSOCK32.dll_closesocket
mov eax, 0xfffffffc
jmp 0x577f80
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
mov dword [0xfd5770], 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov eax, dword [0xfd5768]
push eax
call sub.WSOCK32.dll_connect
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x577b54
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0xac], 0x2733
jne 0x577b02
jmp 0x577b54
mov ecx, dword [ebp - 0xac]
push ecx
push str.CONNECT_ERROR_d
lea edx, [ebp - 0x1b0]
push edx
call fcn.005cc4f5
add esp, 0xc
lea eax, [ebp - 0x1b0]
push eax
call fcn.00462e10
add esp, 4
mov ecx, dword [0xfd5768]
push ecx
call sub.WSOCK32.dll_closesocket
push 0x5f7168
push 0xfd9b28
call fcn.005cc4f5
add esp, 8
mov eax, 0xfffffffb
jmp 0x577f80
mov dword [0xfda0f4], 1
jmp 0x577e04
cmp dword [0xfda0f4], 1
jl 0x577cff
cmp dword [0xfda0f4], 0x46
jg 0x577cff
mov edx, dword [0xfda0f4]
add edx, 1
mov dword [0xfda0f4], edx
cmp dword [0xfda0f4], 0x46
jne 0x577b9f
mov dword [0xfda0f4], 0x45
mov dword [ebp - 0x4d8], 0
mov dword [ebp - 0x4d4], 0
mov dword [ebp - 0x3c8], 0
mov dword [ebp - 0x2c0], 0
mov dword [ebp - 0x4d0], 0
cmp dword [ebp - 0x3c8], 0x40
jae 0x577bfc
mov eax, dword [ebp - 0x3c8]
mov ecx, dword [0xfd5768]
mov dword [ebp + eax*4 - 0x3c4], ecx
mov edx, dword [ebp - 0x3c8]
add edx, 1
mov dword [ebp - 0x3c8], edx
xor eax, eax
jne 0x577bd1
cmp dword [ebp - 0x2c0], 0x40
jae 0x577c2b
mov ecx, dword [ebp - 0x2c0]
mov edx, dword [0xfd5768]
mov dword [ebp + ecx*4 - 0x2bc], edx
mov eax, dword [ebp - 0x2c0]
add eax, 1
mov dword [ebp - 0x2c0], eax
xor ecx, ecx
jne 0x577c00
cmp dword [ebp - 0x4d0], 0x40
jae 0x577c59
mov edx, dword [ebp - 0x4d0]
mov eax, dword [0xfd5768]
mov dword [ebp + edx*4 - 0x4cc], eax
mov ecx, dword [ebp - 0x4d0]
add ecx, 1
mov dword [ebp - 0x4d0], ecx
xor edx, edx
jne 0x577c2f
lea eax, [ebp - 0x4d8]
push eax
lea ecx, [ebp - 0x4d0]
push ecx
lea edx, [ebp - 0x2c0]
push edx
lea eax, [ebp - 0x3c8]
push eax
push 2
call sub.WSOCK32.dll_select
mov dword [ebp - 0x1b4], eax
lea ecx, [ebp - 0x2c0]
push ecx
mov edx, dword [0xfd5768]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x577cbb
mov dword [0xfda0f4], 0x47
mov byte [0xfd576d], 1
push str.CONNECT_OK
call fcn.00462e10
add esp, 4
lea eax, [ebp - 0x4d0]
push eax
mov ecx, dword [0xfd5768]
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x577cfa
push 0x5f7194
push 0xfd9b28
call fcn.005cc4f5
add esp, 8
mov edx, dword [0xfd5768]
push edx
call sub.WSOCK32.dll_closesocket
mov eax, 0xfffffffa
jmp 0x577f80
jmp 0x577e04
cmp dword [0xfda0f4], 0x47
jne 0x577e04
mov dword [ebp - 0x5e8], 0
mov dword [ebp - 0x5e4], 0
mov dword [ebp - 0x5e0], 0
cmp dword [ebp - 0x5e0], 0x40
jae 0x577d55
mov eax, dword [ebp - 0x5e0]
mov ecx, dword [0xfd5768]
mov dword [ebp + eax*4 - 0x5dc], ecx
mov edx, dword [ebp - 0x5e0]
add edx, 1
mov dword [ebp - 0x5e0], edx
xor eax, eax
jne 0x577d2a
lea ecx, [ebp - 0x5e8]
push ecx
push 0
push 0
lea edx, [ebp - 0x5e0]
push edx
push 2
call sub.WSOCK32.dll_select
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea eax, [ebp - 0x9f0]
mov dword ss:[eax], 0xa
mov eax, 1
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [ebp - 0x5ec], eax
cmp dword [ebp - 0x5ec], 0
jle 0x577e04
mov edx, dword [ebp - 0x5ec]
push edx
lea eax, [ebp - 0x9f0]
push eax
call fcn.00577300
add esp, 8
push 0x78
lea ecx, [ebp - 0xa68]
push ecx
call fcn.00577480
add esp, 8
test eax, eax
nop
nop
mov byte [0xf1ceaa], 1
mov dword [0xfda0f4], 0x48
cmp dword [0xfda0f4], 0x48
jl 0x577ee8
cmp dword [0xfda0f4], 0x50
jg 0x577ee8
cmp dword [0xfda0f4], 0x48
jne 0x577e72
xor edx, edx
mov word [0xfda0bc], dx
push 0xfd9ae8
push 0xfd9f28
push 0xfda078
mov eax, dword [0xfd5768]
push eax
mov eax, 0
add esp, 0x10
mov ecx, dword [0x607eec]
push ecx
push 0x9cf30c
mov edx, dword [0xfd5768]
push edx
call fcn.00587f80
add esp, 0xc
mov dword [0xfda0dc], 1
cmp dword [0xfda0dc], 2
jne 0x577ec4
movsx eax, word [0xfda0bc]
test eax, eax
je 0x577e92
mov dword [0xfda0f4], 0x51
jmp 0x577ec4
mov dword [0xfda0dc], 0
push 0x5f71a8
push 0xfd9b28
call fcn.005cc4f5
add esp, 8
mov ecx, dword [0xfd5768]
push ecx
call sub.WSOCK32.dll_closesocket
mov eax, 0xfffffff9
jmp 0x577f80
mov edx, dword [0xfda0f4]
add edx, 1
mov dword [0xfda0f4], edx
cmp dword [0xfda0f4], 0x51
jne 0x577ee6
mov dword [0xfda0f4], 0x50
jmp 0x577f23
cmp dword [0xfda0f4], 0x51
jl 0x577f09
cmp dword [0xfda0f4], 0x62
jg 0x577f09
mov eax, dword [0xfda0f4]
add eax, 1
mov dword [0xfda0f4], eax
jmp 0x577f23
cmp dword [0xfda0f4], 0x63
jne 0x577f23
mov dword [0xfda0dc], 0
mov eax, 1
jmp 0x577f80
call dword [sym.imp.kernel32.dll_GetTickCount]
cmp eax, 0x35a4e900
jbe 0x577f47
call dword [sym.imp.kernel32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x35a4e900
div ecx
mov dword [ebp - 0xa70], edx
jmp 0x577f53
call dword [sym.imp.kernel32.dll_GetTickCount]
mov dword [ebp - 0xa70], eax
mov edx, dword [ebp - 0xa70]
sub edx, dword [0xfda0e0]
cmp edx, 0x927c0
jbe 0x577f7e
push 0x5f71b4
push 0xfd9b28
call fcn.005cc4f5
add esp, 8
or eax, 0xffffffff
jmp 0x577f80
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005cbcfe
mov esp, ebp
pop ebp
ret