Function at 0x4a5b20
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 8], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4a601d
push dword fs:[eax]
mov dword fs:[eax], esp
mov esi, dword [ebx + 0x374]
test esi, esi
je 0x4a5b60
mov eax, esi
mov edx, dword [0x40f8cc]
call fcn.00403120
test al, al
je 0x4a5b60
mov eax, esi
call fcn.00414028
mov byte [ebx + 0x320], 0
mov byte [ebx + 0x321], 0
mov byte [ebx + 0x309], 0
mov byte [ebx + 0x2e9], 0
cmp byte [ebx + 0x395], 0
je 0x4a5b90
mov cl, 1
xor edx, edx
mov eax, ebx
call fcn.004a8934
cmp dword [ebx + 0x38c], 0
jne 0x4a5ba5
mov edx, 0x1000
mov eax, ebx
call fcn.004a4104
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov esi, eax
mov dword [ebx + 0x34c], esi
inc esi
jne 0x4a5bcc
lea eax, [ebp - 8]
push eax
xor ecx, ecx
mov dx, 0x2733
mov eax, ebx
call fcn.004a8af0
mov al, byte [ebx + 0xcc]
sub al, 1
je 0x4a5bda
sub al, 2
jne 0x4a5be6
mov edx, 0x8000
mov eax, ebx
call fcn.004a3fd4
xor edx, edx
mov eax, ebx
call fcn.004a59ec
push 0x30
push 0x465
mov eax, dword [ebx + 0x368]
push eax
mov eax, dword [ebx + 0x34c]
push eax
call sub.wsock32.dll_WSAAsyncSelect
mov dl, 1
mov eax, ebx
call fcn.004a40cc
mov eax, ebx
call fcn.004aa2bc
mov byte [ebx + 0x364], 1
mov byte [ebx + 0x395], 1
cmp word [ebx + 0x4e], 0
je 0x4a5c36
mov edx, ebx
mov eax, dword [ebx + 0x50]
call dword [ebx + 0x4c]
mov byte [ebx + 0x335], 0
mov byte [ebx + 0x336], 0
cmp byte [ebx + 0x394], 0
je 0x4a5c6e
lea edx, [ebp - 8]
mov eax, dword [0x581b90]
call fcn.00405c64
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a35d0]
call fcn.0040bb58
call fcn.00403680
xor esi, esi
xor eax, eax
push ebp
push 0x4a5c94
push dword fs:[eax]
mov dword fs:[eax], esp
lea ecx, [ebp - 8]
xor edx, edx
mov eax, ebx
call fcn.004a8cec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4a5cc0
cmp dword [ebx + 0x2b8], 0
jne 0x4a5d31
test esi, esi
jg 0x4a5cd4
cmp word [ebx + 0x7e], 0
jne 0x4a5cf7
lea edx, [ebp - 8]
mov eax, dword [0x581a98]
call fcn.00405c64
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a35d0]
call fcn.0040bb58
call fcn.00403680
jmp 0x4a5d31
mov byte [ebp - 1], 0
lea ecx, [ebp - 1]
mov edx, ebx
mov eax, dword [ebx + 0x80]
call dword [ebx + 0x7c]
cmp byte [ebp - 1], 0
jne 0x4a5d30
lea edx, [ebp - 8]
mov eax, dword [0x581a98]
call fcn.00405c64
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a35d0]
call fcn.0040bb58
call fcn.00403680
inc esi
cmp dword [ebx + 0x2b8], 0
je 0x4a5c70
mov word [ebx + 0x2b4], 2
cmp dword [ebx + 0xd4], 0
jne 0x4a5d66
mov ax, word [ebx + 0xf4]
push eax
call sub.wsock32.dll_htons
mov word [ebx + 0x2b6], ax
jmp 0x4a5d7a
mov ax, word [ebx + 0xe0]
push eax
call sub.wsock32.dll_htons
mov word [ebx + 0x2b6], ax
mov byte [ebx + 0x120], 0
mov byte [ebx + 0xf1], 1
push 0x10
lea eax, [ebx + 0x2b4]
push eax
mov eax, dword [ebx + 0x34c]
push eax
call sub.wsock32.dll_connect
inc eax
jne 0x4a5db1
lea eax, [ebp - 8]
push eax
xor ecx, ecx
mov dx, 0x2733
mov eax, ebx
call fcn.004a8af0
xor edx, edx
mov eax, ebx
call fcn.004a7540
mov dl, 1
mov eax, ebx
call fcn.004a9128
cmp byte [ebx + 0x395], 0
je 0x4a5df0
cmp byte [ebx + 0x394], 0
jne 0x4a5df0
cmp byte [ebx + 0x336], 0
jne 0x4a5df0
cmp byte [ebx + 0x335], 0
jne 0x4a5df0
cmp byte [ebx + 0xf1], 0
jne 0x4a5dba
cmp byte [ebx + 0x395], 0
jne 0x4a5e09
cmp byte [ebx + 0x394], 0
jne 0x4a5e09
mov byte [ebx + 0x335], 1
mov eax, ebx
call fcn.004a7590
push 0x23
push 0x465
mov eax, dword [ebx + 0x368]
push eax
mov eax, dword [ebx + 0x34c]
push eax
call sub.wsock32.dll_WSAAsyncSelect
cmp byte [ebx + 0x336], 0
jne 0x4a5e49
cmp byte [ebx + 0x335], 0
jne 0x4a5e49
cmp byte [ebx + 0xf1], 0
jne 0x4a5fc7
mov eax, ebx
call fcn.004a8ad8
mov esi, eax
mov cl, 1
xor edx, edx
mov eax, ebx
call fcn.004a8934
mov edx, esi
mov eax, ebx
call fcn.004a8ae0
mov byte [ebx + 0x395], 0
cmp word [ebx + 0xa6], 0
je 0x4a5e85
mov edx, ebx
mov eax, dword [ebx + 0xa8]
call dword [ebx + 0xa4]
cmp byte [ebx + 0xe9], 0
je 0x4a5eaf
lea edx, [ebp - 8]
mov eax, dword [0x581918]
call fcn.00405c64
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a3628]
call fcn.0040bb58
call fcn.00403680
cmp byte [ebx + 0xf1], 0
jne 0x4a5f13
mov eax, ebx
call fcn.004a8ad8
cmp eax, 0x2733
jne 0x4a5ed2
mov edx, 0x274c
mov eax, ebx
call fcn.004a8ae0
mov eax, ebx
call fcn.004a8ad8
cmp eax, 0x2710
jle 0x4a5f13
mov eax, ebx
call fcn.004a8ad8
cmp eax, 0x2736
je 0x4a5f13
mov eax, ebx
call fcn.004a8ad8
lea ecx, [ebp - 8]
mov dl, 1
call fcn.004a1d50
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a35d0]
call fcn.0040bb58
call fcn.00403680
cmp byte [ebx + 0x336], 0
je 0x4a5f3e
lea ecx, [ebp - 8]
mov dl, 1
mov ax, 0x274c
call fcn.004a1d50
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a35d0]
call fcn.0040bb58
call fcn.00403680
cmp byte [ebx + 0xf1], 0
je 0x4a5f71
cmp byte [ebx + 0x394], 0
jne 0x4a5f71
lea edx, [ebp - 8]
mov eax, dword [0x581680]
call fcn.00405c64
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a35d0]
call fcn.0040bb58
call fcn.00403680
cmp byte [ebx + 0x335], 0
je 0x4a5f9b
lea edx, [ebp - 8]
mov eax, dword [0x581918]
call fcn.00405c64
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a35d0]
call fcn.0040bb58
call fcn.00403680
cmp byte [ebx + 0xf1], 0
jne 0x4a6007
lea edx, [ebp - 8]
mov eax, dword [0x581680]
call fcn.00405c64
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x4a35d0]
call fcn.0040bb58
call fcn.00403680
jmp 0x4a6007
mov eax, dword [ebx + 0xe4]
sub eax, 0xa
je 0x4a5fe1
dec eax
je 0x4a5ff7
sub eax, 2
je 0x4a6000
sub eax, 3
je 0x4a5fec
jmp 0x4a6007
xor edx, edx
mov eax, ebx
call fcn.004a91dc
jmp 0x4a6007
mov dl, 1
mov eax, ebx
call fcn.004a91dc
jmp 0x4a6007
mov eax, ebx
call fcn.004a9658
jmp 0x4a6007
mov eax, ebx
call fcn.004a9f98
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a6024
lea eax, [ebp - 8]
call fcn.00403c0c
ret