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

Disassembly:
sub esp, 0x328
mov eax, dword [0x5176f0]
xor eax, esp
mov dword [esp + 0x324], eax
xor ecx, ecx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], ecx
cmp dword [esp + 0x33c], ecx
jl 0x48918d
jg 0x48917b
mov eax, dword [esp + 0x338]
cmp eax, 0x7fffffff
jb 0x489194
mov dword [esp + 0x338], bind
mov dword [esp + 0x33c], ecx
mov eax, dword [esp + 0x338]
push ebx
mov ebx, dword [esp + 0x338]
push ebp
mov ebp, dword [esp + 0x338]
push edi
mov edi, dword [esp + 0x338]
cmp edi, 0xffffffff
jne 0x489205
cmp ebp, edi
jne 0x489205
cmp ebx, edi
jne 0x489205
cmp eax, ecx
je 0x4891eb
jge 0x4891e4
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, edi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x324]
xor ecx, esp
call fcn.004ae123
add esp, 0x328
ret
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x324]
xor ecx, esp
call fcn.004ae123
add esp, 0x328
ret
cmp dword [esp + 0x348], ecx
jl 0x489227
jg 0x489214
cmp eax, ecx
jbe 0x489227
mov dword [esp + 0x10], eax
call fcn.0048a930
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
xor ecx, ecx
push esi
xor edx, edx
xor esi, esi
mov dword [esp + 0x230], edx
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x28], esi
cmp edi, 0xffffffff
je 0x489265
mov esi, 1
mov edx, esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x234], edi
mov dword [esp + 0x230], edx
mov dword [esp + 0x10], edi
cmp ebp, 0xffffffff
je 0x4892ce
xor eax, eax
cmp esi, ecx
jbe 0x48927b
cmp dword [esp + eax*4 + 0x2c], ebp
je 0x48927b
inc eax
cmp eax, esi
jb 0x489270
cmp eax, esi
jne 0x489291
cmp esi, 0x40
jae 0x489291
mov dword [esp + eax*4 + 0x2c], ebp
mov esi, dword [esp + 0x28]
inc esi
mov dword [esp + 0x28], esi
xor eax, eax
cmp edx, ecx
jbe 0x4892a5
cmp dword [esp + eax*4 + 0x234], ebp
je 0x4892a5
inc eax
cmp eax, edx
jb 0x489297
cmp eax, edx
jne 0x4892c4
cmp edx, 0x40
jae 0x4892c4
mov dword [esp + eax*4 + 0x234], ebp
mov edx, dword [esp + 0x230]
inc edx
mov dword [esp + 0x230], edx
cmp ebp, dword [esp + 0x10]
jbe 0x4892ce
mov dword [esp + 0x10], ebp
mov dword [esp + 0x12c], ecx
cmp ebx, 0xffffffff
je 0x489323
mov ecx, 1
xor eax, eax
mov dword [esp + 0x130], ebx
mov dword [esp + 0x12c], ecx
test edx, edx
je 0x489302
cmp dword [esp + eax*4 + 0x234], ebx
je 0x489302
add eax, ecx
cmp eax, edx
jb 0x4892f3
cmp eax, edx
jne 0x489319
cmp edx, 0x40
jae 0x489319
mov dword [esp + eax*4 + 0x234], ebx
add dword [esp + 0x230], ecx
cmp ebx, dword [esp + 0x10]
jbe 0x489323
mov dword [esp + 0x10], ebx
cmp dword [esp + 0x34c], 0
jg 0x489348
jl 0x489339
cmp dword [esp + 0x348], 0
jae 0x489348
mov ebx, dword [esp + 0x10]
mov edi, dword [sym.imp.WS2_32.dll_select]
xor ebp, ebp
inc ebx
jmp 0x489370
mov ebx, dword [esp + 0x10]
mov edi, dword [sym.imp.WS2_32.dll_select]
lea ebp, [esp + 0x20]
inc ebx
jmp 0x489370
mov ecx, dword [esp + 0x12c]
mov esi, dword [esp + 0x28]
jmp 0x489370
mov eax, dword [esp + 0x34c]
test eax, eax
jl 0x4893b6
jg 0x489387
cmp dword [esp + 0x348], 0
jbe 0x4893b6
mov eax, 0x10624dd3
imul dword [esp + 0x14]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
imul eax, eax, 0x3e8
sub edx, eax
imul edx, edx, 0x3e8
mov dword [esp + 0x24], edx
jmp 0x4893cb
mov edx, dword [esp + 0x348]
or edx, eax
jne 0x4893cb
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
neg ecx
sbb ecx, ecx
push ebp
lea edx, [esp + 0x130]
and ecx, edx
lea eax, [esp + 0x234]
push eax
neg esi
sbb esi, esi
lea eax, [esp + 0x30]
push ecx
and esi, eax
push esi
push ebx
call edi
cmp eax, 0xffffffff
jne 0x48945c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x48940f
cmp dword [0x51ad80], 0
jne 0x489460
cmp eax, 0x2714
jne 0x489460
cmp dword [esp + 0x34c], 0
jl 0x489360
jg 0x48942d
cmp dword [esp + 0x348], 0
jbe 0x489360
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ecx
push edx
call fcn.0048a930
push edx
push eax
call fcn.0048a960
mov ecx, dword [esp + 0x358]
sub ecx, eax
add esp, 0x10
mov dword [esp + 0x14], ecx
test ecx, ecx
jle 0x48946a
jmp 0x489360
test eax, eax
jns 0x489468
or eax, 0xffffffff
jmp 0x489513
jne 0x489471
xor eax, eax
jmp 0x489513
mov edi, dword [esp + 0x33c]
xor esi, esi
cmp edi, 0xffffffff
je 0x4894a8
lea eax, [esp + 0x28]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x489493
mov esi, 1
lea ecx, [esp + 0x230]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4894a8
or esi, 4
mov edi, dword [esp + 0x340]
cmp edi, 0xffffffff
je 0x4894db
lea edx, [esp + 0x28]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4894c6
or esi, 8
lea eax, [esp + 0x230]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4894db
or esi, 4
mov edi, dword [esp + 0x344]
cmp edi, 0xffffffff
je 0x489511
lea ecx, [esp + 0x12c]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4894fc
or esi, 2
lea edx, [esp + 0x230]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x489511
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x334]
pop esi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ae123
add esp, 0x328
ret