Function at 0x4afeb4
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
mov eax, 0x4caeec
call fcn.00491128
mov edx, dword [ebp + 8]
cmp byte [edx + 0x70], 0
je 0x4afede
mov ecx, dword [ebp - 0x2c]
mov dword fs:[0], ecx
mov eax, ecx
jmp 0x4b010f
mov edx, dword [ebp + 8]
mov al, byte [edx + 0x59]
push eax
push dword [ebp + 8]
call sym.TCP232.exe__TcmSocket_Create_q17TcmSocketProtocol
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx + 0x88], eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x88], 0xffffffff
jne 0x4aff13
mov eax, dword [ebp - 0x2c]
mov dword fs:[0], eax
jmp 0x4b010f
mov edx, dword [ebp + 8]
cmp byte [edx + 0x58], 1
jne 0x4aff4b
mov dword [ebp - 0x30], 1
push 0x4ca05c
lea ecx, [ebp - 0x30]
push ecx
push 0x8004667e
mov eax, dword [ebp + 8]
push dword [eax + 0x88]
call sub.WSOCK32.DLL_ioctlsocket
push eax
push dword [ebp + 8]
call sym.TCP232.exe__TcmSocket_ErrorCheck_qipc
add esp, 0xc
mov edx, dword [ebp + 8]
cmp byte [edx + 0x59], 2
jne 0x4aff76
mov dword [ebp - 0x34], 1
push 4
lea ecx, [ebp - 0x34]
push ecx
push 0x20
push 0xffff
mov eax, dword [ebp + 8]
push dword [eax + 0x88]
call sub.WSOCK32.DLL_setsockopt
mov word [ebp - 0x1c], 8
lea eax, [ebp - 4]
xor edx, edx
call fcn.0049c2b0
inc dword [ebp - 0x10]
lea edx, [ebp - 4]
mov eax, dword [ebp + 8]
add eax, 0x78
call fcn.0049c3c4
test al, al
jne 0x4affae
mov eax, dword [ebp + 8]
add eax, 0x78
call fcn.0040337c
test al, al
jne 0x4affae
xor edx, edx
jmp 0x4affb3
mov edx, 1
push edx
dec dword [ebp - 0x10]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0049c2f4
pop ecx
test cl, cl
je 0x4b0003
mov word [ebp - 0x1c], 0x14
push 0xffffffffffffffff
lea eax, [ebp - 8]
call fcn.00401e30
push eax
inc dword [ebp - 0x10]
call sym.TCP232.exe__TcmSocket_HostIP_qul
add esp, 8
lea edx, [ebp - 8]
mov eax, dword [ebp + 8]
add eax, 0x78
call fcn.0049c324
dec dword [ebp - 0x10]
lea eax, [ebp - 8]
mov edx, 2
call fcn.0049c2f4
mov ecx, dword [ebp + 8]
push dword [ecx + 0x80]
mov eax, dword [ebp + 8]
add eax, 0x78
call fcn.00402650
push eax
push dword [ebp + 8]
call sym.TCP232.exe__TcmSocket_Bind_qpcui
add esp, 0xc
mov edx, dword [ebp + 8]
mov byte [edx + 0x72], al
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x72], 0
je 0x4b00e4
mov eax, dword [ebp + 8]
cmp byte [eax + 0x59], 4
jne 0x4b0057
push 5
push dword [ebp + 8]
call sym.TCP232.exe__TcmSocket_Listen_qi
add esp, 8
mov edx, dword [ebp + 8]
mov byte [edx + 0x70], al
jmp 0x4b00e4
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x59], 5
jne 0x4b0088
mov eax, dword [ebp + 8]
push dword [eax + 0x84]
mov eax, dword [ebp + 8]
add eax, 0x7c
call fcn.00402650
push eax
push dword [ebp + 8]
call sym.TCP232.exe__TcmSocket_Connect_qpcui
add esp, 0xc
mov edx, dword [ebp + 8]
mov byte [edx + 0x70], al
jmp 0x4b00e4
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x59], 2
jne 0x4b00dd
mov eax, dword [ebp + 8]
add eax, 0x7c
call fcn.0040337c
test al, al
jne 0x4b00d4
mov edx, dword [ebp + 8]
cmp dword [edx + 0x84], 0
jle 0x4b00d4
mov ecx, dword [ebp + 8]
push dword [ecx + 0x84]
mov eax, dword [ebp + 8]
add eax, 0x7c
call fcn.00402650
push eax
push dword [ebp + 8]
call sym.TCP232.exe__TcmSocket_Connect_qpcui
add esp, 0xc
mov edx, dword [ebp + 8]
mov byte [edx + 0x70], al
jmp 0x4b00e4
mov ecx, dword [ebp + 8]
mov byte [ecx + 0x70], 1
jmp 0x4b00e4
mov eax, dword [ebp + 8]
mov byte [eax + 0x70], 1
mov edx, dword [ebp + 8]
cmp byte [edx + 0x70], 0
je 0x4b00fa
push 1
push dword [ebp + 8]
call sym.TCP232.exe__TcmSocket_DeclareConnect_qo
add esp, 8
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [ecx + 0x8c], eax
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret