Function at 0x100ab280
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [esp + 0x20], eax
mov eax, 1
mov edi, edx
mov edx, dword [0x100d3490]
or ebx, 0xffffffff
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], edx
cmp dword [0x100d35f0], eax
jne 0x100ab42b
mov eax, dword [ebp + 0xc]
push eax
lea esi, [esp + 0x28]
call fcn.100ab4b0
add esp, 4
test eax, eax
je 0x100ab3ed
mov edi, dword [esp + 0x10]
test edi, edi
jne 0x100ab2f3
cmp dword [ebp + 0x14], edi
je 0x100ab30b
mov ecx, dword [ebp + 0x14]
push ecx
lea esi, [esp + 0x38]
call fcn.100ab4b0
add esp, 4
test eax, eax
je 0x100ab3ed
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x100ab3ed
push 0
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0x1000
push ebx
call sym.tcl85.dll_TclSockMinimumBuffers
add esp, 8
cmp dword [ebp + 0x10], 0
je 0x100ab388
push 0x10
lea edx, [esp + 0x28]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x100ab3ed
push accept
push ebx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x100ab3ed
push ebx
call fcn.100ab230
mov esi, eax
mov eax, 8
add esp, 4
or dword [esi + 0xc], eax
mov dword [esi + 0x14], eax
jmp 0x100ab46b
test edi, edi
jne 0x100ab391
cmp dword [ebp + 0x14], edi
je 0x100ab3a4
push 0x10
lea eax, [esp + 0x38]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x100ab3ed
cmp dword [ebp + 0x18], 0
je 0x100ab3c0
lea ecx, [esp + 0x14]
push ecx
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x100ab3ed
push 0x10
lea edx, [esp + 0x28]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x100ab446
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call sym.tcl85.dll_TclWinConvertError
add esp, 4
call dword [sym.imp.MSVCR90.dll__errno]
cmp dword [eax], 0xb
je 0x100ab43f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call sym.tcl85.dll_TclWinConvertError
mov esi, dword [esp + 0x24]
add esp, 4
test esi, esi
je 0x100ab41f
push 0
push ecx
push esi
call sym.tcl85.dll_Tcl_PosixError
add esp, 8
push eax
push str.couldnt_open_socket:
push esi
call sym.tcl85.dll_Tcl_AppendResult
add esp, 0x10
cmp ebx, 0xffffffff
je 0x100ab42b
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.100b1b48
mov esp, ebp
pop ebp
ret
mov edi, 1
jmp 0x100ab44a
mov edi, dword [esp + 0x18]
push ebx
call fcn.100ab230
add esp, 4
mov esi, eax
mov dword [esi + 0x14], 0x23
test edi, edi
je 0x100ab46b
or dword [esi + 8], 4
mov dword [esi + 0x14], 0x33
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
push esi
push 1
push 0x402
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esp + 0x44]
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.100b1b48
mov esp, ebp
pop ebp
ret