Function at 0x10007bc0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0x44
mov eax, dword [0x1008600c]
xor eax, esp
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x54]
mov dword [esp + 0xc], eax
push ebx
mov ebx, ecx
push ebp
mov ebp, dword [esp + 0x50]
push esi
push edi
mov edi, dword [esp + 0x6c]
cmp edx, 2
je 0x10007bf6
cmp edx, 0x17
jne 0x10007e5c
mov eax, dword [esp + 0x60]
cmp eax, 1
je 0x10007c08
cmp eax, 5
jne 0x10007e5c
lea esi, [ebx + 0xc]
xor ecx, ecx
xor eax, eax
lock cmpxchg dword [esi], ecx
mov esi, eax
mov dword [esp + 0x14], esi
test esi, esi
jne 0x10007c7e
push eax
push eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
push 4
lea eax, [esp + 0x24]
mov dword [esp + 0x30], 0x25a207b9
push eax
push 0x10
lea eax, [esp + 0x38]
mov dword [esp + 0x3c], 0x4660ddf3
push eax
push 0xc8000006
push dword [ebp]
mov dword [esp + 0x4c], 0xe576e98e
mov dword [esp + 0x50], 0x3e06748c
call dword [sym.imp.WS2_32.dll_WSAIoctl]
mov ecx, dword [esp + 0x14]
test eax, eax
lea eax, [ebx + 0xc]
cmovne ecx, ebx
mov dword [esp + 0x14], ecx
xchg dword [eax], ecx
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x5c]
xor eax, eax
cmp esi, ebx
cmove esi, eax
mov dword [esp + 0x20], esi
test esi, esi
je 0x10007e5c
mov ecx, dword [ebp]
xorps xmm0, xmm0
movq qword [esp + 0x40], xmm0
mov dword [esp + 0x48], eax
movups xmmword [esp + 0x30], xmm0
mov word [esp + 0x30], dx
cmp ecx, 0xffffffff
jne 0x10007cc1
call fcn.10002f00
mov dword [edi + 0x20], 0x2719
mov dword [edi + 0x24], eax
jmp 0x10007d03
cmp edx, 2
mov dword [esp + 0x18], 0x10
mov eax, 0x1c
cmove eax, dword [esp + 0x18]
push eax
lea eax, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x10007cec
mov dword [edi + 0x20], eax
jmp 0x10007d03
call fcn.10002f00
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi + 0x24], esi
mov esi, dword [esp + 0x20]
mov dword [edi + 0x20], eax
cmp dword [edi + 0x20], 0
je 0x10007d93
call fcn.10002f00
mov ecx, dword [edi + 0x24]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x10007d26
cmp dword [edi + 0x20], 0x2726
je 0x10007d93
mov esi, dword [ebx + 4]
lock inc dword [esi + 0x18]
push edi
push 0
push 0
mov dword [edi + 0x1c], 1
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x10007ed0
lea ebx, [esi + 0x38]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x10007d67
mov dword [eax + 0x14], edi
jmp 0x10007d6a
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
mov ecx, 1
xchg dword [eax], ecx
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.1004144e
add esp, 0x44
ret 0x18
mov byte [edi + 0x34], 1
mov eax, dword [ebx + 4]
add eax, 0x18
lock inc dword [eax]
push edi
push 0
push 0
push 0
push dword [esp + 0x78]
push dword [esp + 0x30]
push dword [ebp]
call esi
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x10007de7
cmp eax, 0x3e5
je 0x10007de7
mov ecx, dword [ebx + 4]
push esi
push eax
push edi
call fcn.10005ab0
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.1004144e
add esp, 0x44
ret 0x18
mov esi, dword [ebx + 4]
lea ecx, [edi + 0x1c]
mov ebx, 1
xor eax, eax
mov edx, ebx
lock cmpxchg dword [ecx], edx
cmp eax, ebx
jne 0x10007ed0
push edi
push 2
push 0
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x10007ed0
lea ebp, [esi + 0x38]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x10007e35
mov dword [eax + 0x14], edi
jmp 0x10007e38
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
xchg dword [eax], ebx
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.1004144e
add esp, 0x44
ret 0x18
lea esi, [ebx + 8]
xor ecx, ecx
xor eax, eax
lock cmpxchg dword [esi], ecx
mov ecx, eax
test ecx, ecx
jne 0x10007ea8
mov eax, dword [ebx]
push 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov ecx, dword [eax]
lea eax, [esp + 0x24]
push eax
call fcn.1000d390
add esp, 8
lea eax, [esp + 0x20]
push dword [ecx + 0x18]
push 0x1000d3b0
push eax
call fcn.10004f30
mov ebx, eax
xchg dword [esi], eax
jmp 0x10007eaa
mov ebx, eax
test byte [ebp + 4], 3
jne 0x10007f0d
mov eax, dword [ebp]
cmp eax, 0xffffffff
jne 0x10007ee5
call fcn.10002f00
mov dword [edi + 0x20], 0x2719
mov dword [edi + 0x24], eax
push ecx
push edi
mov ecx, ebx
call fcn.10006b10
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.1004144e
add esp, 0x44
ret 0x18
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x10007f26
mov dword [edi + 0x20], 0
or byte [ebp + 4], 2
mov eax, dword [ebp]
cmp eax, 0xffffffff
jne 0x10007f3b
call fcn.10002f00
mov dword [edi + 0x20], 0x2719
mov dword [edi + 0x24], eax
jmp 0x10007f69
call fcn.10002f00
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], esi
jmp 0x10007ec7
push dword [esp + 0x68]
push dword [esp + 0x20]
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x10007f56
mov dword [edi + 0x20], eax
jmp 0x10007ec7
call fcn.10002f00
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], esi
call fcn.10002f00
mov ecx, dword [edi + 0x24]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x10007f82
cmp dword [edi + 0x20], 0x2734
je 0x10007fa3
call fcn.10002f00
mov ecx, dword [edi + 0x24]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x10007ec7
cmp dword [edi + 0x20], 0x2733
jne 0x10007ec7
sub esp, 8
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0x10086b38
push edi
push ecx
push dword [ebp]
push ecx
mov ecx, ebx
call fcn.10006ef0
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1004144e
add esp, 0x44
ret 0x18