Function at 0x5a8f3c
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 0x5a9442
push dword fs:[eax]
mov dword fs:[eax], esp
mov esi, dword [ebx + 0x254]
test esi, esi
je 0x5a8f7c
mov eax, esi
mov edx, dword [0x40f96c]
call fcn.00403130
test al, al
je 0x5a8f7c
mov eax, esi
call fcn.004140c8
mov byte [ebx + 0x200], 0
mov byte [ebx + 0x201], 0
mov byte [ebx + 0x1e6], 0
mov byte [ebx + 0x1c2], 0
cmp byte [ebx + 0x269], 0
je 0x5a8fac
mov cl, 1
xor edx, edx
mov eax, ebx
call fcn.005ac530
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov esi, eax
mov dword [ebx + 0x22c], esi
inc esi
jne 0x5a8fd3
lea eax, [ebp - 8]
push eax
xor ecx, ecx
mov dx, 0x2733
mov eax, ebx
call fcn.005ac6d8
mov al, byte [ebx + 0xc4]
sub al, 1
je 0x5a8fe1
sub al, 2
jne 0x5a8ff7
mov eax, dword [ebx + 0x1a8]
test eax, eax
jle 0x5a8ff7
mov edx, eax
shl edx, 0xa
mov eax, ebx
call fcn.005a7360
xor edx, edx
mov eax, ebx
call fcn.005a8e08
push 0x30
push 0x465
mov eax, dword [ebx + 0x248]
push eax
mov eax, dword [ebx + 0x22c]
push eax
call sub.wsock32.dll_WSAAsyncSelect
mov dl, 1
mov eax, ebx
call fcn.005a7458
mov eax, ebx
call fcn.005ae02c
mov byte [ebx + 0x244], 1
mov byte [ebx + 0x269], 1
cmp word [ebx + 0x4e], 0
je 0x5a9047
mov edx, ebx
mov eax, dword [ebx + 0x50]
call dword [ebx + 0x4c]
mov byte [ebx + 0x215], 0
mov byte [ebx + 0x216], 0
cmp byte [ebx + 0x268], 0
je 0x5a907f
lea edx, [ebp - 8]
mov eax, dword [0x5bbdd0]
call fcn.00405c9c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a6178]
call fcn.0040bbf8
call fcn.00403710
xor esi, esi
mov eax, dword [ebx + 0xec]
mov edx, 0x5a9458
call fcn.00404028
je 0x5a9165
xor eax, eax
push ebp
push 0x5a90bb
push dword fs:[eax]
mov dword fs:[eax], esp
lea ecx, [ebp - 8]
xor edx, edx
mov eax, ebx
call fcn.005ac8c8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5a90e7
cmp dword [ebx + 0x190], 0
jne 0x5a9158
test esi, esi
jg 0x5a90fb
cmp word [ebx + 0x7e], 0
jne 0x5a911e
lea edx, [ebp - 8]
mov eax, dword [0x5bbcd4]
call fcn.00405c9c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a6178]
call fcn.0040bbf8
call fcn.00403710
jmp 0x5a9158
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 0x5a9157
lea edx, [ebp - 8]
mov eax, dword [0x5bbcd4]
call fcn.00405c9c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a6178]
call fcn.0040bbf8
call fcn.00403710
inc esi
cmp dword [ebx + 0x190], 0
je 0x5a9081
mov word [ebx + 0x18c], 2
cmp dword [ebx + 0xcc], 0
jne 0x5a918d
mov ax, word [ebx + 0xf4]
push eax
call sub.wsock32.dll_htons
mov word [ebx + 0x18e], ax
jmp 0x5a91a1
mov ax, word [ebx + 0xd8]
push eax
call sub.wsock32.dll_htons
mov word [ebx + 0x18e], ax
mov byte [ebx + 0x188], 0
mov byte [ebx + 0x159], 1
push 0x10
lea eax, [ebx + 0x18c]
push eax
mov eax, dword [ebx + 0x22c]
push eax
call sub.wsock32.dll_connect
inc eax
jne 0x5a91d8
lea eax, [ebp - 8]
push eax
xor ecx, ecx
mov dx, 0x2733
mov eax, ebx
call fcn.005ac6d8
xor edx, edx
mov eax, ebx
call fcn.005aa9ac
mov dl, 1
mov eax, ebx
call fcn.005accec
cmp byte [ebx + 0x269], 0
je 0x5a9217
cmp byte [ebx + 0x268], 0
jne 0x5a9217
cmp byte [ebx + 0x216], 0
jne 0x5a9217
cmp byte [ebx + 0x215], 0
jne 0x5a9217
cmp byte [ebx + 0x159], 0
jne 0x5a91e1
cmp byte [ebx + 0x269], 0
jne 0x5a9230
cmp byte [ebx + 0x268], 0
jne 0x5a9230
mov byte [ebx + 0x215], 1
mov eax, ebx
call fcn.005aaa04
push 0x23
push 0x465
mov eax, dword [ebx + 0x248]
push eax
mov eax, dword [ebx + 0x22c]
push eax
call sub.wsock32.dll_WSAAsyncSelect
cmp byte [ebx + 0x216], 0
jne 0x5a9270
cmp byte [ebx + 0x215], 0
jne 0x5a9270
cmp byte [ebx + 0x159], 0
jne 0x5a93ee
mov eax, ebx
call fcn.005ac6c0
mov esi, eax
mov cl, 1
xor edx, edx
mov eax, ebx
call fcn.005ac530
mov edx, esi
mov eax, ebx
call fcn.005ac6c8
mov byte [ebx + 0x269], 0
cmp word [ebx + 0x9e], 0
je 0x5a92ac
mov edx, ebx
mov eax, dword [ebx + 0xa0]
call dword [ebx + 0x9c]
cmp byte [ebx + 0xdd], 0
je 0x5a92d6
lea edx, [ebp - 8]
mov eax, dword [0x5bbb48]
call fcn.00405c9c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a61d0]
call fcn.0040bbf8
call fcn.00403710
cmp byte [ebx + 0x159], 0
jne 0x5a933a
mov eax, ebx
call fcn.005ac6c0
cmp eax, 0x2733
jne 0x5a92f9
mov edx, 0x274c
mov eax, ebx
call fcn.005ac6c8
mov eax, ebx
call fcn.005ac6c0
cmp eax, 0x2710
jle 0x5a933a
mov eax, ebx
call fcn.005ac6c0
cmp eax, 0x2736
je 0x5a933a
mov eax, ebx
call fcn.005ac6c0
lea ecx, [ebp - 8]
mov dl, 1
call fcn.004cf5d4
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a6178]
call fcn.0040bbf8
call fcn.00403710
cmp byte [ebx + 0x216], 0
je 0x5a9365
lea ecx, [ebp - 8]
mov dl, 1
mov ax, 0x274c
call fcn.004cf5d4
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a6178]
call fcn.0040bbf8
call fcn.00403710
cmp byte [ebx + 0x159], 0
je 0x5a9398
cmp byte [ebx + 0x268], 0
jne 0x5a9398
lea edx, [ebp - 8]
mov eax, dword [0x5bb894]
call fcn.00405c9c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a6178]
call fcn.0040bbf8
call fcn.00403710
cmp byte [ebx + 0x215], 0
je 0x5a93c2
lea edx, [ebp - 8]
mov eax, dword [0x5bbb48]
call fcn.00405c9c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a6178]
call fcn.0040bbf8
call fcn.00403710
cmp byte [ebx + 0x159], 0
jne 0x5a942c
lea edx, [ebp - 8]
mov eax, dword [0x5bb894]
call fcn.00405c9c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x5a6178]
call fcn.0040bbf8
call fcn.00403710
jmp 0x5a942c
mov al, byte [ebx + 0xdc]
sub al, 0xa
je 0x5a9406
dec al
je 0x5a941c
sub al, 2
je 0x5a9425
sub al, 3
je 0x5a9411
jmp 0x5a942c
xor edx, edx
mov eax, ebx
call fcn.005acdac
jmp 0x5a942c
mov dl, 1
mov eax, ebx
call fcn.005acdac
jmp 0x5a942c
mov eax, ebx
call fcn.005ad240
jmp 0x5a942c
mov eax, ebx
call fcn.005add00
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5a9449
lea eax, [ebp - 8]
call fcn.00403c9c
ret