Function at 0x10079660
Capabilities:
Check mutex on windows
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x10415990]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0
push 0
mov edi, edx
mov edx, dword [0x1045b910]
push edi
push esi
push str.MSPSocket_New__d___d___in_
push 0x111
push 0x104409b0
push edx
mov dword [ebp - 0x60], eax
mov eax, dword [0x1045b8f0]
push 2
push eax
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x4c], 0
call fcn.10062060
push 0x780
call dword [sym.imp.MSVCR100.dll_malloc]
mov ebx, eax
add esp, 0x2c
test ebx, ebx
jne 0x100796d8
mov dword [ebp - 0x4c], 0x2785
jmp 0x100799e2
push 0x778
push 0
push ebx
call sub.MSVCR100.dll_memset
add esp, 0xc
push ebx
push str.MSPSocket_Send__x
lea ecx, [ebp - 0x48]
push 0x40
push ecx
call fcn.1005f880
add esp, 0x10
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebx + 0x4c], eax
test eax, eax
jne 0x100797b5
mov edx, dword [0x1045b910]
push eax
push eax
push eax
push eax
push str.alloc_send_lock_failed_
push 0x11d
push 0x10440a54
push edx
push eax
mov eax, dword [0x1045b8f0]
push eax
call fcn.10062060
add esp, 0x28
mov dword [ebp - 0x4c], 0x2785
mov eax, dword [ebx + 0x4c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x10079753
push eax
call esi
mov eax, dword [ebx + 0x68]
test eax, eax
je 0x1007975d
push eax
call esi
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x10079771
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], 0xffffffff
cmp dword [ebx + 0x2c], 6
jne 0x100797a4
mov esi, dword [ebx + 0x370]
lea edi, [ebx + 0x98]
push 0x10458110
call fcn.10088ea0
add esp, 4
push edi
call fcn.100aade0
add esp, 4
add edi, 0x108
call fcn.100aafe0
push ebx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
xor ebx, ebx
jmp 0x100799e2
push ebx
push str.MSPSocket_Recv__x
lea ecx, [ebp - 0x48]
push 0x40
push ecx
call fcn.1005f880
add esp, 0x10
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
xor ecx, ecx
mov dword [ebx + 0x68], eax
cmp eax, ecx
jne 0x100797fe
mov edx, dword [0x1045b910]
push ecx
push ecx
push ecx
push ecx
push str.alloc_recv_lock_failed_
push 0x124
push 0x10440abc
push edx
push ecx
jmp 0x1007972e
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov dword [ebx + 0x84], eax
xor eax, eax
mov dword [ebx], 0xffffffff
mov dword [ebx + 0x28], esi
mov dword [ebx + 0x2c], edi
mov dword [ebx + 0x80], edx
mov dword [ebx + 0x40], eax
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x48], eax
lea eax, [ebx + 0x50]
cmp eax, ecx
je 0x1007983f
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov esi, 2
mov dword [ebx + 0x8c], ecx
lea edi, [esi + 0x15]
cmp dword [ebx + 0x28], esi
je 0x10079854
mov edi, esi
mov eax, dword [ebx + 0x2c]
cmp eax, esi
je 0x1007985e
mov esi, dword [ebp - 0x58]
cmp eax, 1
jne 0x10079868
mov dword [ebx + 0x34], eax
jmp 0x1007987a
xor edx, edx
cmp eax, 6
setne dl
lea edx, [edx*4 + 1]
mov dword [ebx + 0x34], edx
push ecx
push esi
push edi
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [0x1045b910]
mov edx, dword [0x1045b8f0]
push eax
mov eax, dword [ebx]
push eax
push esi
push edi
push str.socket__d__d___ret_x__detail_d
push 0x14a
push 0x10440b1c
push ecx
push 6
push edx
call fcn.10062060
add esp, 0x28
cmp dword [ebx], 0xffffffff
je 0x100798f6
push 4
lea eax, [ebp - 0x54]
push eax
push 0x1001
mov dword [ebp - 0x54], 0x10000
mov ecx, dword [ebx]
push 0xffff
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
lea edx, [ebp - 0x54]
push edx
mov dword [ebp - 0x54], 1
mov eax, dword [ebx]
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [ebx + 0x2c], 6
jne 0x1007994f
mov ecx, dword [0x1045b910]
mov edx, dword [0x1045b8f0]
push 0
push 0
push 0
push 0
push str.use_ssl_
push 0x161
push 0x10440b64
push ecx
push 6
push edx
call fcn.10062060
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebx]
push ebx
push ecx
lea eax, [ebx + 0x98]
push edx
push eax
mov ecx, 0x10458110
call fcn.10088fd0
add esp, 0x38
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x10079743
mov eax, dword [0x1045b914]
push closesocket
xor esi, esi
push eax
mov dword [ebx + 4], esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [0x1045b914]
mov dword [ebx + 4], esi
inc dword [0x104580fc]
mov eax, dword [ebx + 4]
mov ecx, dword [eax*4 + 0x1045810c]
lea edi, [eax + eax*2]
push edx
lea edi, [edi*4 + 0x10458100]
mov dword [ebp - 0x50], ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0x10
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x1007973c
mov eax, dword [ebp - 0x50]
push closesocket
push eax
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test edi, edi
je 0x100799d8
mov dword [esi], 0
cmp dword [edi + 8], 0
jne 0x100799cd
mov dword [edi], esi
jmp 0x100799d2
mov ecx, dword [edi + 4]
mov dword [ecx], esi
inc dword [edi + 8]
mov dword [edi + 4], esi
mov edx, dword [ebp - 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x100799ee
mov ecx, dword [ebp - 0x4c]
mov dword [eax], ecx
mov edx, dword [ebp - 0x4c]
mov eax, dword [0x1045b910]
mov ecx, dword [0x1045b8f0]
push 0
push 0
push edx
push ebx
push str.MSPSocket_New____out___x__d
push 0x1a4
push 0x10440bf8
push eax
push 2
push ecx
call fcn.10062060
mov ecx, dword [ebp - 4]
add esp, 0x28
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.1015eea7
mov esp, ebp
pop ebp
ret