Function at 0x41e81b
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 0x41ebe2
push esi
push edi
mov edi, dword [esp + 0x288]
push 2
pop edx
push 0x17
pop ecx
test edi, 0x10000000
je 0x41e85f
mov esi, ecx
and edi, 0xefffffff
mov dword [esp + 0x14], esi
mov dword [esp + 0x288], edi
jmp 0x41e865
mov esi, edx
mov dword [esp + 0x14], edx
test edi, edi
jne 0x41e871
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 0x41ebdf
push dword [esp + 0x284]
call fcn.0049dae0
push 0x17
pop edx
mov dword [esp + 0x1c], eax
cmp esi, edx
jne 0x41e90b
cmp dword [0x4ffbac], ebx
je 0x41ebcb
lea ecx, [esp + 0x68]
push ecx
push eax
push edx
call fcn.0041e78a
add esp, 0xc
test eax, eax
jg 0x41e901
lea eax, [esp + 0x20]
push eax
xor eax, eax
push eax
push eax
push dword [esp + 0x28]
call dword [0x4ffbb8]
test eax, eax
jne 0x41ebcb
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 [0x4ffbbc]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x28c]
mov dword [esp + 0x14], eax
jmp 0x41e946
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x41e946
push eax
call dword [sym.imp.WSOCK32.DLL_inet_addr]
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x41e936
push dword [esp + 0x1c]
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
test eax, eax
je 0x41e936
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 0x41ebcb
mov esi, dword [esp + 0x294]
cmp dword [esp + 0x298], ebx
jne 0x41e963
xor eax, eax
test esi, esi
je 0x41e9d8
cmp word [esi], ax
je 0x41e9d8
jmp 0x41e965
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 0x41e998
push dword [esp + 0x298]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x3e], ax
xor eax, eax
test esi, esi
je 0x41e9be
cmp word [esi], ax
je 0x41e9be
push esi
call fcn.0049da40
mov esi, eax
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
push esi
mov dword [esp + 0x44], eax
call fcn.0049da30
jmp 0x41e9c2
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 0x41ebcb
xor ecx, ecx
inc ecx
cmp edi, ecx
jne 0x41eb7f
mov esi, dword [esp + 0x18]
push 0x17
pop edi
cmp esi, edi
jne 0x41ea27
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 0x41ea59
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 0x41eb36
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 0x41ebcb
cmp esi, 0x17
jne 0x41ea96
push 0x1c
lea eax, [esp + 0x50]
jmp 0x41ea9c
push 0x10
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x41ebcb
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 0x41eb1f
lea eax, [esp + 0x78]
push eax
push ebp
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x41eb1f
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 0x41eb5b
cmp esi, 0x17
jne 0x41eb43
push 0x1c
lea eax, [esp + 0x50]
jmp 0x41eb49
push 0x10
lea eax, [esp + 0x30]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x41ebcb
xor ebx, ebx
inc ebx
xor esi, esi
test ebx, ebx
je 0x41ebcb
push 0x10
push esi
push dword [0x4fedf4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x41ebcb
mov dword [ebx], 1
mov dword [ebx + 8], ebp
jmp 0x41ebc8
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 0x41ebcb
push 0x20
xor esi, esi
push esi
push dword [0x4fedf4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x41ebcb
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.0049dad0
test ebx, ebx
jne 0x41ebdf
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