Function at 0x4978c0
Capabilities:
Get socket status
Print debug messages
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x650
mov eax, dword [0x51c080]
xor eax, esp
mov dword [esp + 0x64c], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebp
mov ebp, dword [esp + 0x65c]
push esi
push edi
mov edi, dword [esp + 0x668]
push str.IPInterface::transmit______n
mov esi, ecx
mov dword [esp + 0x28], edi
call ebx
xor ecx, ecx
cmp dword [esi + 0x1c], ecx
jne 0x49790a
mov eax, 0xffffffe0
jmp 0x497a1a
cmp edi, ecx
je 0x497a15
cmp ebp, ecx
je 0x497a15
mov eax, dword [esi + 0x18]
cmp eax, ecx
mov dword [esp + 0x28], ecx
je 0x497900
mov edi, 1
cmp dword [eax], edi
jb 0x497963
mov ebx, dword [sym.imp.WSOCK32.dll_setsockopt]
mov edx, dword [eax + edi*4]
push 4
lea ecx, [esp + 0x2c]
push ecx
push 0x20
push 0xffff
push edx
call ebx
cmp eax, 0xffffffff
je 0x497a35
mov eax, dword [esi + 0x18]
add edi, 1
cmp edi, dword [eax]
jbe 0x497934
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor ecx, ecx
mov eax, dword [esi + 0x10]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov eax, dword [0x51e164]
cmp eax, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], 2
mov dword [esp + 0x38], 0x11
mov dword [esp + 0x254], 0x313631
jne 0x4979c7
push ecx
call fcn.0048edf0
mov dword [0x51e164], eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x25c]
push ecx
push ebp
call eax
mov edi, eax
push edi
call dword [sym.imp.WSOCK32.dll_WSASetLastError]
cmp edi, 0x2afc
jne 0x497a3c
lea edx, [esp + 0x254]
push edx
push ebp
lea eax, [esp + 0x264]
push str.getaddrinfo__s___s_...__failed__WSANO_DATA__n
push eax
call fcn.004aa842
add esp, 0x10
lea ecx, [esp + 0x25c]
push ecx
call ebx
mov eax, 0xffffffd8
mov ecx, dword [esp + 0x65c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004a998e
add esp, 0x650
ret 0xc
mov eax, 0xffffffd6
jmp 0x497a1a
xor ecx, ecx
cmp edi, ecx
je 0x497a71
mov eax, dword [esp + 0x10]
cmp eax, ecx
je 0x497a50
push eax
call fcn.0048f030
push edi
lea edx, [esp + 0x258]
push edx
push ebp
lea eax, [esp + 0x268]
push str.getaddrinfo__s___s_...__failed__rc___d_n
push eax
call fcn.004aa842
add esp, 0x14
jmp 0x497a0b
mov edx, dword [esi + 0x18]
mov edx, dword [edx]
mov ebx, dword [esp + 0x10]
xor eax, eax
cmp edx, ecx
jbe 0x497a96
mov edi, dword [ebx + 4]
lea ecx, [esi + 0x24]
cmp edi, dword [ecx]
je 0x497a94
add eax, 1
add ecx, 4
cmp eax, edx
jb 0x497a86
xor ecx, ecx
cmp eax, edx
jne 0x497aaa
push str.No_matching_interface_found____n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x497a15
mov edi, dword [esp + 0x18]
cmp edi, ecx
jl 0x497b93
mov ebx, dword [sym.imp.WSOCK32.dll_select]
lea esp, [esp]
mov edx, dword [esi + 0x18]
cmp edx, ecx
je 0x497b0b
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x150], ecx
mov eax, edx
mov ebp, dword [eax]
mov dword [esp + 0x4c], ebp
mov eax, dword [eax]
mov dword [esp + 0x150], eax
xor eax, eax
cmp dword [edx], ecx
jbe 0x497b0b
mov ecx, edx
add ecx, 4
mov edi, edi
mov ebp, dword [ecx]
mov dword [esp + eax*4 + 0x50], ebp
mov ebp, dword [ecx]
mov dword [esp + eax*4 + 0x154], ebp
add eax, 1
add ecx, 4
cmp eax, dword [edx]
jb 0x497af0
xor ecx, ecx
cmp dword [esi + 0xc], 1
jne 0x497b24
mov edx, dword [esi + 8]
imul edx, edx, 0x3e8
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jmp 0x497b2f
mov eax, dword [esi + 8]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x154]
push eax
lea edx, [esp + 0x54]
push edx
push ecx
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x497b62
push str.select___returned_error____n
mov dword [esp + 0x18], 0xffffffd7
sub edi, 1
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x497b85
cmp eax, 1
jge 0x497b7f
push str.select___timed_out_n
mov dword [esp + 0x18], 0xffffffd5
sub edi, 1
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x497b85
cmp dword [esi + 0x18], 0
jne 0x497bcd
xor ecx, ecx
test edi, edi
jge 0x497ac0
mov ebx, dword [esp + 0x10]
cmp ebx, ecx
je 0x497bb9
mov eax, dword [0x51e16c]
cmp eax, ecx
mov esi, ebx
jne 0x497bae
push 2
call fcn.0048edf0
mov dword [0x51e16c], eax
push esi
call eax
mov dword [esp + 0x10], 0
push str.___IPInterface::transmit___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x14]
jmp 0x497a1a
mov eax, dword [esi + 0x18]
mov edi, 1
cmp dword [eax], edi
mov dword [esp + 0x18], 0
jb 0x497ce1
mov ebx, dword [esp + 0x66c]
mov ebp, dword [sym.imp.WSOCK32.dll_sendto]
lea ecx, [esi + 0x24]
mov dword [esp + 0x14], ecx
lea esp, [esp]
mov eax, dword [eax + edi*4]
lea edx, [esp + 0x4c]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x497cce
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
mov edx, dword [esp + 0x10]
cmp dword [edx + 4], eax
jne 0x497cce
mov ecx, dword [esi + 0x18]
mov edx, dword [ecx + edi*4]
push edx
push eax
lea eax, [esp + 0x264]
push str.sending_on_family___d___sockid___d_..._n
push eax
call fcn.004aa842
add esp, 0x10
lea ecx, [esp + 0x25c]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x18]
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esi + 0x18]
push eax
mov eax, dword [edx + edi*4]
push 0
push ebx
push ecx
push eax
call ebp
cmp eax, 0xffffffff
jne 0x497ca2
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
lea ecx, [esp + 0x260]
push str.sendto___returned_error:__d_n
push ecx
call fcn.004aa842
add esp, 0xc
lea edx, [esp + 0x25c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x497cce
push eax
lea eax, [esp + 0x260]
push str.sendto___succeeded._returned:__d_n
push eax
call fcn.004aa842
add esp, 0xc
lea ecx, [esp + 0x25c]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [esp + 0x18], 1
mov eax, dword [esi + 0x18]
add dword [esp + 0x14], 4
add edi, 1
cmp edi, dword [eax]
jbe 0x497c00
mov esi, dword [esp + 0x10]
test esi, esi
je 0x497d01
mov eax, dword [0x51e16c]
test eax, eax
jne 0x497cfe
push 2
call fcn.0048edf0
mov dword [0x51e16c], eax
push esi
call eax
mov eax, dword [esp + 0x18]
sub eax, 1
neg eax
sbb eax, eax
and eax, 0xffffffd5
jmp 0x497a1a