Function at 0x4b79fe
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57526e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x408
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x2c4], 0
mov dword [ebp - 0x2bc], 0
lea ecx, [ebp - 0x118]
call fcn.00401420
mov dword [ebp - 4], 0
mov dword [ebp - 0x110], 1
push pe_nt_image_headers32
push 0
lea eax, [ebp - 0x3c4]
push eax
call fcn.0054bf90
add esp, 0xc
mov ecx, dword [0x5edf54]
push ecx
push str.g_bEnableNetPLC_d
lea edx, [ebp - 0x3c4]
push edx
call fcn.0054c6e3
add esp, 0xc
mov eax, dword [ebp - 0x2bc]
push eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x3c4]
push ecx
call fcn.004b74bd
add esp, 0xc
cmp dword [0x5edf44], 0
je 0x4b7b2f
push pe_nt_image_headers32
push 0
lea edx, [ebp - 0x10c]
push edx
call fcn.0054bf90
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call fcn.0054be90
add esp, 8
push 0x5c537c
lea edx, [ebp - 0x10c]
push edx
call fcn.0054bea0
add esp, 8
push 0xffffffffffffffff
lea eax, [ebp - 0x10c]
push eax
call fcn.0054ce70
add esp, 4
push eax
lea ecx, [ebp - 0x10c]
push ecx
mov ecx, 0x5edf18
call fcn.00527a75
mov dword [ebp - 0x408], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x118]
call fcn.0056206c
mov eax, dword [ebp - 0x408]
jmp 0x4b7d78
cmp dword [0x5edf54], 0
jne 0x4b7b45
cmp dword [0x5edf44], 0
je 0x4b7d54
mov word [ebp - 0x2c0], 0x101
lea edx, [ebp - 0x2b8]
push edx
mov ax, word [ebp - 0x2c0]
push eax
call sub.WSOCK32.dll_WSAStartup
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0xffffffff
jne 0x4b7bca
push 0x5c5380
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0054c6e3
add esp, 8
mov edx, dword [ebp - 0x2bc]
push edx
push 0xffffffffffffffff
push str.Cant_Create_Socket
call fcn.004b74bd
add esp, 0xc
mov dword [ebp - 0x40c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x118]
call fcn.0056206c
mov eax, dword [ebp - 0x40c]
jmp 0x4b7d78
push 0x40
push 0
lea eax, [ebp - 0x404]
push eax
call fcn.0054bf90
add esp, 0xc
mov ecx, dword [0x5edf50]
push ecx
push 0x5c53a8
lea edx, [ebp - 0x404]
push edx
call fcn.0054c6e3
add esp, 0xc
mov word [ebp - 0x128], 2
lea eax, [ebp - 0x404]
push eax
call sub.WSOCK32.dll_inet_addr
mov dword [ebp - 0x124], eax
mov cx, word [0x5edf4c]
push ecx
call sub.WSOCK32.dll_htons
mov word [ebp - 0x126], ax
push 0x10
lea edx, [ebp - 0x128]
push edx
mov eax, dword [ebp - 0x114]
push eax
call sub.WSOCK32.dll_connect
mov dword [ebp - 0x2c4], eax
cmp dword [ebp - 0x2c4], 0xffffffff
jne 0x4b7c99
push 0x5c53ac
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0054c6e3
add esp, 8
mov edx, dword [ebp - 0x2bc]
push edx
push 0xffffffffffffffff
push str.Cant_Connect_to_Host
call fcn.004b74bd
add esp, 0xc
mov dword [ebp - 0x410], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x118]
call fcn.0056206c
mov eax, dword [ebp - 0x410]
jmp 0x4b7d78
push pe_nt_image_headers32
push 0
lea eax, [ebp - 0x3c4]
push eax
call fcn.0054bf90
add esp, 0xc
cmp dword [ebp + 0xc], 0x100
jbe 0x4b7cbf
mov dword [ebp + 0xc], 0xff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x3c4]
push eax
call fcn.0054c7e0
add esp, 0xc
lea ecx, [ebp - 0x3c4]
push ecx
call fcn.0054ce70
add esp, 4
add eax, 1
mov dword [ebp + 0xc], eax
push 0
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x3c4]
push eax
mov ecx, dword [ebp - 0x114]
push ecx
call sub.WSOCK32.dll_send
mov dword [ebp - 0x2bc], eax
mov edx, dword [ebp - 0x2bc]
push edx
push 1
lea eax, [ebp - 0x3c4]
push eax
call fcn.004b74bd
add esp, 0xc
mov ecx, dword [ebp - 0x2bc]
cmp ecx, dword [ebp + 0xc]
jne 0x4b7d39
mov dword [ebp - 0x110], 1
jmp 0x4b7d43
mov dword [ebp - 0x110], 0
mov edx, dword [ebp - 0x114]
push edx
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x414], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x118]
call fcn.0056206c
mov eax, dword [ebp - 0x414]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret