Function at 0x1003d980
Capabilities:
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc0
mov ebx, dword [edx]
mov dword [esp + 0x90], edx
mov esi, ecx
mov eax, 0x17
mov edi, 2
mov ecx, dword [0x104dec4c]
cmp ebx, 1
cmove edi, eax
cmp ecx, 3
jne 0x1003dc90
push 1
push 0
push 0
push 6
push 1
push edi
call sub.WS2_32.dll_WSASocketW
cmp eax, 0xffffffff
je 0x1003db44
mov edi, eax
push 0
push 1
push eax
call sub.KERNEL32.dll_SetHandleInformation
test eax, eax
je 0x1003db4f
cmp byte [ebp + 0x10], 0
je 0x1003da0d
mov dword [esp], 1
mov eax, esp
push 4
push eax
push 4
push 0xffff
push edi
call sub.WS2_32.dll_setsockopt
test eax, eax
jne 0x1003dfd6
test ebx, ebx
je 0x1003db71
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
je 0x1003dcbb
mov ebx, edi
mov edi, dword [eax + 9]
mov ecx, dword [eax + 1]
mov edx, dword [eax + 5]
mov eax, dword [eax + 0xd]
mov dword [esp], 0x17
mov dword [esp + 4], 0
mov dword [esp + 0x94], edi
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 0x10], edi
mov edi, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x80], 0x1c
mov eax, esp
push 0x1c
push eax
push ebx
jmp 0x1003dfcd
call sub.WS2_32.dll_WSAGetLastError
mov ebx, eax
xor edi, edi
jmp 0x1003db60
call sub.KERNEL32.dll_GetLastError
mov ebx, eax
mov eax, edi
xor edi, edi
push eax
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], edi
mov dword [esi + 8], ebx
mov dword [esi], 1
jmp 0x1003e04e
mov eax, dword [ebp + 8]
cmp dword [eax], 1
jne 0x1003dd2a
mov eax, dword [eax + 4]
mov dword [esp], 2
mov dword [esp + 4], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x80], 0x10
mov eax, esp
push 0x10
push eax
jmp 0x1003dfcc
lea eax, [esp + 0x94]
mov byte [esp + 0x94], 1
mov edx, esp
mov ecx, 0x104dec4c
mov dword [esp], eax
push 0x104214e8
call fcn.100fb490
add esp, 4
jmp 0x1003d9b9
mov dword [esp + 0x98], 0x17
mov dword [esp + 0x8c], edi
lea eax, [esp + 0x94]
lea ecx, [esp + 0x98]
mov dword [esp + 0xa0], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xb0], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0x94], 1
jmp 0x1003dd76
lea eax, [esp + 0x94]
lea ecx, [esp + 0x98]
mov dword [esp + 0x98], 2
mov dword [esp + 0x8c], edi
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x94], 0
mov ebx, dword [eax]
movsd xmm0, qword [esp + 0xa8]
movzx ecx, word [ecx + 2]
mov eax, dword [esp + 0x9c]
mov edx, dword [esp + 0xa0]
mov edi, dword [esp + 0xa4]
cmp ebx, 1
movsd qword [esp + 0xb4], xmm0
jne 0x1003deb6
mov word [esp], 0x17
mov word [esp + 2], cx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov ebx, dword [esp + 0xb0]
mov eax, dword [esp + 0xb4]
mov edx, dword [esp + 0xb8]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x7c], 0
mov eax, 0x1c
jmp 0x1003dfba
mov word [esp], 2
mov word [esp + 2], cx
mov dword [esp + 4], eax
mov eax, 0x10
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
mov edi, dword [esp + 0x8c]
mov dword [esp + 0x80], eax
mov ecx, esp
push eax
push ecx
push edi
call sub.WS2_32.dll_bind
test eax, eax
je 0x1003dff3
call sub.WS2_32.dll_WSAGetLastError
mov dword [esi + 8], eax
mov dword [esi + 4], 0
mov dword [esi], 1
push edi
call sub.WS2_32.dll_closesocket
jmp 0x1003e04e
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x90]
movsd xmm1, qword [eax + 8]
movsd xmm0, qword [eax + 0x10]
movsd xmm2, qword [eax]
movsd xmm3, qword [ecx]
movsd qword [esi + 0x10], xmm1
movsd xmm1, qword [ecx + 8]
movsd qword [esi + 8], xmm2
movsd qword [esi + 0x18], xmm0
mov dword [esi + 0x20], edi
movsd xmm2, qword [ecx + 0x10]
movsd qword [esi + 0x24], xmm3
movsd qword [esi + 0x2c], xmm1
movsd xmm1, qword [ecx + 0x18]
movsd qword [esi + 0x34], xmm2
movsd qword [esi + 0x3c], xmm1
mov byte [esi + 0x44], 0
mov dword [esi], 0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret