Function at 0x4c9420
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 [0xadb66c]
push 0x28
call dword [eax]
add esp, 4
test eax, eax
je 0x4c94f4
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.004bd120
add esp, 4
mov dword [esi + 0x24], eax
mov dword [esp + 0x1c], ebx
mov dword [esi + 0x1c], ebx
test eax, eax
je 0x4c94fe
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 0x4c9508
mov ebx, 9
cmp ecx, 2
jne 0x4c981e
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 0x4c9548
mov ebx, 0xf
jmp 0x4c9870
mov ebx, 0xf
jmp 0x4c981e
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 0x4c9586
mov ecx, dword [ecx]
test ecx, ecx
je 0x4c9586
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 0x4c95a1
jmp 0x4c981e
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 0x4c981e
mov ecx, dword [esi]
mov dword [esp + 0xc], ecx
mov ebx, dword [ecx + 0x208]
mov ecx, dword [ebx + 0xb4]
test ecx, ecx
je 0x4c95c0
cmp dword [ecx], 0
jne 0x4c971e
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 0x4c9600
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 0x4c9819
cmp dword [ebx + 0x20], 0
jle 0x4c9627
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 0x4c9819
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 4]
cmp eax, 0x17
je 0x4c966a
cmp eax, 2
jne 0x4c96f4
mov eax, dword [ebx + 0x68]
test eax, eax
je 0x4c96f4
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 0x4c96b6
cmp dword [ecx + 0x5c], 0
jne 0x4c96d7
movdqu xmm0, xmmword [ebx + 0x6c]
mov eax, dword [0xadb668]
movdqu xmm1, xmmword [eax]
pcmpeqb xmm1, xmm0
pmovmskb eax, xmm1
cmp eax, 0xffff
je 0x4c96d7
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 0x4c9819
mov eax, dword [esp + 0xc]
cmp dword [eax + 4], 0x17
jne 0x4c96f4
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 0x4c971e
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 0x4c9819
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + 0xac]
test eax, eax
je 0x4c9742
push dword [ebx + 0xb0]
push edi
push dword [esi + 4]
call eax
add esp, 0xc
test eax, eax
js 0x4c9819
test byte [esi + 0x1c], 2
jne 0x4c9819
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 0x4c9790
mov eax, dword [eax + 8]
test eax, eax
je 0x4c9790
push dword [edi + 0xb8]
push dword [esp + 0x18]
lea ecx, [esp + 0x50]
push ecx
push dword [esp + 0x18]
call eax
add esp, 0x10
jmp 0x4c97a3
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 0x4c987a
cmp ebx, 0xffffffff
jne 0x4c97d1
cmp eax, 0x2714
je 0x4c9760
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + 0xa4]
test eax, eax
mov edi, 0
je 0x4c97fd
push dword [ebx + 0xa8]
push dword [esp + 0x1c]
push dword [esi + 4]
call eax
add esp, 0xc
test eax, eax
js 0x4c9898
mov eax, dword [esi + 0x1c]
test al, 2
je 0x4c980a
or eax, 4
mov dword [esi + 0x1c], eax
mov ecx, esi
call fcn.004c9960
test eax, eax
je 0x4c9883
mov ebx, eax
jmp 0x4c9820
mov ebx, 0xb
xor edi, edi
push edi
call fcn.004bd450
add esp, 4
push dword [esi + 0x24]
call fcn.004bd5e0
add esp, 4
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4c9865
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 0xb4]
test ecx, ecx
je 0x4c985e
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x4c985e
push dword [edx + 0xb8]
push eax
call ecx
add esp, 8
jmp 0x4c9865
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [0xadb664]
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 0x4c9820
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x64]
cmp dword [ebp + 0x14], 0
je 0x4c989f
push esi
push eax
call fcn.004bd1b0
jmp 0x4c98a6
mov ebx, 0xb
jmp 0x4c9820
push esi
push eax
call fcn.004bd150
add esp, 8
test eax, eax
mov ecx, dword [ebp + 0xc]
je 0x4c990a
push eax
push dword [esi + 4]
push dword [ecx + 0x98]
mov edi, eax
call fcn.004bcb70
add esp, 0xc
mov ebx, 0xf
test eax, eax
je 0x4c9820
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0x9c]
test eax, eax
je 0x4c98f2
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 0x4c98fe
mov eax, dword [ebp + 0x10]
mov dword [eax + 0x68], esi
mov eax, dword [ebp + 8]
mov dword [eax], esi
xor ebx, ebx
jmp 0x4c9870
mov ebx, 0xf
jmp 0x4c9820