Function at 0x1004e290
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 0x101db43d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x10284f40]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x54], edx
mov eax, dword [ebx + 0x14]
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x5c], esi
cmp eax, 2
je 0x1004e2f3
cmp eax, 0x17
jne 0x1004e537
mov eax, dword [ebx + 0x10]
cmp eax, 1
je 0x1004e304
cmp eax, 5
jne 0x1004e537
xor ecx, ecx
lea esi, [edx + 0xc]
xor eax, eax
lock cmpxchg dword [esi], ecx
mov esi, dword [ebp - 0x5c]
mov ecx, eax
mov dword [ebp - 0x50], ecx
test ecx, ecx
jne 0x1004e375
push 0
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x40], 0x25a207b9
push eax
push 4
lea eax, [ebp - 0x50]
mov dword [ebp - 0x3c], 0x4660ddf3
push eax
push 0x10
lea eax, [ebp - 0x40]
mov dword [ebp - 0x38], 0xe576e98e
push eax
push 0xc8000006
push dword [esi]
mov dword [ebp - 0x34], 0x3e06748c
mov dword [ebp - 0x18], 0
call dword [sym.imp.WS2_32.dll_WSAIoctl]
mov edx, dword [ebp - 0x54]
test eax, eax
mov ecx, dword [ebp - 0x50]
cmovne ecx, edx
mov dword [ebp - 0x50], ecx
lea eax, [edx + 0xc]
xchg dword [eax], ecx
mov ecx, dword [ebp - 0x50]
xor eax, eax
cmp ecx, edx
cmove ecx, eax
mov dword [ebp - 0x18], ecx
test ecx, ecx
je 0x1004e537
cmp dword [esi], 0xffffffff
xorps xmm0, xmm0
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 0xc]
movups xmmword [ebp - 0x4c], xmm0
mov word [ebp - 0x4c], ax
lea eax, [edi + 0x20]
movq qword [ebp - 0x3c], xmm0
jne 0x1004e3c2
mov dword [ebp - 0x20], 0x2719
mov byte [ebp - 0x1c], 1
movq xmm0, qword [ebp - 0x20]
movq qword [eax], xmm0
mov dword [eax + 8], 0x1026c678
jmp 0x1004e3f6
cmp dword [ebx + 0xc], 2
mov ecx, 0x10
mov eax, 0x1c
cmove eax, ecx
push eax
lea eax, [ebp - 0x4c]
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
lea ecx, [edi + 0x20]
setne dl
call fcn.1004bf30
mov edx, dword [ebp - 0x54]
lea eax, [edi + 0x20]
mov ecx, dword [ebp - 0x18]
cmp byte [edi + 0x24], 0
je 0x1004e479
cmp dword [eax], 0x2726
jne 0x1004e419
mov eax, dword [eax + 8]
cmp dword [eax + 8], 0x25c5e09b
jne 0x1004e419
cmp dword [eax + 0xc], 0x8fafd21e
je 0x1004e479
mov esi, dword [edx + 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 0x1004e5c0
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 0x1004e45a
mov dword [eax + 0x14], edi
jmp 0x1004e45d
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 0x1004e5c0
mov byte [edi + 0x38], 1
mov eax, dword [edx + 4]
add eax, 0x18
lock inc dword [eax]
push edi
push 0
push 0
push 0
push dword [ebx + 0x18]
push dword [ebp - 0x28]
push dword [esi]
call ecx
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x1004e4c8
cmp eax, 0x3e5
je 0x1004e4c8
mov esi, dword [ebp - 0x54]
push edi
push 2
mov esi, dword [esi + 4]
mov dword [edi], 0x1026c678
mov dword [edi + 8], eax
mov dword [edi + 0xc], 0
jmp 0x1004e423
mov esi, dword [ebp - 0x54]
lea ecx, [edi + 0x1c]
mov edx, 1
xor eax, eax
mov esi, dword [esi + 4]
lock cmpxchg dword [ecx], edx
cmp eax, 1
jne 0x1004e5c0
push edi
push 2
push 0
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1004e5c0
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 0x1004e518
mov dword [eax + 0x14], edi
jmp 0x1004e51b
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 0x1004e5c0
lea eax, [edx + 8]
xor ecx, ecx
mov dword [ebp - 0x18], eax
lea esi, [edx + 8]
xor eax, eax
lock cmpxchg dword [esi], ecx
mov esi, dword [ebp - 0x5c]
mov ecx, eax
mov dword [ebp - 0x54], ecx
test ecx, ecx
jne 0x1004e58d
mov eax, dword [edx]
push 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov ecx, dword [eax]
lea eax, [ebp - 0x58]
push eax
call fcn.100823d0
add esp, 8
lea eax, [ebp - 0x58]
push dword [ecx + 0x18]
push 0x100823f0
push eax
call fcn.1004a680
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x54], eax
xchg dword [ecx], eax
test byte [esi + 4], 3
jne 0x1004e611
mov ecx, dword [esi]
cmp ecx, 0xffffffff
jne 0x1004e5e0
mov dword [ebp - 0x20], 0x2719
mov byte [ebp - 0x1c], 1
movq xmm0, qword [ebp - 0x20]
movq qword [edi + 0x20], xmm0
mov dword [edi + 0x28], 0x1026c678
push ecx
mov ecx, dword [ebp - 0x54]
push edi
call fcn.1004ced0
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.100e40d6
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x18
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 0x8004667e
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
lea ecx, [edi + 0x20]
test esi, esi
sets dl
call fcn.1004bf30
test esi, esi
js 0x1004e5b6
mov esi, dword [ebp - 0x5c]
or byte [esi + 4], 2
mov ecx, dword [esi]
lea eax, [edi + 0x20]
cmp ecx, 0xffffffff
jne 0x1004e638
mov dword [ebp - 0x20], 0x2719
mov byte [ebp - 0x1c], 1
movq xmm0, qword [ebp - 0x20]
movq qword [eax], xmm0
mov dword [eax + 8], 0x1026c678
jmp 0x1004e662
push dword [ebx + 0x18]
push dword [ebp - 0x28]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
lea ecx, [edi + 0x20]
test esi, esi
setne dl
call fcn.1004bf30
test esi, esi
je 0x1004e5b6
mov esi, dword [ebp - 0x5c]
lea eax, [edi + 0x20]
mov ecx, dword [eax]
cmp ecx, 0x2734
jne 0x1004e671
mov ecx, dword [eax + 8]
jmp 0x1004e680
cmp ecx, 0x2733
jne 0x1004e5b6
mov ecx, dword [edi + 0x28]
cmp dword [ecx + 8], 0x25c5e09b
jne 0x1004e5b6
cmp dword [ecx + 0xc], 0x8fafd21e
jne 0x1004e5b6
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x1c], 0
movq xmm0, qword [ebp - 0x20]
movq qword [eax], xmm0
mov dword [eax + 8], 0x1026c678
mov eax, dword [esi]
mov esi, dword [ebp - 0x54]
mov dword [ebp - 0x18], eax
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x28], 1
mov dword [ebp - 4], 0
cmp byte [esi + 0xd8], 0
je 0x1004e6f6
push ecx
push edi
mov ecx, esi
call fcn.1004ced0
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1004e5c0
push edi
push dword [ebp - 0x18]
lea ecx, [esi + 0x8c]
call fcn.10061e50
mov ecx, dword [esi + 0x14]
add ecx, 0x18
lock inc dword [ecx]
test al, al
je 0x1004e74e
lea eax, [ebp - 0x21]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], eax
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x30]
mov byte [ebp - 0x21], 0
push eax
push ecx
mov ecx, dword [esi + 0x34]
xorps xmm0, xmm0
push 1
mov dword [ebp - 0x1c], 1
movq qword [ebp - 0x30], xmm0
mov dword [ebp - 0x28], 0x1026c678
call fcn.1004c270
add esp, 0xc
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1004e5c0