Function at 0x4ad010
Capabilities:
Connect socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ffdd0
mov eax, dword fs:[0]
push eax
sub esp, 0x324
mov eax, dword [0x53c160]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x268], esi
mov dword [ebp - 4], 1
or edi, 0xffffffff
cmp byte [esi + 0xa0], 0
jne 0x4ad6d0
mov ecx, dword [0x53ce70]
lea edi, [esi + 0x9c]
mov eax, dword [0x53ce74]
mov dword [ebp - 0x27c], 3
cmp ecx, 0x25c5e09b
jne 0x4ad086
cmp eax, 0x8fafd21e
je 0x4ad095
cmp ecx, 0x257edf0d
jne 0x4ad099
cmp eax, 0xb2ab117a
jne 0x4ad099
mov al, 1
jmp 0x4ad0aa
mov eax, dword [0x53ce68]
mov ecx, 0x53ce68
push 3
mov eax, dword [eax + 0x18]
call eax
mov edx, dword [ebp + 0xc]
mov byte [ebp - 0x278], al
movq xmm0, qword [ebp - 0x27c]
movq qword [edi], xmm0
mov dword [edi + 8], 0x53ce68
mov dword [ebp - 0x260], edx
test edx, edx
je 0x4ad0dd
lock inc dword [edx + 4]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x260], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x278], edx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x270], edx
mov dword [ebp - 0x274], edx
mov byte [ebp - 4], 2
mov ecx, eax
test ecx, ecx
jne 0x4ad114
cmp dword [ebp + 0x14], ecx
jne 0x4ad119
mov al, 1
jmp 0x4ad123
cmp ecx, dword [ebp + 0x14]
je 0x4ad11d
xor al, al
jmp 0x4ad123
cmp edx, dword [ebp + 0x1c]
sete al
test al, al
jne 0x4ad6a0
lea ecx, [ebp - 0x294]
call fcn.0047b140
mov eax, dword [esi + 0xac]
lea ecx, [esi + 0x9c]
cmp eax, dword [ebp - 0x290]
jl 0x4ad651
jg 0x4ad162
mov eax, dword [esi + 0xa8]
cmp eax, dword [ebp - 0x294]
jb 0x4ad651
imul eax, dword [ebp - 0x270], 0x4c
mov edx, dword [ebp - 0x26c]
push ecx
mov ecx, dword [esi + 0x58]
add ecx, 0x14
add eax, dword [edx]
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x50], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x40], xmm0
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x38], eax
lea eax, [esi + 0x5c]
push eax
lea eax, [ebp - 0x318]
push eax
call fcn.004a7470
cmp word [ebp - 0x50], 2
mov ecx, 2
push edi
push 6
push 1
mov eax, 0x17
cmove eax, ecx
mov ecx, dword [esi + 0x58]
push eax
mov dword [ebp - 0x25c], eax
add ecx, 0x14
lea eax, [esi + 0x5c]
push eax
lea eax, [ebp - 0x324]
push eax
call fcn.004a7530
lea ecx, [esi + 0x58]
cmp byte [eax + 4], 0
jne 0x4ad22f
mov edx, dword [ebp - 0x25c]
xorps xmm0, xmm0
movlpd qword [ebp - 0x304], xmm0
movlpd qword [ebp - 0x2fc], xmm0
mov dword [ebp - 0x30c], 2
mov dword [ebp - 0x308], 0
movups xmm0, xmmword [ebp - 0x30c]
mov dword [ecx + 0x20], edx
mov byte [ecx + 0x24], 0
movups xmmword [ecx + 0x28], xmm0
movq xmm0, qword [ebp - 0x2fc]
movq qword [ecx + 0x38], xmm0
mov dword [ecx + 0x40], 0
cmp byte [esi + 0xa0], 0
jne 0x4ad58e
test byte [esi + 0x60], 2
jne 0x4ad250
push edi
push ecx
lea eax, [ebp - 0x330]
push eax
call fcn.004aa170
cmp word [ebp - 0x50], 2
mov eax, 0x1c
mov ecx, 0x10
cmove eax, ecx
cmp byte [esi + 0x7c], 0
mov dword [ebp - 0x264], eax
mov eax, dword [esi + 0x5c]
mov dword [ebp - 0x25c], eax
jne 0x4ad290
xorps xmm0, xmm0
mov dword [ebp - 0x25c], eax
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
cmp eax, 0xffffffff
jne 0x4ad2b0
mov dword [ebp - 0x2a8], 0x2719
mov byte [ebp - 0x2a4], 1
movq xmm0, qword [ebp - 0x2a8]
jmp 0x4ad31b
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [ebp - 0x264]
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov dword [ebp - 0x2b4], eax
setne byte [ebp - 0x2b0]
movq xmm0, qword [ebp - 0x2b4]
movq qword [edi], xmm0
test esi, esi
mov esi, dword [ebp - 0x268]
mov dword [edi + 8], 0x518630
jne 0x4ad326
mov dword [ebp - 0x2c0], 0
mov byte [ebp - 0x2bc], 0
movq xmm0, qword [ebp - 0x2c0]
movq qword [edi], xmm0
mov dword [edi + 8], 0x518630
cmp byte [esi + 0xa0], 0
je 0x4ad675
mov eax, dword [edi]
cmp eax, 0x2734
jne 0x4ad341
mov eax, dword [edi + 8]
jmp 0x4ad352
cmp eax, 0x2733
jne 0x4ad58e
mov eax, dword [esi + 0xa4]
cmp dword [eax + 8], 0x25c5e09b
jne 0x4ad58e
cmp dword [eax + 0xc], 0x8fafd21e
jne 0x4ad58e
mov ecx, esi
call fcn.004aa040
cmp byte [esi + 0x7c], 0
mov ecx, eax
mov eax, dword [esi + 0x5c]
mov dword [ebp - 0x25c], eax
jne 0x4ad39d
xorps xmm0, xmm0
mov dword [ebp - 0x25c], eax
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
cmp eax, 0xffffffff
jne 0x4ad3cb
mov dword [ebp - 0x2cc], 0x2719
mov byte [ebp - 0x2c8], 1
movq xmm0, qword [ebp - 0x2cc]
movq qword [edi], xmm0
mov dword [edi + 8], 0x518630
jmp 0x4ad58e
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x258], 1
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x154], 1
test ecx, ecx
js 0x4ad422
mov eax, 0x10624dd3
lea esi, [ebp - 0x29c]
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x29c], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x298], eax
jmp 0x4ad424
xor esi, esi
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push esi
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x258]
push eax
mov eax, dword [ebp - 0x25c]
push 0
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov dword [ebp - 0x2d8], eax
setne byte [ebp - 0x2d4]
movq xmm0, qword [ebp - 0x2d8]
movq qword [edi], xmm0
mov dword [edi + 8], 0x518630
test esi, esi
js 0x4ad58e
mov esi, dword [ebp - 0x268]
mov dword [ebp - 0x2e4], 0
mov byte [ebp - 0x2e0], 0
movq xmm0, qword [ebp - 0x2e4]
movq qword [edi], xmm0
mov dword [edi + 8], 0x518630
cmp byte [esi + 0x7c], 0
mov eax, dword [esi + 0x5c]
mov dword [ebp - 0x280], 0
mov dword [ebp - 0x25c], eax
jne 0x4ad4d9
xorps xmm0, xmm0
mov dword [ebp - 0x25c], eax
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
cmp eax, 0xffffffff
je 0x4ad62b
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea eax, [ebp - 0x264]
mov dword [ebp - 0x264], 4
push eax
lea eax, [ebp - 0x280]
push eax
push 0x1007
push 0xffff
push dword [ebp - 0x25c]
call dword [sym.imp.WS2_32.dll_getsockopt]
mov dword [ebp - 0x25c], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov dword [ebp - 0x2f0], eax
mov eax, dword [ebp - 0x25c]
setne byte [ebp - 0x2ec]
movq xmm0, qword [ebp - 0x2f0]
movq qword [edi], xmm0
mov dword [edi + 8], 0x518630
test eax, eax
je 0x4ad559
cmp eax, 0xffffffff
je 0x4ad675
mov eax, dword [ebp - 0x280]
test eax, eax
mov dword [ebp - 0x28c], eax
setne byte [ebp - 0x288]
movq xmm0, qword [ebp - 0x28c]
movq qword [edi], xmm0
mov dword [edi + 8], 0x518630
cmp byte [esi + 0xa0], 0
je 0x4ad675
mov eax, dword [ebp - 0x26c]
mov ecx, eax
mov edx, dword [ebp - 0x270]
mov esi, ecx
inc edx
mov dword [ebp - 0x270], edx
mov eax, dword [eax + 4]
sub eax, dword [esi]
mov esi, dword [ebp - 0x268]
sar eax, 2
imul eax, eax, 0x286bca1b
mov dword [ebp - 0x274], edx
cmp edx, eax
jne 0x4ad107
mov ecx, dword [ebp - 0x260]
xor eax, eax
xor edx, edx
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x260], edx
mov dword [ebp - 0x278], edx
test ecx, ecx
je 0x4ad616
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
jne 0x4ad616
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x264]
or eax, 0xffffffff
lock xadd dword [ecx + 8], eax
jne 0x4ad616
mov eax, dword [ecx]
call dword [eax + 4]
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x270], edx
mov dword [ebp - 0x274], edx
jmp 0x4ad107
mov dword [ebp - 0x28c], 0x2719
mov byte [ebp - 0x288], 1
movq xmm0, qword [ebp - 0x28c]
movq qword [edi], xmm0
mov dword [edi + 8], 0x518630
jmp 0x4ad675
mov dword [ebp - 0x28c], 0x274c
mov byte [ebp - 0x288], 1
movq xmm0, qword [ebp - 0x28c]
movq qword [ecx], xmm0
mov dword [ecx + 8], 0x518630
mov esi, dword [ebp - 0x260]
or edi, 0xffffffff
test esi, esi
je 0x4ad6d0
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x4ad6d0
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, edi
lock xadd dword [esi + 8], eax
jne 0x4ad6d0
mov eax, dword [esi]
mov ecx, esi
jmp 0x4ad6cd
mov edx, dword [ebp - 0x260]
or edi, 0xffffffff
test edx, edx
je 0x4ad6d0
mov eax, edi
lock xadd dword [edx + 4], eax
jne 0x4ad6d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax]
mov ecx, dword [ebp - 0x260]
mov eax, edi
lock xadd dword [ecx + 8], eax
jne 0x4ad6d0
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x4ad6f6
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x4ad6f6
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, edi
lock xadd dword [esi + 8], eax
jne 0x4ad6f6
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x4ad71b
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x4ad71b
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x4ad71b
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 0x18