Function at 0x47e640
Capabilities:
Get socket status

Disassembly:
sub esp, 0x340
push ebx
push ebp
mov ebp, dword [esp + 0x35c]
xor eax, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], eax
push esi
push edi
test ebp, ebp
jl 0x47e68d
jg 0x47e684
mov edi, dword [esp + 0x360]
cmp edi, 0x7fffffff
jb 0x47e694
mov edi, bind
xor ebp, ebp
jmp 0x47e694
mov edi, dword [esp + 0x360]
mov ecx, dword [esp + 0x354]
mov ebx, dword [esp + 0x358]
cmp ecx, 0xffffffff
jne 0x47e6e8
cmp ebx, 0xffffffff
jne 0x47e6e8
cmp dword [esp + 0x35c], ebx
jne 0x47e6e8
test edi, edi
je 0x47e6db
jns 0x47e6d4
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret
test ebp, ebp
jl 0x47e723
jg 0x47e6f2
test edi, edi
je 0x47e723
lea eax, [esp + 0x34]
mov dword [esp + 0x14], edi
push eax
call fcn.00481d70
add esp, 4
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x354]
jmp 0x47e727
mov eax, dword [esp + 0x40]
mov dword [esp + 0x24], eax
or edx, 0xffffffff
xor eax, eax
mov dword [esp + 0x10], edx
xor esi, esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x148], esi
cmp ecx, 0xffffffff
je 0x47e769
mov esi, 1
mov dword [esp + 0x14c], ecx
mov eax, esi
mov dword [esp + 0x148], esi
mov dword [esp + 0x48], ecx
mov edx, ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x10], ecx
cmp ebx, 0xffffffff
je 0x47e7d0
xor ecx, ecx
test esi, esi
je 0x47e782
cmp dword [esp + ecx*4 + 0x14c], ebx
je 0x47e782
inc ecx
cmp ecx, esi
jb 0x47e774
cmp ecx, esi
jne 0x47e7a1
cmp esi, 0x40
jae 0x47e7a1
mov dword [esp + ecx*4 + 0x14c], ebx
mov esi, dword [esp + 0x148]
inc esi
mov dword [esp + 0x148], esi
xor ecx, ecx
test eax, eax
je 0x47e7b2
cmp dword [esp + ecx*4 + 0x48], ebx
je 0x47e7b2
inc ecx
cmp ecx, eax
jb 0x47e7a7
cmp ecx, eax
jne 0x47e7c8
cmp eax, 0x40
jae 0x47e7c8
mov dword [esp + ecx*4 + 0x48], ebx
mov eax, dword [esp + 0x44]
inc eax
mov dword [esp + 0x44], eax
cmp ebx, edx
jbe 0x47e7d0
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x35c]
mov dword [esp + 0x24c], 0
cmp edx, 0xffffffff
je 0x47e828
xor ecx, ecx
mov dword [esp + 0x250], edx
mov dword [esp + 0x24c], 1
test eax, eax
je 0x47e80b
nop
cmp dword [esp + ecx*4 + 0x48], edx
je 0x47e80b
inc ecx
cmp ecx, eax
jb 0x47e800
cmp ecx, eax
jne 0x47e81c
cmp eax, 0x40
jae 0x47e81c
mov dword [esp + ecx*4 + 0x48], edx
inc dword [esp + 0x44]
mov eax, dword [esp + 0x10]
cmp edx, eax
jbe 0x47e82c
mov eax, edx
jmp 0x47e82c
mov eax, dword [esp + 0x10]
test ebp, ebp
jg 0x47e840
jl 0x47e836
test edi, edi
jae 0x47e840
mov dword [esp + 0x10], 0
jmp 0x47e848
lea ecx, [esp + 0x28]
mov dword [esp + 0x10], ecx
inc eax
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x14]
test ebp, ebp
jl 0x47e884
jg 0x47e85b
test edi, edi
je 0x47e884
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x2c], eax
jmp 0x47e892
mov eax, edi
or eax, ebp
jne 0x47e892
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
push dword [esp + 0x10]
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x254]
lea ecx, [esp + 0x254]
neg eax
sbb eax, eax
and eax, ecx
neg esi
push eax
sbb esi, esi
lea eax, [esp + 0x154]
and esi, eax
push esi
push dword [esp + 0x40]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x47e977
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x47e8f3
cmp dword [0x5a3a98], 0
jne 0x47e6c6
cmp eax, 0x2714
jne 0x47e6c6
test ebp, ebp
jl 0x47e900
jg 0x47e90c
test edi, edi
jne 0x47e90c
lea ecx, [ecx]
mov esi, dword [esp + 0x148]
jmp 0x47e84d
lea eax, [esp + 0x34]
push eax
call fcn.00481d70
mov edx, eax
sub esp, 0xc
mov eax, dword [esp + 0x28]
mov ecx, esp
sub esp, 0x10
mov dword [ecx], eax
mov eax, dword [esp + 0x3c]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x40]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x44]
mov dword [ecx + 0xc], eax
mov ecx, esp
mov eax, dword [edx]
mov dword [ecx], eax
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [edx + 0xc]
mov dword [ecx + 0xc], eax
call fcn.00481e20
mov ecx, edi
add esp, 0x20
sub ecx, eax
mov dword [esp + 0x14], ecx
test ecx, ecx
jle 0x47e6db
mov esi, dword [esp + 0x148]
jmp 0x47e851
test eax, eax
js 0x47e6c6
je 0x47e6db
mov edi, dword [esp + 0x354]
xor esi, esi
cmp edi, 0xffffffff
je 0x47e9bc
lea eax, [esp + 0x148]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47e9aa
mov esi, 1
lea eax, [esp + 0x44]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47e9bc
or esi, 4
cmp ebx, 0xffffffff
je 0x47e9e8
lea eax, [esp + 0x148]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47e9d6
or esi, 8
lea eax, [esp + 0x44]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47e9e8
or esi, 4
mov ebx, dword [esp + 0x35c]
cmp ebx, 0xffffffff
je 0x47ea1b
lea eax, [esp + 0x24c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47ea09
or esi, 2
lea eax, [esp + 0x44]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47ea1b
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret