Function at 0x100ac7e0
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 [0x100d4514]
xor ebx, ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x14], edx
cmp dword [0x100d4678], eax
jne 0x100aca27
mov eax, dword [ebp + 0xc]
push eax
lea esi, [esp + 0x28]
call fcn.100aca80
add esp, 4
test eax, eax
je 0x100ac9c3
mov edi, dword [esp + 0x18]
test edi, edi
jne 0x100ac852
cmp dword [ebp + 0x14], ebx
je 0x100ac86a
mov ecx, dword [ebp + 0x14]
push ecx
lea esi, [esp + 0x38]
call fcn.100aca80
add esp, 4
test eax, eax
je 0x100ac9c3
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x100ac9c7
push 0
push 1
push esi
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 0x1000
push esi
call sym.tcl85.dll_TclSockMinimumBuffers
add esp, 8
cmp dword [ebp + 0x10], ebx
je 0x100ac906
push 0x10
lea edx, [esp + 0x28]
push edx
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x100ac9c7
push accept
push esi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x100ac9c7
push esi
call fcn.100ac790
mov ebx, eax
mov eax, 8
or dword [ebx + 0xc], eax
add esp, 4
mov dword [ebx + 0x14], eax
lea eax, [esp + 0x10]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
push ebx
push 1
push 0x402
push edx
jmp 0x100aca5e
test edi, edi
jne 0x100ac90f
cmp dword [ebp + 0x14], ebx
je 0x100ac926
push 0x10
lea eax, [esp + 0x38]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x100ac9c7
push esi
call fcn.100ac790
mov edi, dword [esp + 0x18]
add esp, 4
cmp dword [ebp + 0x18], 0
mov ebx, eax
je 0x100ac97e
mov ecx, dword [edi + 0x10]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [edi + 0x14], ebx
or dword [ebx + 0x14], 0x33
or dword [ebx + 8], 4
mov edx, dword [edi + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea eax, [esp + 0x10]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [edi]
push ebx
push 1
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x10
lea edx, [esp + 0x28]
push edx
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x100aca3b
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
jne 0x100ac9c7
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.100b30c8
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call sym.tcl85.dll_TclWinConvertError
mov edi, dword [esp + 0x24]
add esp, 4
test edi, edi
je 0x100ac9f9
push 0
push ecx
push edi
call sym.tcl85.dll_Tcl_PosixError
add esp, 8
push eax
push str.couldnt_open_socket:
push edi
call sym.tcl85.dll_Tcl_AppendResult
add esp, 0x10
test ebx, ebx
je 0x100aca1b
push edi
push ebx
call fcn.100ac6c0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.100b30c8
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
je 0x100aca27
push esi
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.100b30c8
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
push eax
push 0x8004667e
push esi
mov dword [ebx + 0x14], 0x23
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [edi]
push ebx
push 1
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esp + 0x44]
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.100b30c8
mov esp, ebp
pop ebp
ret