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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xd58775
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0xd5f010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x40]
xorps xmm0, xmm0
mov dword [ebp - 0x5c], 0
movlpd qword [ebp - 0x50], xmm0
movlpd qword [ebp - 0x48], xmm0
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x54], 0
call fcn.00d415e0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x37c]
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
push ecx
cmovae eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x60]
push ecx
push eax
push esi
call dword [sym.imp.ws2_32.dll_getaddrinfo]
test eax, eax
jne 0xd49ecc
mov esi, dword [ebp - 0x37c]
mov dword [ebp - 0x380], esi
test esi, esi
je 0xd49ec5
mov edi, dword [sym.imp.ws2_32.dll_setsockopt]
nop dword [eax]
push 0x80
push 0
push 0
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.ws2_32.dll_WSASocketW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0xd49d29
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.ws2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0xd49eae
cmp byte [ebp + 0xc], 0
je 0xd49d43
push 4
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
push 1
push 6
push ebx
call edi
mov ecx, dword [ebp + 0x34]
test ecx, ecx
je 0xd49d56
mov dword [ebp - 0x14], ebx
lea edx, [ebp - 0x14]
mov eax, dword [ecx]
push edx
call dword [eax + 8]
cmp dword [esi + 4], 0x17
jne 0xd49d70
push 4
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0x1b
push 0x29
push ebx
call edi
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
push 0x8004667e
push ebx
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 0xd49efb
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0xd49e97
mov eax, dword [ebp + 0x40]
lea esi, [ebp - 0x168]
mov dword [ebp - 0x164], ebx
lea edi, [ebp - 0x270]
mov dword [ebp - 0x168], 1
mov ecx, dword [eax]
mov eax, dword [ebp + 0x3c]
mov dword [ebp - 0x18], ecx
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov edx, dword [eax]
mov ecx, 0x41
mov eax, dword [ebp - 0x18]
lea esi, [ebp - 0x168]
lea edi, [ebp - 0x378]
mov dword [ebp - 0x28], edx
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x24], eax
nop dword [eax]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x378]
push eax
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x168]
push eax
lea eax, [ebx + 1]
push eax
call dword [sym.imp.ws2_32.dll_select]
mov esi, eax
test esi, esi
jns 0xd49e36
call dword [sym.imp.ucrtbase.dll__errno]
cmp dword [eax], 4
je 0xd49e00
test esi, esi
jle 0xd49e8b
mov esi, dword [sym.imp.ws2_32.dll___WSAFDIsSet]
lea eax, [ebp - 0x168]
push eax
push ebx
call esi
test eax, eax
jne 0xd49e5a
lea eax, [ebp - 0x270]
push eax
push ebx
call esi
test eax, eax
je 0xd49e8b
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], 4
push eax
push 0x1007
push 0xffff
push ebx
call dword [sym.imp.ws2_32.dll_getsockopt]
test eax, eax
js 0xd49e8b
cmp dword [ebp - 0x1c], 0
je 0xd49efb
mov edi, dword [sym.imp.ws2_32.dll_setsockopt]
mov esi, dword [ebp - 0x380]
push ebx
call dword [sym.imp.ws2_32.dll_closesocket]
mov eax, dword [ebp + 0x44]
push ebx
mov dword [eax], 2
call dword [sym.imp.ws2_32.dll_closesocket]
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x380], esi
test esi, esi
jne 0xd49cf0
mov esi, dword [ebp - 0x37c]
push esi
call dword [sym.imp.ws2_32.dll_freeaddrinfo]
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x10
jb 0xd49f33
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0xd49f29
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0xd49f29
call dword [sym.imp.ucrtbase.dll__invalid_parameter_noinfo_noreturn]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0x8004667e
push ebx
call dword [sym.imp.ws2_32.dll_ioctlsocket]
mov eax, dword [ebp + 0x44]
mov dword [eax], 0
push dword [ebp - 0x37c]
call dword [sym.imp.ws2_32.dll_freeaddrinfo]
jmp 0xd49ecf
push ecx
push edx
call fcn.00d56dab
add esp, 8
mov ecx, dword [ebp + 0x34]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
test ecx, ecx
je 0xd49f5d
mov edx, dword [ecx]
lea eax, [ebp + 0x10]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00d56a37
mov esp, ebp
pop ebp
ret