Function at 0x4d48f0
Capabilities:
Check for time delay via gettickcount
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
mov al, byte [0xc3078c]
sub esp, 0x3ac
test al, al
push ebx
push esi
push edi
je 0x4d4cea
mov eax, dword [0xc34f00]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, esi
cmp eax, esi
jne 0x4d4b02
call edi
movsx edx, word [0x54a164]
mov dword [0xc34efc], eax
lea eax, [esp + 0xc]
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
call fcn.004d4370
add esp, 0xc
test eax, eax
jge 0x4d4961
push 0x54a288
push 0xc348a8
call fcn.0050543d
add esp, 8
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
add esp, 0x3ac
ret
mov ebx, 1
push esi
push ebx
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [0xc2c77c], eax
jne 0x4d499a
push 0x54a25c
push 0xc348a8
call fcn.0050543d
add esp, 8
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
add esp, 0x3ac
ret
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], ebx
push ecx
push 0x8004667e
push eax
call sub.WSOCK32.dll_ioctlsocket
cmp dword [0x51fe10], esi
je 0x4d49e2
mov eax, dword [0xc2c77c]
lea edx, [esp + 0x14]
push 4
push edx
push ebx
push 6
push eax
mov dword [esp + 0x28], ebx
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x4d49e2
pop edi
pop esi
mov eax, 0xffffff9c
pop ebx
add esp, 0x3ac
ret
mov ecx, dword [esp + 0xc]
mov word [esp + 0x1c], 2
push ecx
call sub.WSOCK32.dll_htons
lea edx, [esp + 0x2c]
mov word [esp + 0x1e], ax
push edx
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
jne 0x4d4a56
lea eax, [esp + 0x2c]
push eax
call sub.WSOCK32.dll_gethostbyname
cmp eax, esi
jne 0x4d4a4b
lea ecx, [esp + 0x2c]
push ecx
push 0x54a234
push 0xc348a8
call fcn.0050543d
mov edx, dword [0xc2c77c]
add esp, 0xc
push edx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
mov eax, 0xfffffffc
pop ebx
add esp, 0x3ac
ret
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esp + 0x20], edx
mov ecx, dword [0xc2c77c]
lea eax, [esp + 0x1c]
push 0x10
push eax
push ecx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x4d4aca
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x4d4aca
push eax
lea edx, [esp + 0xb0]
push str.CONNECT_ERROR_d
push edx
call fcn.0050543d
lea eax, [esp + 0xb8]
push eax
call fcn.004321b0
mov ecx, dword [0xc2c77c]
add esp, 0x10
push ecx
call sub.WSOCK32.dll_closesocket
push 0x54a1f4
push 0xc348a8
call fcn.0050543d
add esp, 8
mov eax, 0xfffffffb
pop edi
pop esi
pop ebx
add esp, 0x3ac
ret
mov dword [0xc34f00], ebx
call edi
sub eax, dword [0xc34efc]
cmp eax, 0x927c0
jbe 0x4d4cea
push 0x54a1d0
push 0xc348a8
call fcn.0050543d
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x3ac
ret
mov ebx, 1
cmp eax, ebx
jl 0x4d4c05
cmp eax, 0x46
jg 0x4d4c05
inc eax
cmp eax, 0x46
mov dword [0xc34f00], eax
jne 0x4d4b2d
mov dword [0xc34f00], 0x45
mov eax, dword [0xc2c77c]
lea edx, [esp + 0xc]
mov dword [esp + 0x2b8], eax
mov dword [esp + 0xb0], eax
mov dword [esp + 0x1b4], eax
lea eax, [esp + 0x1b0]
push edx
lea ecx, [esp + 0xb0]
push eax
lea edx, [esp + 0x2bc]
push ecx
push edx
push 2
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c8], ebx
mov dword [esp + 0xc0], ebx
mov dword [esp + 0x1c4], ebx
call sub.WSOCK32.dll_select
mov ecx, dword [0xc2c77c]
lea eax, [esp + 0xac]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4d4bbd
push str.CONNECT_OK
mov dword [0xc34f00], 0x47
mov byte [0xc3078d], bl
call fcn.004321b0
add esp, 4
mov eax, dword [0xc2c77c]
lea edx, [esp + 0x1b0]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4d4ad0
push 0x51f7c4
push 0xc348a8
call fcn.0050543d
mov ecx, dword [0xc2c77c]
add esp, 8
push ecx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
mov eax, 0xfffffffa
pop ebx
add esp, 0x3ac
ret
cmp eax, 0x47
jl 0x4d4cba
cmp eax, 0x50
jg 0x4d4cba
cmp eax, 0x47
jne 0x4d4c6f
mov edx, dword [0xc2c77c]
push str.8888888
push 0xc34e28
push 0xc34ca8
push 0xc34de8
push edx
mov word [0xc34eea], si
call fcn.004dd920
mov eax, dword [0xc34f00]
add esp, 0x14
mov dword [0xc34ef8], ebx
inc eax
cmp eax, 0x51
mov dword [0xc34f00], eax
jne 0x4d4ad0
mov dword [0xc34f00], 0x50
jmp 0x4d4ad0
cmp dword [0xc34ef8], 2
jne 0x4d4c51
cmp word [0xc34eea], si
je 0x4d4c88
mov eax, 0x51
jmp 0x4d4c51
push 0x54a1a4
push 0xc348a8
mov dword [0xc34ef8], esi
call fcn.0050543d
mov eax, dword [0xc2c77c]
add esp, 8
push eax
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
mov eax, 0xfffffff9
pop ebx
add esp, 0x3ac
ret
cmp eax, 0x51
jl 0x4d4ccf
cmp eax, 0x62
jg 0x4d4ccf
inc eax
mov dword [0xc34f00], eax
jmp 0x4d4ad0
cmp eax, 0x63
jne 0x4d4ad0
mov dword [0xc34ef8], esi
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x3ac
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x3ac
ret