Function at 0x4789b4
Capabilities:
Act as tcp client
Connect tcp socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeac
push ebx
push esi
xor eax, eax
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x144], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x478daf
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x416c10]
call fcn.004037cc
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x144]
xor eax, eax
call fcn.00402a6c
mov eax, dword [ebp - 0x144]
lea edx, [ebp - 0x140]
call fcn.0040945c
mov edx, dword [ebp - 0x140]
lea eax, [ebp - 8]
mov ecx, 0x478dc8
call fcn.0040491c
mov eax, dword [ebp - 8]
call fcn.004093b4
test al, al
je 0x478b78
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4327d0]
call fcn.00432880
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x478b71
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
mov ecx, 0x478de8
mov edx, 0x478dfc
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 8]
test eax, eax
jle 0x478b5b
dec eax
test eax, eax
jl 0x478b5b
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], 0
push 0x478e10
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x148]
push eax
mov ebx, dword [ebp - 0x14]
inc ebx
mov dword [ebp - 0x150], ebx
mov byte [ebp - 0x14c], 0
lea edx, [ebp - 0x150]
xor ecx, ecx
mov eax, 0x478e24
call fcn.00409c9c
mov edx, dword [ebp - 0x148]
mov ecx, 0x478e38
mov eax, dword [ebp - 0xc]
mov esi, dword [eax]
call dword [esi]
push 0
lea eax, [ebp - 0x154]
push eax
mov dword [ebp - 0x150], ebx
mov byte [ebp - 0x14c], 0
lea edx, [ebp - 0x150]
xor ecx, ecx
mov eax, 0x478e24
call fcn.00409c9c
mov edx, dword [ebp - 0x154]
mov ecx, 0x478e44
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 8]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov edx, 0x478e10
call fcn.00404a1c
je 0x478b4f
test ebx, ebx
je 0x478b4f
mov edx, dword [0x478028]
mov eax, 8
call fcn.004055a4
mov esi, eax
test esi, esi
je 0x478b45
mov eax, esi
mov edx, dword [ebp - 0x18]
call fcn.00404664
mov dword [esi + 4], ebx
mov edx, esi
mov eax, dword [ebp - 0x10]
call fcn.00419440
inc dword [ebp - 0x14]
dec dword [ebp - 0x28]
jne 0x478a8d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x478b78
mov eax, dword [ebp - 0xc]
call fcn.004037fc
ret
mov eax, dword [ebp - 0x10]
cmp dword [eax + 8], 0
jne 0x478be7
mov edx, dword [0x478028]
mov eax, 8
call fcn.004055a4
mov esi, eax
test esi, esi
je 0x478baa
mov eax, esi
mov edx, 0x478e54
call fcn.00404664
mov dword [esi + 4], 0x53f
mov edx, esi
mov eax, dword [ebp - 0x10]
call fcn.00419440
mov edx, dword [0x478028]
mov eax, 8
call fcn.004055a4
mov esi, eax
test esi, esi
je 0x478bdd
mov eax, esi
mov edx, 0x478e6c
call fcn.00404664
mov dword [esi + 4], 0x53f
mov edx, esi
mov eax, dword [ebp - 0x10]
call fcn.00419440
xor ebx, ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x478d36
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], 0
test ebx, ebx
jne 0x478c2e
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov eax, ebx
xor edx, edx
cmp edx, 0xffffffff
jne 0x478c2e
cmp eax, 0xffffffff
jne 0x478c2e
mov dword [ebp - 4], 0xffffffff
jmp 0x478d36
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
call fcn.0041959c
mov esi, eax
mov word [ebp - 0x38], 2
mov eax, dword [esi]
call fcn.00404ad0
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x34], eax
mov ax, word [esi + 4]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x36], ax
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 0x1c]
push eax
push 0x8004667e
push ebx
call sub.wsock32.dll_ioctlsocket
push 0x10
lea eax, [ebp - 0x38]
push eax
push ebx
call sub.wsock32.dll_connect
mov dword [ebp - 0x24], 2
mov dword [ebp - 0x20], 0x7a120
lea eax, [ebp - 0x13c]
call fcn.004736a8
lea edx, [ebp - 0x13c]
mov eax, ebx
call fcn.00473698
lea eax, [ebp - 0x24]
push eax
push 0
lea eax, [ebp - 0x13c]
push eax
push 0
push 0
call sub.wsock32.dll_select
cmp eax, 0xffffffff
jne 0x478cdb
mov dword [ebp - 4], 0xffffffff
push 2
push ebx
call sub.wsock32.dll_shutdown
push ebx
call sub.wsock32.dll_closesocket
xor ebx, ebx
jmp 0x478d1d
test eax, eax
jne 0x478cf6
xor eax, eax
mov dword [ebp - 4], eax
push 2
push ebx
call sub.wsock32.dll_shutdown
push ebx
call sub.wsock32.dll_closesocket
xor ebx, ebx
jmp 0x478d1d
test eax, eax
jle 0x478d1d
lea edx, [ebp - 0x13c]
mov eax, ebx
call fcn.00473680
test al, al
je 0x478d1d
lea edx, [ebp - 0x13c]
mov eax, ebx
call fcn.00473658
mov dword [ebp - 4], ebx
jmp 0x478d36
lea edx, [ebp - 0x13c]
mov eax, ebx
call fcn.00473658
inc dword [ebp - 0x14]
dec dword [ebp - 0x28]
jne 0x478c03
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x478d6e
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], 0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
call fcn.0041959c
mov esi, eax
mov edx, dword [0x478028]
mov eax, esi
call fcn.004055b8
inc dword [ebp - 0x14]
dec dword [ebp - 0x28]
jne 0x478d4c
mov eax, dword [ebp - 0x10]
call fcn.004037fc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x478db6
lea eax, [ebp - 0x154]
call fcn.00404610
lea eax, [ebp - 0x148]
mov edx, 3
call fcn.00404634
lea eax, [ebp - 0x18]
call fcn.00404610
lea eax, [ebp - 8]
call fcn.00404610
ret