Function at 0x10048860
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1010ffbd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x10163164]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x48], esi
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 8]
mov edi, dword [ebx + 0x1c]
mov dword [ebp - 0x60], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x58], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x4c], edx
cmp eax, 2
je 0x100488c9
cmp eax, 0x17
jne 0x10048aaf
mov eax, dword [ebx + 0x10]
cmp eax, 1
je 0x100488da
cmp eax, 5
jne 0x10048aaf
xor ecx, ecx
lea edx, [esi + 0xc]
xor eax, eax
lock cmpxchg dword [edx], ecx
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x1004894c
push 0
push 0
lea eax, [ebp - 0x54]
mov dword [ebp - 0x24], 0x25a207b9
push eax
push 4
lea eax, [ebp - 0x50]
mov dword [ebp - 0x20], 0x4660ddf3
push eax
push 0x10
lea eax, [ebp - 0x24]
mov dword [ebp - 0x1c], 0xe576e98e
push eax
push 0xc8000006
push dword [edx]
mov dword [ebp - 0x18], 0x3e06748c
mov dword [ebp - 0x54], 0
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x1004893e
mov eax, esi
mov dword [ebp - 0x50], eax
jmp 0x10048941
mov eax, dword [ebp - 0x50]
lea ecx, [esi + 0xc]
xchg dword [ecx], eax
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
xor ecx, ecx
cmp eax, esi
cmove eax, ecx
mov dword [ebp - 0x18], eax
test eax, eax
je 0x10048aaf
mov edx, dword [edx]
xorps xmm0, xmm0
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebx + 0xc]
movq qword [ebp - 0x30], xmm0
movups xmmword [ebp - 0x40], xmm0
mov word [ebp - 0x40], cx
cmp edx, 0xffffffff
jne 0x10048994
call fcn.10008d10
mov dword [edi + 0x24], eax
mov eax, 0x2719
mov dword [edi + 0x20], 0x2719
jmp 0x10048a23
cmp ecx, 2
mov dword [ebp - 0x54], 0x10
mov eax, 0x1c
cmove eax, dword [ebp - 0x54]
push eax
lea eax, [ebp - 0x40]
push eax
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x10048a0d
mov dword [edi + 0x20], eax
mov byte [edi + 0x38], 1
mov eax, dword [esi + 4]
add eax, 0x18
lock inc dword [eax]
mov edi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
push edi
push 0
push 0
push 0
push dword [ebx + 0x18]
push dword [ebp - 0x60]
push dword [eax]
call dword [ebp - 0x18]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x10048aa1
cmp eax, 0x3e5
je 0x10048aa1
mov ecx, dword [ebp - 0x48]
push esi
push eax
push edi
mov ecx, dword [ecx + 4]
call fcn.100287e0
jmp 0x10048afd
call fcn.10008d10
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi + 0x24], esi
mov esi, dword [ebp - 0x48]
mov dword [edi + 0x20], eax
test eax, eax
je 0x100489ba
call fcn.10008d10
mov ecx, dword [edi + 0x24]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x10048a44
cmp dword [edi + 0x20], 0x2726
je 0x100489ba
mov esi, dword [esi + 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 0x10048afd
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x10048a85
mov dword [eax + 0x14], edi
jmp 0x10048a88
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
mov ecx, 1
xchg dword [eax], ecx
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10048afd
mov ecx, dword [ebp - 0x48]
push edi
mov ecx, dword [ecx + 4]
call fcn.10028770
jmp 0x10048afd
lea edx, [esi + 8]
xor ecx, ecx
xor eax, eax
lock cmpxchg dword [edx], ecx
mov ecx, eax
mov dword [ebp - 0x48], ecx
test ecx, ecx
jne 0x10048ad4
mov ecx, dword [esi]
mov ecx, dword [ecx]
call fcn.1004c200
mov dword [ebp - 0x48], eax
lea ecx, [esi + 8]
xchg dword [ecx], eax
mov esi, dword [ebp - 0x4c]
test byte [esi + 4], 3
jne 0x10048b46
mov eax, dword [esi]
cmp eax, 0xffffffff
jne 0x10048b20
call fcn.10008d10
mov dword [edi + 0x20], 0x2719
mov dword [edi + 0x24], eax
push ecx
mov ecx, dword [ebp - 0x48]
push edi
call fcn.100478b0
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.100b8868
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x1c
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x10048b5e
mov dword [edi + 0x20], 0
or byte [esi + 4], 2
mov eax, dword [esi]
cmp eax, 0xffffffff
jne 0x10048b73
call fcn.10008d10
mov dword [edi + 0x20], 0x2719
mov dword [edi + 0x24], eax
jmp 0x10048ba2
call fcn.10008d10
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], esi
jmp 0x10048af3
push dword [ebx + 0x18]
push dword [ebp - 0x60]
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x10048b8c
mov dword [edi + 0x20], eax
jmp 0x10048af3
call fcn.10008d10
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi + 0x24], esi
mov esi, dword [ebp - 0x4c]
mov dword [edi + 0x20], eax
call fcn.10008d10
mov ecx, dword [edi + 0x24]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x10048bbb
cmp dword [edi + 0x20], 0x2734
je 0x10048bdc
call fcn.10008d10
mov ecx, dword [edi + 0x24]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 4]
jne 0x10048af3
cmp dword [edi + 0x20], 0x2733
jne 0x10048af3
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0x10163ad8
mov eax, dword [esi]
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0x18], eax
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x58], 1
mov dword [ebp - 4], 0
cmp byte [esi + 0xfc], 0
je 0x10048c30
push ecx
push edi
mov ecx, esi
call fcn.100478b0
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
jmp 0x10048b00
push edi
push dword [ebp - 0x18]
lea ecx, [esi + 0x8c]
call fcn.1004a440
mov ecx, dword [esi + 0x14]
add ecx, 0x18
lock inc dword [ecx]
test al, al
je 0x10048c80
lea eax, [ebp - 0x41]
mov byte [ebp - 0x41], 0
mov dword [ebp - 0x58], eax
lea edx, [ebp - 0x5c]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x5c], 1
push eax
push ecx
mov ecx, dword [esi + 0x34]
push 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0x10163ad8
call fcn.10028e40
add esp, 0xc
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
jmp 0x10048b00