Function at 0x4c8e70
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xd0
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
cmp edi, 1
mov esi, 0
adc esi, 1
mov dword [eax], 0
mov eax, dword [0xb5ad4c]
push 0x28
call dword [eax]
add esp, 4
test eax, eax
je 0x4c8f44
mov dword [esp + 0x18], esi
mov ecx, dword [ebp + 0x10]
mov esi, eax
xor ebx, ebx
test edi, edi
setne bl
pxor xmm0, xmm0
movdqu xmmword [eax + 0x18], xmm0
movdqu xmmword [eax + 8], xmm0
mov dword [eax + 4], 0xffffffff
mov dword [eax], ecx
push 0
call fcn.004bcb70
add esp, 4
mov dword [esi + 0x24], eax
mov dword [esp + 0x1c], ebx
mov dword [esi + 0x1c], ebx
test eax, eax
je 0x4c8f4e
xor eax, eax
test edi, edi
setne al
mov edi, dword [esi]
movzx eax, word [edi + eax*2 + 0x18]
mov ecx, dword [edi + 4]
cmp ecx, 0x17
je 0x4c8f58
mov ebx, 9
cmp ecx, 2
jne 0x4c926e
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], 0
mov word [esp + 0x48], 2
movzx eax, ax
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x4a], ax
mov eax, dword [edi + 8]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x14], 0x10
jmp 0x4c8f98
mov ebx, 0xf
jmp 0x4c92c0
mov ebx, 0xf
jmp 0x4c926e
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov word [esp + 0x48], 0x17
movzx eax, ax
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x4a], ax
movdqu xmm0, xmmword [edi + 8]
movdqu xmmword [esp + 0x50], xmm0
mov eax, dword [edi + 0x5c]
mov dword [esp + 0x60], eax
mov dword [esp + 0x14], 0x1c
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 0xb4]
test ecx, ecx
mov edi, dword [esp + 0x18]
je 0x4c8fd6
mov ecx, dword [ecx]
test ecx, ecx
je 0x4c8fd6
push dword [edx + 0xb8]
push 0
push edi
push eax
call ecx
add esp, 0x10
mov dword [esi + 4], eax
mov ebx, 0xb
cmp eax, 0xffffffff
jne 0x4c8ff1
jmp 0x4c926e
push 0
push edi
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
mov ebx, 0xb
cmp eax, 0xffffffff
je 0x4c926e
mov ecx, dword [esi]
mov dword [esp + 0xc], ecx
mov ebx, dword [ecx + 0x208]
mov ecx, dword [ebx + 0xb4]
test ecx, ecx
je 0x4c9010
cmp dword [ecx], 0
jne 0x4c916e
mov dword [esp + 0x10], 1
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [ebx + 0x1c], 0
jle 0x4c9050
lea eax, [ebx + 0x1c]
push 4
push eax
push 0x1001
push 0xffff
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4c9269
cmp dword [ebx + 0x20], 0
jle 0x4c9077
lea eax, [ebx + 0x20]
push 4
push eax
push 0x1002
push 0xffff
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4c9269
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 4]
cmp eax, 0x17
je 0x4c90ba
cmp eax, 2
jne 0x4c9144
mov eax, dword [ebx + 0x68]
test eax, eax
je 0x4c9144
pxor xmm0, xmm0
movdqa xmmword [esp + 0x20], xmm0
mov word [esp + 0x20], 2
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x24], eax
mov eax, 0x10
jmp 0x4c9106
cmp dword [ecx + 0x5c], 0
jne 0x4c9127
movdqu xmm0, xmmword [ebx + 0x6c]
mov eax, dword [0xb5ad48]
movdqu xmm1, xmmword [eax]
pcmpeqb xmm1, xmm0
pmovmskb eax, xmm1
cmp eax, 0xffff
je 0x4c9127
add ebx, 0x6c
pxor xmm0, xmm0
movdqa xmmword [esp + 0x20], xmm0
movdqu xmmword [esp + 0x2c], xmm0
mov word [esp + 0x20], 0x17
movdqu xmm0, xmmword [ebx]
movdqu xmmword [esp + 0x28], xmm0
mov eax, 0x1c
lea ecx, [esp + 0x20]
push eax
push ecx
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4c9269
mov eax, dword [esp + 0xc]
cmp dword [eax + 4], 0x17
jne 0x4c9144
mov eax, dword [esi + 4]
mov dword [esp + 0x10], 0
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1b
push 0x29
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test byte [esi + 0x1c], 1
je 0x4c916e
mov dword [esp + 0x10], 1
push 4
lea eax, [esp + 0x14]
push eax
push 1
push 6
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4c9269
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + 0xac]
test eax, eax
je 0x4c9192
push dword [ebx + 0xb0]
push edi
push dword [esi + 4]
call eax
add esp, 0xc
test eax, eax
js 0x4c9269
test byte [esi + 0x1c], 2
jne 0x4c9269
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 0xc], ecx
mov edi, dword [eax + 0x208]
nop dword [eax + eax]
mov eax, dword [edi + 0xb4]
test eax, eax
je 0x4c91e0
mov eax, dword [eax + 8]
test eax, eax
je 0x4c91e0
push dword [edi + 0xb8]
push dword [esp + 0x18]
lea ecx, [esp + 0x50]
push ecx
push dword [esp + 0x18]
call eax
add esp, 0x10
jmp 0x4c91f3
push dword [esp + 0x14]
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp ebx, 0xffffffff
sete cl
lea edx, [eax - 0x2735]
cmp edx, 0xfffffffe
setb dl
test cl, dl
jne 0x4c92ca
cmp ebx, 0xffffffff
jne 0x4c9221
cmp eax, 0x2714
je 0x4c91b0
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + 0xa4]
test eax, eax
mov edi, 0
je 0x4c924d
push dword [ebx + 0xa8]
push dword [esp + 0x1c]
push dword [esi + 4]
call eax
add esp, 0xc
test eax, eax
js 0x4c92e8
mov eax, dword [esi + 0x1c]
test al, 2
je 0x4c925a
or eax, 4
mov dword [esi + 0x1c], eax
mov ecx, esi
call fcn.004c93b0
test eax, eax
je 0x4c92d3
mov ebx, eax
jmp 0x4c9270
mov ebx, 0xb
xor edi, edi
push edi
call fcn.004bcea0
add esp, 4
push dword [esi + 0x24]
call fcn.004bd030
add esp, 4
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4c92b5
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 0xb4]
test ecx, ecx
je 0x4c92ae
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x4c92ae
push dword [edx + 0xb8]
push eax
call ecx
add esp, 8
jmp 0x4c92b5
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [0xb5ad44]
push esi
call dword [eax]
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
xor edi, edi
mov ebx, 0xb
jmp 0x4c9270
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x64]
cmp dword [ebp + 0x14], 0
je 0x4c92ef
push esi
push eax
call fcn.004bcc00
jmp 0x4c92f6
mov ebx, 0xb
jmp 0x4c9270
push esi
push eax
call fcn.004bcba0
add esp, 8
test eax, eax
mov ecx, dword [ebp + 0xc]
je 0x4c935a
push eax
push dword [esi + 4]
push dword [ecx + 0x98]
mov edi, eax
call fcn.004bc5c0
add esp, 0xc
mov ebx, 0xf
test eax, eax
je 0x4c9270
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0x9c]
test eax, eax
je 0x4c9342
push dword [esp + 0x1c]
push 1
push dword [esi + 4]
push dword [ecx + 0xa0]
call eax
add esp, 0x10
cmp dword [ebp + 0x14], 0
je 0x4c934e
mov eax, dword [ebp + 0x10]
mov dword [eax + 0x68], esi
mov eax, dword [ebp + 8]
mov dword [eax], esi
xor ebx, ebx
jmp 0x4c92c0
mov ebx, 0xf
jmp 0x4c9270