Function at 0x4994e9
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5d3c38
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 4], ebx
jne 0x499509
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret 0x14
push ebp
mov ebp, 1
cmp dword [esi + 0x18], ebx
je 0x49956b
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 6
push ebp
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x49954e
pop ebp
mov dword [esi + 0x50], 0x67
pop esi
or eax, eax
pop ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret 0x14
cmp dword [esi + 0x14], ebx
jne 0x499568
lea ecx, [esp + 0xc]
push ecx
push 0x8004667e
push eax
mov dword [esp + 0x18], ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [esi + 0x18], ebx
cmp dword [esi + 0x14], ebx
je 0x499588
mov eax, dword [esi + 8]
lea edx, [esp + 0xc]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x18], ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push edi
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov edi, eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x50], ebx
mov ecx, dword [esi + 8]
push 0x30
push edi
push ecx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov eax, dword [esi + 8]
push 0x10
lea edx, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
mov dword [esi + 0x18], ebp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp ebx, 0xffffffff
jne 0x499604
cmp eax, 0x2733
je 0x499604
mov dword [esi + 0x50], 0x68
mov dword [esp + 0x50], ebx
test edi, edi
je 0x4995ec
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], 0
pop edi
pop ebp
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret 0x14
mov edx, dword [esp + 0x68]
mov ecx, dword [esi + 0xc]
push edx
xor ebp, ebp
push ebp
lea eax, [esp + 0x1c]
push eax
push 2
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ebx, eax
cmp ebx, ebp
jne 0x4996ba
mov edx, dword [esi + 8]
lea ecx, [esp + 0x1c]
push ecx
push edi
push edx
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x499684
mov al, byte [esp + 0x1c]
test al, 0x20
jne 0x499654
test al, 0x10
je 0x4996ba
cmp dword [esp + 0x30], ebp
je 0x4996ba
mov dword [esi + 0x50], 0x68
mov dword [esp + 0x50], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.0041dd40
pop edi
pop ebp
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret 0x14
mov dword [esi + 0x50], 0x68
mov dword [esp + 0x50], 0xffffffff
cmp edi, ebp
je 0x4996a2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebp
pop edi
pop ebp
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret 0x14
cmp dword [esi + 0x14], ebp
je 0x4996d7
mov ecx, dword [esi + 8]
lea eax, [esp + 0x68]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x74], ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp ebx, ebp
jne 0x499714
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
test eax, eax
jne 0x49965b
mov dword [esp + 0x50], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.0041dd40
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret 0x14
mov dword [esp + 0x50], 0xffffffff
cmp edi, ebp
je 0x49972b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], ebp
mov ecx, dword [esp + 0x48]
pop edi
pop ebp
pop esi
mov eax, ebx
pop ebx
mov dword fs:[0], ecx
add esp, 0x44
ret 0x14