Function at 0x41dcdd
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 0x41e0a4
push esi
push edi
mov edi, dword [esp + 0x288]
push 2
pop edx
push 0x17
pop ecx
test edi, 0x10000000
je 0x41dd21
mov esi, ecx
and edi, 0xefffffff
mov dword [esp + 0x14], esi
mov dword [esp + 0x288], edi
jmp 0x41dd27
mov esi, edx
mov dword [esp + 0x14], edx
test edi, edi
jne 0x41dd33
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 0x41e0a1
push dword [esp + 0x284]
call fcn.0049c6f0
push 0x17
pop edx
mov dword [esp + 0x1c], eax
cmp esi, edx
jne 0x41ddcd
cmp dword [0x4fe9e4], ebx
je 0x41e08d
lea ecx, [esp + 0x68]
push ecx
push eax
push edx
call fcn.0041dc4c
add esp, 0xc
test eax, eax
jg 0x41ddc3
lea eax, [esp + 0x20]
push eax
xor eax, eax
push eax
push eax
push dword [esp + 0x28]
call dword [0x4fe9f0]
test eax, eax
jne 0x41e08d
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 [0x4fe9f4]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x28c]
mov dword [esp + 0x14], eax
jmp 0x41de08
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x41de08
push eax
call dword [sym.imp.WSOCK32.DLL_inet_addr]
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x41ddf8
push dword [esp + 0x1c]
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
test eax, eax
je 0x41ddf8
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 0x41e08d
mov esi, dword [esp + 0x294]
cmp dword [esp + 0x298], ebx
jne 0x41de25
xor eax, eax
test esi, esi
je 0x41de9a
cmp word [esi], ax
je 0x41de9a
jmp 0x41de27
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 0x41de5a
push dword [esp + 0x298]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x3e], ax
xor eax, eax
test esi, esi
je 0x41de80
cmp word [esi], ax
je 0x41de80
push esi
call fcn.0049c650
mov esi, eax
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
push esi
mov dword [esp + 0x44], eax
call fcn.0049c640
jmp 0x41de84
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 0x41e08d
xor ecx, ecx
inc ecx
cmp edi, ecx
jne 0x41e041
mov esi, dword [esp + 0x18]
push 0x17
pop edi
cmp esi, edi
jne 0x41dee9
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 0x41df1b
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 0x41dff8
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 0x41e08d
cmp esi, 0x17
jne 0x41df58
push 0x1c
lea eax, [esp + 0x50]
jmp 0x41df5e
push 0x10
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x41e08d
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 0x41dfe1
lea eax, [esp + 0x78]
push eax
push ebp
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x41dfe1
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 0x41e01d
cmp esi, 0x17
jne 0x41e005
push 0x1c
lea eax, [esp + 0x50]
jmp 0x41e00b
push 0x10
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x41e08d
xor ebx, ebx
inc ebx
xor esi, esi
test ebx, ebx
je 0x41e08d
push 0x10
push esi
push dword [0x4fdca4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x41e08d
mov dword [ebx], 1
mov dword [ebx + 8], ebp
jmp 0x41e08a
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 0x41e08d
push 0x20
xor esi, esi
push esi
push dword [0x4fdca4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x41e08d
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.0049c6e0
test ebx, ebx
jne 0x41e0a1
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