Function at 0x41d80b
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x270
xor eax, eax
push ebx
mov ebx, eax
cmp dword [esp + 0x278], eax
je 0x41dbd2
push esi
push edi
mov edi, dword [esp + 0x288]
push 2
pop edx
push 0x17
pop ecx
test edi, 0x10000000
je 0x41d84f
mov esi, ecx
and edi, 0xefffffff
mov dword [esp + 0x14], esi
mov dword [esp + 0x288], edi
jmp 0x41d855
mov esi, edx
mov dword [esp + 0x14], edx
test edi, edi
jne 0x41d861
inc edi
mov dword [esp + 0x288], edi
push ebp
push eax
push edi
push esi
call dword [sym.imp.WSOCK32.DLL_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x41dbcf
push dword [esp + 0x284]
call fcn.0049c760
push 0x17
pop edx
mov dword [esp + 0x1c], eax
cmp esi, edx
jne 0x41d8fb
cmp dword [0x4fe6f4], ebx
je 0x41dbbb
lea ecx, [esp + 0x68]
push ecx
push eax
push edx
call fcn.0041d77a
add esp, 0xc
test eax, eax
jg 0x41d8f1
lea eax, [esp + 0x20]
push eax
xor eax, eax
push eax
push eax
push dword [esp + 0x28]
call dword [0x4fe700]
test eax, eax
jne 0x41dbbb
mov eax, dword [esp + 0x20]
lea edi, [esp + 0x68]
push eax
mov esi, dword [eax + 0x18]
add esi, 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [0x4fe704]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x28c]
mov dword [esp + 0x14], eax
jmp 0x41d936
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x41d936
push eax
call dword [sym.imp.WSOCK32.DLL_inet_addr]
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x41d926
push dword [esp + 0x1c]
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
test eax, eax
je 0x41d926
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov esi, dword [eax]
mov dword [esp + 0x14], esi
xor eax, eax
cmp esi, 0xffffffff
setne al
test eax, eax
je 0x41dbbb
mov esi, dword [esp + 0x294]
cmp dword [esp + 0x298], ebx
jne 0x41d953
xor eax, eax
test esi, esi
je 0x41d9c8
cmp word [esi], ax
je 0x41d9c8
jmp 0x41d955
xor eax, eax
push 0x10
push eax
lea eax, [esp + 0x44]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
mov word [esp + 0x3c], ax
cmp dword [esp + 0x298], ebx
je 0x41d988
push dword [esp + 0x298]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x3e], ax
xor eax, eax
test esi, esi
je 0x41d9ae
cmp word [esi], ax
je 0x41d9ae
push esi
call fcn.0049c6c0
mov esi, eax
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
push esi
mov dword [esp + 0x44], eax
call fcn.0049c6b0
jmp 0x41d9b2
mov dword [esp + 0x40], eax
push 0x10
lea eax, [esp + 0x40]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_bind]
test eax, eax
jne 0x41dbbb
xor ecx, ecx
inc ecx
cmp edi, ecx
jne 0x41db6f
mov esi, dword [esp + 0x18]
push 0x17
pop edi
cmp esi, edi
jne 0x41da17
push 0x1c
push eax
lea eax, [esp + 0x54]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [esp + 0x4c], di
push dword [esp + 0x288]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x4e], ax
lea esi, [esp + 0x68]
lea edi, [esp + 0x54]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x18]
jmp 0x41da49
push 0x10
push eax
lea eax, [esp + 0x34]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
push dword [esp + 0x288]
mov word [esp + 0x30], ax
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x2e], ax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x30], eax
mov edi, dword [esp + 0x290]
test edi, edi
jle 0x41db26
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 1
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x41dbbb
cmp esi, 0x17
jne 0x41da86
push 0x1c
lea eax, [esp + 0x50]
jmp 0x41da8c
push 0x10
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x41dbbb
xor eax, eax
mov dword [esp + 0x7c], ebp
inc eax
mov dword [esp + 0x180], ebp
mov dword [esp + 0x78], eax
mov ecx, 0x3e8
mov dword [esp + 0x17c], eax
xor esi, esi
mov eax, edi
cdq
idiv ecx
mov dword [esp + 0x24], eax
imul eax, eax, 0x3e8
sub edi, eax
imul eax, edi, 0x3e8
mov dword [esp + 0x28], eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x180]
push eax
lea eax, [esp + 0x80]
push eax
push esi
lea eax, [ebp + 1]
push eax
call dword [sym.imp.WSOCK32.DLL_select]
cmp eax, 1
jne 0x41db0f
lea eax, [esp + 0x78]
push eax
push ebp
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x41db0f
xor ebx, ebx
inc ebx
lea eax, [esp + 0x10]
mov dword [esp + 0x10], esi
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
jmp 0x41db4b
cmp esi, 0x17
jne 0x41db33
push 0x1c
lea eax, [esp + 0x50]
jmp 0x41db39
push 0x10
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x41dbbb
xor ebx, ebx
inc ebx
xor esi, esi
test ebx, ebx
je 0x41dbbb
push 0x10
push esi
push dword [0x4fd974]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x41dbbb
mov dword [ebx], 1
mov dword [ebx + 8], ebp
jmp 0x41dbb8
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ecx
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x41dbbb
push 0x20
xor esi, esi
push esi
push dword [0x4fd974]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x41dbbb
push 2
pop eax
mov dword [ebx], eax
mov eax, dword [esp + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x288]
mov dword [ebx + 0x10], ebp
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], esi
push dword [esp + 0x1c]
call fcn.0049c750
test ebx, ebx
jne 0x41dbcf
push ebp
call dword [sym.imp.WSOCK32.DLL_closesocket]
pop ebp
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x270
ret 0x18