Function at 0x41d84d
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 0x41dc14
push esi
push edi
mov edi, dword [esp + 0x288]
push 2
pop edx
push 0x17
pop ecx
test edi, 0x10000000
je 0x41d891
mov esi, ecx
and edi, 0xefffffff
mov dword [esp + 0x14], esi
mov dword [esp + 0x288], edi
jmp 0x41d897
mov esi, edx
mov dword [esp + 0x14], edx
test edi, edi
jne 0x41d8a3
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 0x41dc11
push dword [esp + 0x284]
call fcn.0049c5d0
push 0x17
pop edx
mov dword [esp + 0x1c], eax
cmp esi, edx
jne 0x41d93d
cmp dword [0x4ff5b0], ebx
je 0x41dbfd
lea ecx, [esp + 0x68]
push ecx
push eax
push edx
call fcn.0041d7bc
add esp, 0xc
test eax, eax
jg 0x41d933
lea eax, [esp + 0x20]
push eax
xor eax, eax
push eax
push eax
push dword [esp + 0x28]
call dword [0x4ff5bc]
test eax, eax
jne 0x41dbfd
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 [0x4ff5c0]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x28c]
mov dword [esp + 0x14], eax
jmp 0x41d978
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x41d978
push eax
call dword [sym.imp.WSOCK32.DLL_inet_addr]
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x41d968
push dword [esp + 0x1c]
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
test eax, eax
je 0x41d968
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 0x41dbfd
mov esi, dword [esp + 0x294]
cmp dword [esp + 0x298], ebx
jne 0x41d995
xor eax, eax
test esi, esi
je 0x41da0a
cmp word [esi], ax
je 0x41da0a
jmp 0x41d997
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 0x41d9ca
push dword [esp + 0x298]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x3e], ax
xor eax, eax
test esi, esi
je 0x41d9f0
cmp word [esi], ax
je 0x41d9f0
push esi
call fcn.0049c530
mov esi, eax
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
push esi
mov dword [esp + 0x44], eax
call fcn.0049c520
jmp 0x41d9f4
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 0x41dbfd
xor ecx, ecx
inc ecx
cmp edi, ecx
jne 0x41dbb1
mov esi, dword [esp + 0x18]
push 0x17
pop edi
cmp esi, edi
jne 0x41da59
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 0x41da8b
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 0x41db68
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 0x41dbfd
cmp esi, 0x17
jne 0x41dac8
push 0x1c
lea eax, [esp + 0x50]
jmp 0x41dace
push 0x10
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x41dbfd
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 0x41db51
lea eax, [esp + 0x78]
push eax
push ebp
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x41db51
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 0x41db8d
cmp esi, 0x17
jne 0x41db75
push 0x1c
lea eax, [esp + 0x50]
jmp 0x41db7b
push 0x10
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x41dbfd
xor ebx, ebx
inc ebx
xor esi, esi
test ebx, ebx
je 0x41dbfd
push 0x10
push esi
push dword [0x4fe824]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x41dbfd
mov dword [ebx], 1
mov dword [ebx + 8], ebp
jmp 0x41dbfa
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 0x41dbfd
push 0x20
xor esi, esi
push esi
push dword [0x4fe824]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x41dbfd
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.0049c5c0
test ebx, ebx
jne 0x41dc11
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