Function at 0x410d70
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x33c
mov eax, dword [0x4fa078]
xor eax, esp
mov dword [esp + 0x338], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [esp + 0xc]
push esi
mov esi, dword [ebp + 0xc]
push edi
push eax
push 0x8004667e
mov edi, ecx
mov dword [esp + 0x1c], 1
push ebx
mov dword [esp + 0x18], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push dword [esi + 0x10]
push dword [esi + 0x18]
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x410f19
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x410df6
mov eax, dword [edi + 4]
mov dword [eax], 2
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x338]
xor ecx, esp
call fcn.0044b735
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi + 0xc]
lea esi, [esp + 0x28]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], 1
mov ebx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 8]
lea edi, [esp + 0x130]
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
mov eax, ecx
mov ecx, 0x41
mov dword [esp + 0x10], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41
mov dword [esp + 0x18], edx
lea esi, [esp + 0x28]
mov dword [esp + 0x1c], ebx
lea edi, [esp + 0x238]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.WS2_32.dll_select]
lea ecx, [esp + 0x18]
inc eax
push ecx
lea ecx, [esp + 0x23c]
push ecx
lea ecx, [esp + 0x138]
push ecx
lea ecx, [esp + 0x34]
push ecx
push eax
call edi
mov esi, eax
test esi, esi
jns 0x410e8b
call fcn.004aed31
cmp dword [eax], 4
jne 0x410e89
mov eax, dword [esp + 0x10]
jmp 0x410e55
test esi, esi
jne 0x410e94
mov ecx, 0xd
jmp 0x410f01
test esi, esi
jle 0x410efc
mov esi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x14]
call esi
test eax, eax
jne 0x410ebf
lea eax, [esp + 0x130]
push eax
push dword [esp + 0x14]
call esi
test eax, eax
je 0x410efc
lea eax, [esp + 0x24]
mov dword [esp + 0x14], 0
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x28], 4
push eax
push 0x1007
push 0xffff
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
js 0x410efc
cmp dword [esp + 0x14], 0
jne 0x410efc
xor ecx, ecx
jmp 0x410f01
mov ecx, 2
mov edi, dword [esp + 0xc]
mov eax, dword [edi + 4]
mov dword [eax], ecx
mov eax, dword [edi + 4]
cmp dword [eax], 0
jne 0x410ddd
mov ebx, dword [ebp + 8]
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [edi + 0x14]
push 0
push 0x3e8
push dword [eax + 4]
push dword [eax]
call fcn.004c5270
mov ecx, dword [edi + 0x10]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
imul ecx, dword [ecx], 0x3e8
add eax, ecx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
push 0x1006
push 0xffff
push ebx
call esi
mov eax, dword [edi + 0x1c]
push 0
push 0x3e8
push dword [eax + 4]
push dword [eax]
call fcn.004c5270
mov ecx, dword [edi + 0x18]
push 4
imul ecx, dword [ecx], 0x3e8
add eax, ecx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
push 0x1005
push 0xffff
push ebx
call esi
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x344]
pop edi
pop esi
pop ebx
mov dword [eax], 0
xor ecx, esp
mov al, 1
call fcn.0044b735
mov esp, ebp
pop ebp
ret 8