Function at 0x479474
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
add esp, 0xffffffec
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4796bc
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
mov eax, dword [ebp - 4]
mov byte [eax + 0x7a], 0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x65], 0
je 0x4794bc
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x38]
mov dword [edx], eax
jmp 0x4794cf
push 0
push 2
push 2
call sub.wsock32.dll_socket
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x38]
mov dword [edx], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
cmp dword [eax], 0xffffffff
je 0x4796a6
mov eax, dword [ebp - 4]
cmp byte [eax + 0x64], 0
je 0x4794f0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x65], 0
je 0x479502
mov eax, dword [ebp - 4]
cmp byte [eax + 0x66], 0
je 0x47952a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x65], 0
je 0x47952a
push 0x10
mov eax, dword [ebp - 4]
add eax, 0x54
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_bind
test eax, eax
je 0x47952a
mov eax, dword [ebp - 4]
call fcn.0047981c
jmp 0x4796a6
mov eax, dword [ebp - 4]
cmp byte [eax + 0x65], 0
je 0x4795e2
mov eax, dword [ebp - 4]
cmp byte [eax + 0x66], 0
je 0x479565
push 0xf
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_listen
test eax, eax
je 0x479638
mov eax, dword [ebp - 4]
call fcn.0047981c
jmp 0x4796a6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x84]
call fcn.00478fec
mov eax, dword [ebp - 4]
cmp byte [eax + 0x79], 0
je 0x4795b0
push 0x10
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_connect
test eax, eax
je 0x479638
mov eax, dword [ebp - 4]
call fcn.0047981c
jmp 0x4796a6
push 0x33
push 0x452
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_WSAAsyncSelect
push 0x10
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_connect
jmp 0x479638
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
push dword [eax + 4]
call sub.wsock32.dll_inet_ntoa
mov edx, eax
lea eax, [ebp - 0x14]
call fcn.00404cb0
mov edx, dword [ebp - 0x14]
mov eax, 0x4796d4
call fcn.004050bc
test eax, eax
jle 0x479638
mov dword [ebp - 0x10], 1
push 4
lea eax, [ebp - 0x10]
push eax
push 0x20
push 0xffff
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_setsockopt
test eax, eax
sete al
mov edx, dword [ebp - 4]
mov byte [edx + 0x7a], al
mov eax, dword [ebp - 4]
cmp byte [eax + 0x65], 0
jne 0x47965c
push 3
push 0x452
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_WSAAsyncSelect
jmp 0x4796a2
mov eax, dword [ebp - 4]
cmp byte [eax + 0x66], 0
je 0x479680
push 0x2b
push 0x452
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_WSAAsyncSelect
jmp 0x4796a2
mov eax, dword [ebp - 4]
cmp byte [eax + 0x79], 0
je 0x4796a2
push 0x23
push 0x452
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_WSAAsyncSelect
mov byte [ebp - 9], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4796c3
lea eax, [ebp - 0x14]
call fcn.00404ab8
ret