Function at 0x4c1ac0
Capabilities:
Check for time delay via gettickcount
Get socket status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x344
mov eax, dword [0x56adc0]
xor eax, esp
mov dword [esp + 0x340], eax
push ebx
push esi
push edi
xor edi, edi
mov esi, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x10], edi
cmp ecx, edi
je 0x4c1b0d
mov edx, dword [ebp + 8]
xor eax, eax
cmp edx, edi
jbe 0x4c1b0d
cmp dword [ecx + eax*8], 0xffffffff
jne 0x4c1b29
inc eax
cmp eax, edx
jb 0x4c1b02
mov eax, esi
call fcn.004c1750
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
cmp esi, edi
jle 0x4c1b3e
mov dword [esp + 0x10], esi
call fcn.004c2720
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x138], ebx
mov dword [esp + 0x240], edi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x1c], esi
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov word [eax + esi*8 + 6], cx
mov ecx, dword [eax + esi*8]
cmp ecx, 0xffffffff
je 0x4c1c3d
movzx edx, word [eax + esi*8 + 4]
test dl, 7
je 0x4c1c3d
cmp ecx, dword [esp + 0xc]
jbe 0x4c1b8f
mov dword [esp + 0xc], ecx
test dl, 1
je 0x4c1bc0
mov esi, dword [esp + 0x30]
xor eax, eax
test esi, esi
je 0x4c1bab
mov edi, edi
cmp dword [esp + eax*4 + 0x34], ecx
je 0x4c1bab
inc eax
cmp eax, esi
jb 0x4c1ba0
cmp eax, esi
jne 0x4c1bbc
cmp esi, 0x40
jae 0x4c1bbc
mov dword [esp + eax*4 + 0x34], ecx
inc dword [esp + 0x30]
mov esi, dword [esp + 0x1c]
test dl, 4
je 0x4c1bfd
xor eax, eax
test ebx, ebx
je 0x4c1bde
jmp 0x4c1bd0
cmp dword [esp + eax*4 + 0x13c], ecx
je 0x4c1bde
inc eax
cmp eax, ebx
jb 0x4c1bd0
cmp eax, ebx
jne 0x4c1bfd
cmp ebx, 0x40
jae 0x4c1bfd
mov dword [esp + eax*4 + 0x13c], ecx
mov ebx, dword [esp + 0x138]
inc ebx
mov dword [esp + 0x138], ebx
test dl, 2
je 0x4c1c3d
xor eax, eax
test edi, edi
je 0x4c1c1e
jmp 0x4c1c10
cmp dword [esp + eax*4 + 0x244], ecx
je 0x4c1c1e
inc eax
cmp eax, edi
jb 0x4c1c10
cmp eax, edi
jne 0x4c1c3d
cmp edi, 0x40
jae 0x4c1c3d
mov dword [esp + eax*4 + 0x244], ecx
mov edi, dword [esp + 0x240]
inc edi
mov dword [esp + 0x240], edi
inc esi
mov dword [esp + 0x1c], esi
cmp esi, dword [ebp + 8]
jb 0x4c1b60
mov esi, dword [esp + 0xc]
mov ebx, dword [sym.imp.WS2_32.dll_select]
xor edx, edx
cmp dword [esp + 0x14], edx
lea eax, [esp + 0x28]
setl dl
lea edi, [edx - 1]
and edi, eax
inc esi
mov eax, dword [esp + 0x14]
xor ecx, ecx
cmp eax, ecx
jle 0x4c1c9d
mov ecx, dword [esp + 0x10]
mov eax, 0x10624dd3
imul dword [esp + 0x10]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
jmp 0x4c1ca3
jne 0x4c1ca7
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
push edi
lea edx, [esp + 0x244]
push edx
lea eax, [esp + 0x140]
push eax
lea ecx, [esp + 0x3c]
push ecx
push esi
call ebx
cmp eax, 0xffffffff
jne 0x4c1d29
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x4c1cdf
cmp dword [0x571d74], 0
jne 0x4c1d2d
cmp eax, 0x2714
jne 0x4c1d2d
cmp dword [esp + 0x14], 0
jle 0x4c1c68
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push edx
push eax
call fcn.004c2720
push edx
push eax
call fcn.004c2750
mov ecx, dword [esp + 0x24]
sub ecx, eax
add esp, 0x10
mov dword [esp + 0x10], ecx
test ecx, ecx
jg 0x4c1c68
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
test eax, eax
jns 0x4c1d45
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
jne 0x4c1d5e
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x18]
mov ebx, dword [ebp + 8]
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov dword [esp + 0xc], 0
add esi, 6
mov eax, dword [esi - 6]
xor ecx, ecx
mov word [esi], cx
cmp eax, 0xffffffff
je 0x4c1dc9
lea edx, [esp + 0x30]
push edx
push eax
call edi
test eax, eax
je 0x4c1d93
or word [esi], 1
mov ecx, dword [esi - 6]
lea eax, [esp + 0x138]
push eax
push ecx
call edi
test eax, eax
je 0x4c1da9
or word [esi], 4
mov eax, dword [esi - 6]
lea edx, [esp + 0x240]
push edx
push eax
call edi
test eax, eax
je 0x4c1dbf
or word [esi], 2
cmp word [esi], 0
je 0x4c1dc9
inc dword [esp + 0xc]
add esi, 8
dec ebx
jne 0x4c1d76
mov ecx, dword [esp + 0x34c]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret