Function at 0x1003a6c0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10137ac8
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x101b2070]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, edx
lea ebx, [edi + 0x94]
call fcn.1003b170
mov ecx, dword [edi + 0x14]
mov dword [ebp - 0x10], eax
mov dword [eax + 0x1c], ecx
mov eax, dword [ebp + 0xc]
push eax
push esi
mov eax, edi
call fcn.10038b80
mov ebx, eax
lea eax, [ebx + 0x54]
push eax
mov dword [ebp + 0xc], ebx
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
push ecx
push edx
push esi
push edi
mov esi, ebx
call fcn.10038d30
cmp dword [edi + 0x48], 0
mov esi, 1
mov dword [ebp + 0x14], esi
je 0x1003a7ae
mov eax, dword [ebx + 0x88]
lea ecx, [ebp + 8]
push ecx
push 0x8004667e
push eax
mov dword [ebp + 8], esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x1003a76e
push 0x80004005
call fcn.10002670
mov edx, dword [edi + 0x4c]
mov eax, dword [ebx + 0x88]
push 0
push ebx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
je 0x1003a7a3
mov ecx, dword [edi + 0x3c]
mov eax, dword [ebp - 0x10]
mov esi, dword [ebx + 0x88]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.10034800
add esp, 4
jmp 0x1003a858
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1003a858
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebx + 0x88]
xor eax, eax
cmp word [ecx], 2
setne al
dec eax
and eax, 0xfffffff4
add eax, 0x1c
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1003a852
mov eax, dword [ebx + 0x88]
lea ecx, [ebp + 0x10]
push ecx
push 0x8004667e
push eax
mov dword [ebp + 0x10], esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x1003a7fc
push 0x80004005
call fcn.10002670
mov edx, dword [edi + 0x4c]
mov eax, dword [ebx + 0x88]
push 0
push ebx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
je 0x1003a7a3
mov dword [ebx + 0x48], esi
mov ecx, ebx
mov ebx, edi
call fcn.100381f0
cmp eax, 2
je 0x1003a83e
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
push ecx
push edi
call fcn.1003a160
mov ebx, dword [ebp + 0xc]
mov dword [ebp + 0x14], 0
jmp 0x1003a858
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1003a84d
mov eax, 0x4c7
mov ebx, dword [ebp + 0xc]
jmp 0x1003a858
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
test esi, esi
je 0x1003a897
cmp dword [ebp + 0x14], 0
je 0x1003a897
push 0
push 0
push 0
push edi
mov eax, ebx
call fcn.10038c50
mov edx, dword [ebp - 0x10]
push edx
add edi, 0xb0
call fcn.10041140
test eax, eax
jne 0x1003a897
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [eax + 0x14]
mov ecx, dword [eax]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10