Function at 0x490650
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x4f4214]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x140], eax
mov eax, dword [ebp + 0xc]
push eax
push 0x4db1d8
lea ecx, [ebp - 0x10]
push 0xa
push ecx
mov dword [ebp - 0x148], 2
mov dword [ebp - 0x144], 1
call fcn.0049c891
add esp, 0x10
lea edx, [ebp - 0x11c]
push edx
lea eax, [ebp - 0x14c]
push eax
lea ecx, [ebp - 0x10]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x120], eax
test eax, eax
je 0x4906ff
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c72a
mov esp, ebp
pop ebp
ret
cmp dword [0x4f7020], 0
jne 0x4906ed
push ebx
push edi
mov edi, dword [ebp - 0x11c]
test edi, edi
je 0x490843
mov ebx, dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, edi
mov edx, dword [edi + 0xc]
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x490832
cmp dword [0x4f7020], 0
jne 0x49085e
lea edx, [ebp - 0x118]
push edx
push 0x8004667e
push esi
mov dword [ebp - 0x118], 1
call ebx
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x18]
push eax
push ecx
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x120], eax
cmp eax, 0xffffffff
jne 0x49081e
lea edx, [ebp - 0x128]
push edx
push 0
lea eax, [ebp - 0x114]
push eax
push 0
lea ecx, [esi + 1]
push ecx
mov dword [ebp - 0x128], 3
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x110], esi
mov dword [ebp - 0x114], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x490815
lea edx, [ebp - 0x118]
push edx
lea eax, [ebp - 0x120]
push eax
push 0x1007
push 0xffff
push esi
mov dword [ebp - 0x118], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
mov eax, dword [ebp - 0x120]
test eax, eax
je 0x49081e
push eax
push 0x75
push str.Connect
push str._s__d__err___d_n
call fcn.00487d90
mov eax, dword [ebp - 0x120]
add esp, 0x10
jmp 0x49081e
or eax, 0xffffffff
mov dword [ebp - 0x120], eax
cmp dword [0x4f7020], 0
jne 0x490867
test eax, eax
je 0x490877
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x490720
mov edi, dword [ebp - 0x11c]
push edi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
pop edi
pop ebx
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c72a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x11c]
push ecx
jmp 0x490844
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp - 0x11c]
push edx
jmp 0x490844
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [ebp - 0x118]
push eax
push 0x1005
push 0xffff
push esi
mov dword [ebp - 0x12c], 0x200000
mov dword [ebp - 0x118], 0xbb8
call edi
push 4
lea ecx, [ebp - 0x118]
push ecx
push 0x1006
push 0xffff
push esi
call edi
push 4
lea edx, [ebp - 0x12c]
push edx
push 0x1002
push 0xffff
push esi
call edi
mov eax, dword [ebp - 0x11c]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
lea ecx, [ebp - 0x124]
push ecx
push 0x8004667e
push esi
mov dword [ebp - 0x124], 0
call ebx
mov ecx, dword [ebp - 4]
pop edi
pop ebx
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0049c72a
mov esp, ebp
pop ebp
ret