Function at 0x4a9170
Capabilities:
Get socket status
Resolve function by parsing pe exports
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1fc
mov eax, dword [0x53c160]
xor eax, esp
mov dword [esp + 0x1f8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov byte [esp + 0xf], al
push edi
mov ecx, dword [esi + 0x50]
cmp dword [esi + 0x4c], ecx
jne 0x4a91ba
cmp eax, 0xffffffff
je 0x4a96a9
lea eax, [esp + 0x13]
mov ebx, 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ebx
jmp 0x4a91d4
mov eax, dword [esi + 0x10]
mov edx, dword [eax]
mov eax, dword [esi + 0x20]
mov dword [esp + 0x1c], edx
mov ebx, dword [eax]
sub ebx, edx
mov dword [esp + 0x14], ebx
je 0x4a9685
lea ecx, [esp + 0x48]
call fcn.0047b140
mov eax, dword [esi + 0xac]
cmp eax, dword [esp + 0x4c]
jl 0x4a96cc
jg 0x4a91ff
mov eax, dword [esi + 0xa8]
cmp eax, dword [esp + 0x48]
jb 0x4a96cc
test byte [esi + 0x60], 2
jne 0x4a92bd
mov edi, dword [esi + 0x5c]
cmp edi, 0xffffffff
jne 0x4a923b
mov dword [esp + 0x68], 0x2719
mov byte [esp + 0x6c], 1
movq xmm0, qword [esp + 0x68]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
jmp 0x4a92bd
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov dword [esp + 0x74], eax
setne byte [esp + 0x78]
movq xmm0, qword [esp + 0x74]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
test edi, edi
js 0x4a92bd
mov dword [esp + 0x80], 0
mov byte [esp + 0x84], 0
movq xmm0, qword [esp + 0x80]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
or byte [esi + 0x60], 2
cmp byte [esi + 0x7c], 0
mov eax, dword [esp + 0x1c]
mov edi, dword [esi + 0x5c]
mov dword [esp + 0x60], eax
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x64], ebx
jne 0x4a92f5
xorps xmm0, xmm0
mov dword [esp + 0xf4], 0
movups xmmword [esp + 0xdc], xmm0
movq qword [esp + 0xec], xmm0
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
push 0
push 0
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0
push eax
push 1
lea eax, [esp + 0x70]
push eax
push edi
call dword [sym.imp.WS2_32.dll_WSASend]
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov dword [esp + 0x8c], eax
setne byte [esp + 0x90]
movq xmm0, qword [esp + 0x8c]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
mov eax, dword [esi + 0x9c]
cmp eax, 0x40
jne 0x4a937b
mov dword [esp + 0x98], 0x2746
mov byte [esp + 0x9c], 1
movq xmm0, qword [esp + 0x98]
jmp 0x4a939e
cmp eax, 0x4d2
jne 0x4a93b0
mov dword [esp + 0xa4], 0x274d
mov byte [esp + 0xa8], 1
movq xmm0, qword [esp + 0xa4]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
test edi, edi
jne 0x4a93fc
mov ecx, dword [esp + 0x34]
mov dword [esp + 0xb0], edi
mov byte [esp + 0xb4], 0
movq xmm0, qword [esp + 0xb0]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
test ecx, ecx
jle 0x4a93fc
cmp ecx, ebx
mov eax, ebx
cmovb eax, ecx
add dword [esp + 0x1c], eax
sub ebx, eax
mov dword [esp + 0x14], ebx
jmp 0x4a967a
mov eax, dword [esi + 0x9c]
cmp eax, 0x2733
je 0x4a9414
cmp eax, 0x4d5
jne 0x4a96f1
mov eax, dword [esi + 0xa4]
cmp dword [eax + 8], 0x25c5e09b
jne 0x4a96f1
cmp dword [eax + 0xc], 0x8fafd21e
jne 0x4a96f1
lea ecx, [esp + 0x28]
call fcn.0047b140
mov edi, dword [esi + 0xac]
mov edx, dword [esi + 0xa8]
test edi, edi
jg 0x4a94b6
jl 0x4a9453
test edx, edx
jae 0x4a94b6
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
test eax, eax
jg 0x4a946d
jl 0x4a951a
test ebx, ebx
jb 0x4a951a
test edx, edx
jne 0x4a947e
cmp edi, 0x80000000
jne 0x4a947e
jmp 0x4a951e
or ecx, 0xffffffff
sub ecx, ebx
mov dword [esp + 0x18], ecx
mov ecx, SysReAllocString
sbb ecx, eax
mov eax, edx
neg eax
mov dword [esp + 0x20], eax
mov eax, edi
adc eax, 0
neg eax
cmp ecx, eax
jg 0x4a9512
jl 0x4a94ad
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x20]
jae 0x4a9512
xor edx, edx
mov edi, SysReAllocString
jmp 0x4a951e
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
test eax, eax
jg 0x4a951a
jl 0x4a94c8
test ebx, ebx
jae 0x4a951a
test ebx, ebx
jne 0x4a94db
cmp eax, 0x80000000
jne 0x4a94db
or edx, 0xffffffff
lea edi, [eax - 1]
jmp 0x4a951e
or ecx, 0xffffffff
mov dword [esp + 0x18], ebx
sub ecx, edx
mov dword [esp + 0x20], ecx
mov ecx, SysReAllocString
sbb ecx, edi
neg dword [esp + 0x18]
adc eax, 0
neg eax
cmp ecx, eax
jg 0x4a9512
jl 0x4a9508
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x18]
jae 0x4a9512
or edx, 0xffffffff
mov edi, SysReAllocString
jmp 0x4a951e
sub edx, ebx
sbb edi, dword [esp + 0x2c]
jmp 0x4a951e
sub edx, ebx
sbb edi, eax
push 0
push 0xf4240
push edi
push edx
call fcn.004f0a40
mov ecx, eax
test edx, edx
jl 0x4a9555
jg 0x4a953c
cmp ecx, 0x7fffffff
jbe 0x4a954b
mov ecx, SysReAllocString
mov dword [esp + 0x24], 0
jmp 0x4a9562
test edx, edx
jg 0x4a9562
jl 0x4a9555
test ecx, ecx
jae 0x4a9562
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
mov ecx, dword [esp + 0x20]
cmp byte [esi + 0x7c], 0
mov edi, dword [esi + 0x5c]
jne 0x4a958a
xorps xmm0, xmm0
mov dword [esp + 0xf4], 0
movups xmmword [esp + 0xdc], xmm0
movq qword [esp + 0xec], xmm0
cmp edi, 0xffffffff
je 0x4a96c2
mov dword [esp + 0xfc], edi
mov dword [esp + 0xf8], 1
test ecx, ecx
js 0x4a95d6
mov eax, 0x10624dd3
lea ebx, [esp + 0x54]
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x54], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x58], eax
jmp 0x4a95d8
xor ebx, ebx
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
push 0
lea eax, [esp + 0x100]
push eax
push 0
lea eax, [edi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov dword [esp + 0xbc], eax
setne byte [esp + 0xc0]
movq xmm0, qword [esp + 0xbc]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
test edi, edi
jne 0x4a965b
mov dword [esp + 0xc8], edi
mov byte [esp + 0xcc], 0
movq xmm0, qword [esp + 0xc8]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
jmp 0x4a9676
jle 0x4a9672
mov dword [esp + 0x38], 0
mov byte [esp + 0x3c], 0
movq xmm0, qword [esp + 0x38]
jmp 0x4a9647
test edi, edi
js 0x4a96f1
mov ebx, dword [esp + 0x14]
test ebx, ebx
jne 0x4a91d4
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 0x4c]
cmp edx, ecx
je 0x4a9737
mov eax, dword [esi + 0x10]
sub ecx, edx
mov dword [eax], edx
mov eax, dword [esi + 0x20]
mov dword [eax], edx
mov eax, dword [esi + 0x30]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jne 0x4a970b
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1f8]
xor ecx, esp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 0x38], 0x2719
jmp 0x4a96d4
mov dword [esp + 0x38], 0x274c
mov byte [esp + 0x3c], 1
movq xmm0, qword [esp + 0x38]
movq qword [esi + 0x9c], xmm0
mov dword [esi + 0xa4], 0x518630
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1f8]
xor ecx, esp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
mov cl, byte [esp + 0x13]
mov byte [edx], cl
mov ecx, dword [esi + 0x30]
dec dword [ecx]
mov ecx, dword [esi + 0x20]
inc dword [ecx]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1f8]
xor ecx, esp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x204]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 4