Function at 0x508300
Capabilities:
Check for time delay via gettickcount
Link many functions at runtime

Disassembly:
push ebp
lea ebp, [esp - 0x194]
sub esp, 0x194
push 0xfffffffffffffffe
push 0x673188
push 0x5dfbd0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x6aae14]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x190], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov ebx, dword [ebp + 0x19c]
mov dword [ebp - 0x20], ebx
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov edi, eax
test ebx, ebx
je 0x508366
mov byte [ebx], 0
cmp dword [0x74ac24], 0
jne 0x5083c9
nop
call esi
sub eax, edi
cmp eax, 0x3e8
jae 0x5083b1
push 0
push 1
push str.WinSockLoadInProgress
push 1
push 0
call fcn.00507920
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x5083b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5083b1
lea eax, [ebp - 0x1c]
push eax
call fcn.004dca10
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x508370
cmp dword [0x74ac24], 0
je 0x5083da
cmp dword [ebp - 0x1c], 0
je 0x5083c9
lea ecx, [ebp - 0x1c]
push ecx
call fcn.004dca10
mov dword [ebp - 4], 0xfffffffe
mov eax, 1
jmp 0x5085cb
push str.ws2_32.dll
call fcn.004f4be0
mov esi, eax
test esi, esi
jne 0x508414
test ebx, ebx
je 0x5083fc
push 0x100
push ebx
call fcn.004d8c20
add esp, 8
cmp dword [ebp - 0x1c], 0
je 0x5085c2
lea edx, [ebp - 0x1c]
push edx
call fcn.004dca10
jmp 0x5085c2
push str.WSACleanup
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call edi
mov dword [0x74ac3c], eax
push str.WSAStartup
push esi
call edi
mov dword [0x74ac34], eax
test eax, eax
jne 0x50847c
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
mov dword [0x74ac24], esi
mov dword [0x74ac3c], esi
mov dword [0x74ac34], esi
cmp ebx, esi
je 0x508465
push str.Unable_to_GetProcAddress_of_WSACleanup_WSAStartup_
push ebx
call fcn.005dfb23
add esp, 8
cmp dword [ebp - 0x1c], esi
je 0x5085c2
lea eax, [ebp - 0x1c]
push eax
call fcn.004dca10
jmp 0x5085c2
lea ecx, [ebp]
push ecx
push 0x202
call eax
mov ebx, eax
test ebx, ebx
je 0x508529
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
mov dword [0x74ac24], esi
mov dword [0x74ac3c], esi
mov dword [0x74ac34], esi
mov eax, dword [ebp - 0x20]
cmp eax, esi
je 0x508512
cmp ebx, 0x276b
jne 0x5084c3
push ebx
push str.WSAStartup_Error:_WSASYSNOTREADY___d_
jmp 0x508509
cmp ebx, 0x276c
jne 0x5084d3
push ebx
push str.WSAStartup_Error:_WSAVERNOTSUPPORTED___d_
jmp 0x508509
cmp ebx, 0x2734
jne 0x5084e3
push ebx
push str.WSAStartup_Error:_WSAEINPROGRESS___d_
jmp 0x508509
cmp ebx, 0x2753
jne 0x5084f3
push ebx
push str.WSAStartup_Error:_WSAEPROCLIM___d_
jmp 0x508509
cmp ebx, 0x271e
jne 0x508503
push ebx
push str.WSAStartup_Error:_WSAEFAULT___d_
jmp 0x508509
push ebx
push str.Unknown_WSAStartup_Error:__d
push eax
call fcn.005dfb23
add esp, 0xc
cmp dword [ebp - 0x1c], esi
je 0x5085c2
lea edx, [ebp - 0x1c]
push edx
call fcn.004dca10
jmp 0x5085c2
push str.inet_ntoa
push esi
call edi
mov dword [0x74ac28], eax
push str.gethostbyname
push esi
call edi
mov dword [0x74ac2c], eax
push str.WSAGetLastError
push esi
call edi
mov dword [0x74ac30], eax
push str.htonl
push esi
call edi
mov dword [0x74ac38], eax
push str.gethostname
push esi
call edi
mov dword [0x74ac40], eax
push str.closesocket
push esi
call edi
mov dword [0x74ac44], eax
push str.WSASocketA
push esi
call edi
mov dword [0x74ac48], eax
push 0x64c268
push esi
call edi
mov dword [0x74ac4c], eax
mov dword [0x74ac24], esi
cmp dword [ebp - 0x1c], 0
je 0x5083c9
lea eax, [ebp - 0x1c]
push eax
jmp 0x5083c4
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x190]
xor ecx, ebp
call fcn.005dfbbe
add ebp, 0x194
mov esp, ebp
pop ebp
ret