Function at 0x47a0a0
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 0x47a0ed
jg 0x47a0e4
mov edi, dword [esp + 0x360]
cmp edi, 0x7fffffff
jb 0x47a0f4
mov edi, bind
xor ebp, ebp
jmp 0x47a0f4
mov edi, dword [esp + 0x360]
mov ecx, dword [esp + 0x354]
mov ebx, dword [esp + 0x358]
cmp ecx, 0xffffffff
jne 0x47a148
cmp ebx, 0xffffffff
jne 0x47a148
cmp dword [esp + 0x35c], ebx
jne 0x47a148
test edi, edi
je 0x47a13b
jns 0x47a134
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 0x47a183
jg 0x47a152
test edi, edi
je 0x47a183
lea eax, [esp + 0x34]
mov dword [esp + 0x14], edi
push eax
call fcn.0047d7c0
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 0x47a187
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 0x47a1c9
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 0x47a230
xor ecx, ecx
test esi, esi
je 0x47a1e2
cmp dword [esp + ecx*4 + 0x14c], ebx
je 0x47a1e2
inc ecx
cmp ecx, esi
jb 0x47a1d4
cmp ecx, esi
jne 0x47a201
cmp esi, 0x40
jae 0x47a201
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 0x47a212
cmp dword [esp + ecx*4 + 0x48], ebx
je 0x47a212
inc ecx
cmp ecx, eax
jb 0x47a207
cmp ecx, eax
jne 0x47a228
cmp eax, 0x40
jae 0x47a228
mov dword [esp + ecx*4 + 0x48], ebx
mov eax, dword [esp + 0x44]
inc eax
mov dword [esp + 0x44], eax
cmp ebx, edx
jbe 0x47a230
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x35c]
mov dword [esp + 0x24c], 0
cmp edx, 0xffffffff
je 0x47a288
xor ecx, ecx
mov dword [esp + 0x250], edx
mov dword [esp + 0x24c], 1
test eax, eax
je 0x47a26b
nop
cmp dword [esp + ecx*4 + 0x48], edx
je 0x47a26b
inc ecx
cmp ecx, eax
jb 0x47a260
cmp ecx, eax
jne 0x47a27c
cmp eax, 0x40
jae 0x47a27c
mov dword [esp + ecx*4 + 0x48], edx
inc dword [esp + 0x44]
mov eax, dword [esp + 0x10]
cmp edx, eax
jbe 0x47a28c
mov eax, edx
jmp 0x47a28c
mov eax, dword [esp + 0x10]
test ebp, ebp
jg 0x47a2a0
jl 0x47a296
test edi, edi
jae 0x47a2a0
mov dword [esp + 0x10], 0
jmp 0x47a2a8
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 0x47a2e4
jg 0x47a2bb
test edi, edi
je 0x47a2e4
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 0x47a2f2
mov eax, edi
or eax, ebp
jne 0x47a2f2
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 0x47a3d7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x47a353
cmp dword [0x5a16c8], 0
jne 0x47a126
cmp eax, 0x2714
jne 0x47a126
test ebp, ebp
jl 0x47a360
jg 0x47a36c
test edi, edi
jne 0x47a36c
lea ecx, [ecx]
mov esi, dword [esp + 0x148]
jmp 0x47a2ad
lea eax, [esp + 0x34]
push eax
call fcn.0047d7c0
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.0047d870
mov ecx, edi
add esp, 0x20
sub ecx, eax
mov dword [esp + 0x14], ecx
test ecx, ecx
jle 0x47a13b
mov esi, dword [esp + 0x148]
jmp 0x47a2b1
test eax, eax
js 0x47a126
je 0x47a13b
mov edi, dword [esp + 0x354]
xor esi, esi
cmp edi, 0xffffffff
je 0x47a41c
lea eax, [esp + 0x148]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47a40a
mov esi, 1
lea eax, [esp + 0x44]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47a41c
or esi, 4
cmp ebx, 0xffffffff
je 0x47a448
lea eax, [esp + 0x148]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47a436
or esi, 8
lea eax, [esp + 0x44]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47a448
or esi, 4
mov ebx, dword [esp + 0x35c]
cmp ebx, 0xffffffff
je 0x47a47b
lea eax, [esp + 0x24c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47a469
or esi, 2
lea eax, [esp + 0x44]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47a47b
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret