Function at 0x485d70
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x68
mov eax, dword [0x5d60c4]
xor eax, esp
mov dword [esp + 0x64], eax
push esi
push edi
push 0xa
lea eax, [esp + 0x64]
mov dword [esp + 0x10], 1
xorps xmm0, xmm0
mov edi, ecx
push eax
push dword [ebp + 0xc]
movaps xmmword [esp + 0x1c], xmm0
movaps xmmword [esp + 0x2c], xmm0
mov dword [esp + 0x24], 1
call fcn.0053a6ea
add esp, 0xc
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x68]
push eax
push str.localhost
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x485f62
mov esi, dword [esp + 8]
test esi, esi
je 0x485f7e
mov eax, dword [esi + 4]
mov ecx, dword [sym.imp.WS2_32.dll_socket]
cmp eax, 2
jne 0x485e95
push dword [esi + 0xc]
push dword [esi + 8]
push eax
call ecx
mov dword [edi + 8], eax
cmp eax, 0xffffffff
je 0x485f4d
push 4
lea ecx, [esp + 0x10]
push ecx
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, edi
call fcn.00486eb0
mov eax, dword [edi + 8]
cmp eax, 0xffffffff
je 0x485e66
mov eax, 2
push 0
mov word [esp + 0x34], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0
mov word [esp + 0x36], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x30]
push 0x10
push eax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_bind]
mov eax, dword [edi + 8]
push dword [esi + 0x10]
push dword [esi + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x485f77
push dword [edi + 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0xc], 0xffffffff
mov eax, dword [esi + 4]
cmp eax, 0x17
jne 0x485f4d
push dword [esi + 0xc]
push dword [esi + 8]
push eax
call ecx
mov dword [edi + 0xc], eax
cmp eax, 0xffffffff
je 0x485f4d
push 4
lea ecx, [esp + 0x10]
push ecx
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, edi
call fcn.00486f80
cmp dword [edi + 0xc], 0xffffffff
xorps xmm0, xmm0
movaps xmmword [esp + 0x40], xmm0
movq qword [esp + 0x50], xmm0
mov dword [esp + 0x58], 0
je 0x485f29
mov eax, 0x17
push 0
mov word [esp + 0x44], ax
call dword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [0x56a960]
mov word [esp + 0x42], ax
lea eax, [esp + 0x40]
push 0x1c
push eax
push dword [edi + 0xc]
movups xmmword [esp + 0x54], xmm0
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x485f29
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push dword [esi + 0x10]
push dword [esi + 0x18]
push dword [edi + 0xc]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x485fa2
push dword [edi + 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0xc], 0xffffffff
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x485de5
push dword [esp + 8]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.0052b789
mov esp, ebp
pop ebp
ret 8
mov ecx, edi
call fcn.00486eb0
push dword [esp + 8]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x485f62
mov ecx, dword [esp + 0x6c]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, esp
call fcn.0052b789
mov esp, ebp
pop ebp
ret 8
mov ecx, edi
call fcn.00486f80
jmp 0x485f7e