Function at 0x47f740
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f6b67
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x51e080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x1c8], edx
mov ecx, dword [edx + 0x34]
mov dword [ebp - 0x1fc], 0
mov dword [ebp - 0x1f8], 0
mov dword [ebp - 0x1f4], 0
mov eax, dword [ecx + 0x46c]
mov dword [edx + 0x3c], eax
mov esi, dword [ecx + 0x488]
mov dword [ebp - 0x1f0], 0
mov dword [ebp - 0x1ec], 0
mov dword [ebp - 0x1e8], 0
lea edi, [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x20
lea eax, [ebp - 0x30]
mov ecx, esi
push eax
call fcn.004b0e10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x24
call fcn.004d3886
add esp, 4
mov dword [ebp - 0x1e0], eax
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.004b0330
mov esi, eax
mov dword [ebp - 4], 0xffffffff
push 8
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1dc], esi
push eax
mov ecx, esi
call fcn.004b0480
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [ebp - 0x1c8]
mov eax, dword [edi + 8]
cmp dword [eax + 0x3c], 0
je 0x47f993
nop dword [eax]
mov eax, dword [edi + 0x34]
mov esi, dword [eax + 0x474]
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0x20]
xor edx, edx
mov eax, dword [esi + 0x28]
and ecx, 0xd934ca82
xor edi, edi
mov dword [ebp - 0x1d4], edx
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x47f94f
nop dword [eax]
nop dword [eax + eax]
cmp dword [eax + 8], 0xd934ca82
je 0x47f921
mov eax, dword [eax + 4]
test eax, eax
jne 0x47f880
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x1c8]
lea ecx, [ebp - 0x1e0]
push ecx
lea ecx, [ebp - 0x1e4]
push ecx
mov eax, dword [esi + 0x34]
lea ecx, [ebp - 0x22c]
push ecx
lea ecx, [ebp - 0xb4]
push ecx
mov ecx, dword [eax + 0x4b0]
call fcn.0049e1e0
test eax, eax
jne 0x47fc12
push 0x2c
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.004d6ed0
mov eax, dword [ebp - 0xb4]
add esp, 0xc
cmp eax, 1
jne 0x47f9be
movaps xmm0, xmmword [0x513ce0]
mov eax, 2
mov word [ebp - 0x4c], ax
mov ax, word [ebp - 0xa0]
mov word [ebp - 0x4a], ax
mov eax, dword [ebp - 0xb0]
movups xmmword [ebp - 0x5c], xmm0
mov dword [ebp - 0x48], eax
jmp 0x47f9fb
mov eax, dword [eax + 0x2c]
test eax, eax
je 0x47f94f
cmp dword [eax + 0x24], 0
je 0x47f942
cmp dword [eax + 0x84], 0
jne 0x47f942
inc edi
cmp dword [eax + 0x88], 0
je 0x47f942
inc edx
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x47f928
mov dword [ebp - 0x1d4], edx
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x47f89e
cmp edi, 1
jne 0x47f972
cmp dword [ebp - 0x1d4], edi
je 0x47f89e
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [ebp - 0x1c8]
mov eax, dword [edi + 8]
cmp dword [eax + 0x3c], 0
jne 0x47f840
mov esi, dword [ebp - 0x1dc]
test esi, esi
je 0x47f99f
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4
cmp eax, 2
jne 0x47f9fb
movaps xmm0, xmmword [0x513cf0]
mov eax, 0x17
movups xmmword [ebp - 0x5c], xmm0
mov word [ebp - 0x4c], ax
movups xmm0, xmmword [ebp - 0xb0]
mov ax, word [ebp - 0xa0]
mov word [ebp - 0x4a], ax
mov dword [ebp - 0x48], 0
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], 0
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push dword [ebp - 0x5c]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x47fc12
push 4
lea eax, [ebp - 0x1d8]
mov dword [ebp - 0x1d8], 0x8000
push eax
push 0x1002
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x47fc0b
push 4
lea eax, [ebp - 0x1d8]
mov dword [ebp - 0x1d8], 0x8000
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x47fc0b
lea eax, [ebp - 0x1d0]
mov dword [ebp - 0x1d0], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x47fc0b
push dword [ebp - 0x50]
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
push 0x2c
mov esi, eax
lea eax, [ebp - 0x5c]
push 0
push eax
call fcn.004d6ed0
add esp, 0xc
test esi, esi
je 0x47fb4a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x47fc05
lea eax, [ebp - 0x204]
mov dword [ebp - 0x204], 2
push eax
push 0
lea eax, [ebp - 0x1c4]
mov dword [ebp - 0x200], 0
push eax
push 0
push 0
mov dword [ebp - 0x1c0], edi
mov dword [ebp - 0x1c4], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x47fc05
test eax, eax
je 0x47fb28
lea eax, [ebp - 0x1c4]
push eax
push edi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x47fb4a
mov esi, dword [ebp - 0x1c8]
lea eax, [ebp - 0xb4]
push eax
push 1
mov ecx, dword [esi + 0x34]
mov ecx, dword [ecx + 0x4b0]
call fcn.0049efe0
jmp 0x47fc0b
movups xmm0, xmmword [ebp - 0x22c]
mov eax, dword [ebp - 0x1e4]
lea ecx, [ebp - 0x1fc]
mov esi, dword [ebp - 0x1c8]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x1e0]
movups xmmword [ebp - 0x8c], xmm0
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0xc0]
movups xmm0, xmmword [ebp - 0x21c]
mov dword [ebp - 0x1f8], eax
mov eax, dword [esi + 0x34]
movups xmmword [ebp - 0x7c], xmm0
mov dword [ebp - 0xc0], 1
movq xmm0, qword [ebp - 0x20c]
movq qword [ebp - 0x6c], xmm0
xorps xmm0, xmm0
mov dword [ebp - 0xbc], 0
mov dword [ebp - 0xb8], edi
push ecx
mov ecx, dword [eax + 0x474]
movlpd qword [ebp - 0x1f0], xmm0
mov dword [ebp - 0x1e8], 0
mov dword [ebp - 0x1fc], 0xd934ca82
mov dword [ebp - 0x1f4], 0x64
call fcn.004053a0
test eax, eax
je 0x47fc12
push 0x64
lea eax, [ebp - 0xc0]
push 0
push eax
call fcn.004d6ed0
add esp, 0xc
jmp 0x47fc0b
mov esi, dword [ebp - 0x1c8]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esi + 0x34]
xor edi, edi
mov esi, dword [eax + 0x470]
lea eax, [esi + 8]
push eax
mov dword [ebp - 0x1d4], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x40]
mov eax, edx
mov esi, dword [esi + 0x48]
and eax, 0xe5e81e33
mov eax, dword [esi + eax*4]
test eax, eax
je 0x47fc73
cmp dword [eax + 8], 0xe5e81e33
je 0x47fc53
mov eax, dword [eax + 4]
test eax, eax
jne 0x47fc41
jmp 0x47fc73
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x47fc73
nop word [eax + eax]
test byte [ecx + 0x60], 2
mov eax, edi
mov ecx, dword [ecx + 0x24]
lea edi, [eax + 1]
cmovne edi, eax
test ecx, ecx
jne 0x47fc60
and edx, 0x7fa8011c
mov eax, dword [esi + edx*4]
test eax, eax
je 0x47fcb3
cmp dword [eax + 8], 0x7fa8011c
je 0x47fc92
mov eax, dword [eax + 4]
test eax, eax
jne 0x47fc80
jmp 0x47fcb3
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x47fcb3
nop dword [eax]
test byte [ecx + 0x60], 4
mov eax, edi
mov ecx, dword [ecx + 0x24]
lea edi, [eax + 1]
cmove edi, eax
test ecx, ecx
jne 0x47fca0
push dword [ebp - 0x1d4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x1dc]
mov dword [ebp - 0x1cc], edi
call fcn.00402930
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x513d40]
mulsd xmm0, qword [0x513a38]
test edi, edi
jne 0x47fd02
mulsd xmm0, qword [0x513bf8]
addsd xmm0, qword [0x513c00]
jmp 0x47fd12
mulsd xmm0, qword [0x513bc8]
addsd xmm0, qword [0x513bd8]
call fcn.004f3af0
mov esi, eax
mov dword [ebp - 0x1d0], 0
test esi, esi
je 0x47f97a
mov edi, dword [ebp - 0x1c8]
mov ecx, dword [edi + 8]
cmp dword [ecx + 0x3c], 0
je 0x47f980
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [edi + 0x34]
lea eax, [ebp - 0x1cc]
push eax
push 0xdbab8bf9
mov ecx, dword [ecx + 0x470]
call fcn.004033f0
cmp dword [ebp - 0x1cc], 0
jne 0x47f980
mov ecx, dword [edi + 0x34]
lea eax, [ebp - 0x1cc]
push eax
push 0x1f468105
mov ecx, dword [ecx + 0x470]
call fcn.004033f0
cmp dword [ebp - 0x1cc], 0
jne 0x47f980
mov eax, dword [ebp - 0x1d0]
inc eax
mov dword [ebp - 0x1d0], eax
cmp eax, esi
jb 0x47fd31
jmp 0x47f980