Function at 0x40dbe4
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
mov eax, 0x4c8be4
call fcn.004b66dc
mov edx, dword [ebp + 8]
cmp byte [edx + 0x84], 0
je 0x40dc11
mov ecx, dword [ebp - 0x2c]
mov dword fs:[0], ecx
mov eax, ecx
jmp 0x40de5d
mov edx, dword [ebp + 8]
mov al, byte [edx + 0x61]
push eax
push dword [ebp + 8]
call sym.Project1.exe__TcmSocket_Create_q17TcmSocketProtocol
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx + 0x98], eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x98], 0xffffffff
jne 0x40dc46
mov eax, dword [ebp - 0x2c]
mov dword fs:[0], eax
jmp 0x40de5d
mov edx, dword [ebp + 8]
cmp byte [edx + 0x60], 1
jne 0x40dc7e
mov dword [ebp - 0x30], 1
push str.ioctlsocket___set_block_mode_error
lea ecx, [ebp - 0x30]
push ecx
push 0x8004667e
mov eax, dword [ebp + 8]
push dword [eax + 0x98]
call sub.WSOCK32.DLL_ioctlsocket
push eax
push dword [ebp + 8]
call sym.Project1.exe__TcmSocket_ErrorCheck_qipc
add esp, 0xc
mov edx, dword [ebp + 8]
cmp byte [edx + 0x61], 2
jne 0x40dca9
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 + 0x98]
call sub.WSOCK32.DLL_setsockopt
mov word [ebp - 0x1c], 8
lea eax, [ebp - 4]
xor edx, edx
call fcn.004c1984
inc dword [ebp - 0x10]
lea edx, [ebp - 4]
mov eax, dword [ebp + 8]
add eax, 0x88
call fcn.004c1b18
test al, al
jne 0x40dce5
mov eax, dword [ebp + 8]
add eax, 0x88
call fcn.0040b0a8
test al, al
jne 0x40dce5
xor edx, edx
jmp 0x40dcea
mov edx, 1
push edx
dec dword [ebp - 0x10]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c1a34
pop ecx
test cl, cl
je 0x40dd3c
mov word [ebp - 0x1c], 0x14
push 0xffffffffffffffff
lea eax, [ebp - 8]
call fcn.0040a760
push eax
inc dword [ebp - 0x10]
call sym.Project1.exe__TcmSocket_HostIP_qul
add esp, 8
lea edx, [ebp - 8]
mov eax, dword [ebp + 8]
add eax, 0x88
call fcn.004c1a64
dec dword [ebp - 0x10]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004c1a34
mov ecx, dword [ebp + 8]
push dword [ecx + 0x90]
mov eax, dword [ebp + 8]
add eax, 0x88
call fcn.0040a740
push eax
push dword [ebp + 8]
call sym.Project1.exe__TcmSocket_Bind_qpcui
add esp, 0xc
mov edx, dword [ebp + 8]
mov byte [edx + 0x85], al
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x85], 0
je 0x40de3a
mov eax, dword [ebp + 8]
cmp byte [eax + 0x61], 4
jne 0x40dd9b
push 5
push dword [ebp + 8]
call sym.Project1.exe__TcmSocket_Listen_qi
add esp, 8
mov edx, dword [ebp + 8]
mov byte [edx + 0x84], al
jmp 0x40de3a
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x61], 5
jne 0x40ddd1
mov eax, dword [ebp + 8]
push dword [eax + 0x94]
mov eax, dword [ebp + 8]
add eax, 0x8c
call fcn.0040a740
push eax
push dword [ebp + 8]
call sym.Project1.exe__TcmSocket_Connect_qpcui
add esp, 0xc
mov edx, dword [ebp + 8]
mov byte [edx + 0x84], al
jmp 0x40de3a
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x61], 2
jne 0x40de30
mov eax, dword [ebp + 8]
add eax, 0x8c
call fcn.0040b0a8
test al, al
jne 0x40de24
mov edx, dword [ebp + 8]
cmp dword [edx + 0x94], 0
jle 0x40de24
mov ecx, dword [ebp + 8]
push dword [ecx + 0x94]
mov eax, dword [ebp + 8]
add eax, 0x8c
call fcn.0040a740
push eax
push dword [ebp + 8]
call sym.Project1.exe__TcmSocket_Connect_qpcui
add esp, 0xc
mov edx, dword [ebp + 8]
mov byte [edx + 0x84], al
jmp 0x40de3a
mov ecx, dword [ebp + 8]
mov byte [ecx + 0x84], 1
jmp 0x40de3a
mov eax, dword [ebp + 8]
mov byte [eax + 0x84], 1
mov edx, dword [ebp + 8]
cmp byte [edx + 0x84], 0
je 0x40de53
push 1
push dword [ebp + 8]
call sym.Project1.exe__TcmSocket_DeclareConnect_qo
add esp, 8
mov ecx, dword [ebp - 0x2c]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret