Function at 0x476d20
Capabilities:
Get socket status

Disassembly:
mov eax, 0x2030
call fcn.0042b9a0
push ebx
mov ebx, dword [esp + 0x203c]
push ebp
push esi
push edi
push 0
mov dword [esp + 0x14], 0xffffffff
call fcn.0042c4df
mov esi, dword [0x4bc37c]
add esp, 4
xor edx, edx
cmp esi, 0x4bc378
mov dword [0x4c8db8], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x103c], edx
je 0x476db8
mov ebp, dword [esp + 0x10]
xor eax, eax
test edx, edx
jbe 0x476d84
mov edi, dword [esi + 0xc]
lea ecx, [esp + 0x3c]
cmp dword [ecx], edi
je 0x476d84
inc eax
add ecx, 4
cmp eax, edx
jb 0x476d78
cmp eax, edx
jne 0x476da0
cmp edx, 0x400
jae 0x476da0
mov ecx, dword [esi + 0xc]
mov dword [esp + eax*4 + 0x3c], ecx
mov edx, dword [esp + 0x38]
inc edx
mov dword [esp + 0x38], edx
mov eax, dword [esi + 0xc]
cmp eax, ebp
jle 0x476dad
mov ebp, eax
mov dword [esp + 0x10], ebp
mov esi, dword [esi + 4]
cmp esi, 0x4bc378
jne 0x476d6b
mov ebp, dword [esp + 0x2044]
lea edi, [ebp + 0x6c]
push edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp + 0x24]
lea eax, [ebp + 0x20]
cmp esi, eax
mov dword [esp + 0x14], eax
je 0x476e83
mov edx, dword [esi + 0x104]
mov eax, dword [esi + 0x108]
sub edx, eax
je 0x476e08
mov edx, dword [esi + 0xf8]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x38]
push eax
push ecx
push edx
call fcn.00477c10
add esp, 0xc
mov eax, dword [esi + 0xd4]
mov ecx, dword [esi + 0xd8]
sub eax, ecx
je 0x476e34
mov eax, dword [esi + 0xf8]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x103c]
push ecx
push edx
push eax
call fcn.00477c10
add esp, 0xc
mov ecx, dword [esi + 0xd0]
mov eax, dword [esi + 0xd4]
sub ecx, eax
je 0x476e54
mov eax, dword [esi + 0xf0]
test al, 4
je 0x476e54
test al, 0x40
je 0x476e54
xor ebx, ebx
mov edx, dword [esi + 0x108]
mov eax, dword [esi + 0x10c]
sub edx, eax
je 0x476e74
mov eax, dword [esi + 0xf0]
test al, 8
je 0x476e74
test al, 0x40
je 0x476e74
xor ebx, ebx
mov esi, dword [esi + 4]
mov eax, dword [esp + 0x14]
cmp esi, eax
jne 0x476ddf
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x10624dd3
mov ecx, 0x3e8
imul ebx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ebx
mov dword [esp + 0x1c], edx
cdq
idiv ecx
lea eax, [esp + 0x103c]
lea ecx, [esp + 0x38]
mov dword [esp + 0x20], edx
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x14]
push 0
push eax
inc edx
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_select]
test eax, eax
jge 0x476ee4
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2030
ret
mov esi, dword [0x4bc37c]
mov ebx, 0x10
cmp esi, 0x4bc378
je 0x476f43
mov edi, dword [sym.imp.WSOCK32.dll_accept]
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x38]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x476f34
lea edx, [esp + 0x24]
mov dword [esp + 0x24], ebx
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x28]
push edx
push eax
push ecx
call edi
cmp eax, 0xffffffff
je 0x476f34
push eax
push ebp
call fcn.00476a10
add esp, 8
jmp 0x476f0f
mov esi, dword [esi + 4]
cmp esi, 0x4bc378
jne 0x476efd
mov edi, dword [esp + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp + 0x24]
mov ebp, dword [esp + 0x14]
cmp esi, ebp
mov edi, dword [esi + 4]
je 0x4770af
mov eax, dword [esi + 0xf8]
lea edx, [esp + 0x38]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x476f90
mov ecx, dword [esi + 0x104]
mov eax, dword [esi + 0x108]
sub ecx, eax
je 0x476f90
lea edx, [esi + 0xf4]
push edx
call fcn.00477970
add esp, 4
test byte [esi + 0x124], 1
jne 0x476fa2
push esi
call fcn.004770d0
add esp, 4
mov eax, dword [esi + 0xd0]
mov ecx, dword [esi + 0xd4]
sub eax, ecx
je 0x476fca
test byte [esi + 0xf0], 0x40
je 0x476fca
lea ecx, [esi + 0xc0]
push ecx
call fcn.00477970
add esp, 4
mov edx, dword [esi + 0x108]
mov eax, dword [esi + 0x10c]
sub edx, eax
je 0x47700a
test byte [esi + 0xf0], 8
je 0x47700a
mov eax, dword [esi + 0xe0]
test eax, eax
je 0x47700a
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x47700a
lea eax, [esi + 0xc0]
lea ecx, [esi + 0xf4]
push eax
push ecx
call fcn.00477a20
add esp, 8
mov edx, dword [esi + 0xd4]
mov eax, dword [esi + 0xd8]
sub edx, eax
je 0x47703a
mov eax, dword [esi + 0x114]
test eax, eax
je 0x47703a
lea eax, [esi + 0xf4]
lea ecx, [esi + 0xc0]
push eax
push ecx
call fcn.00477a20
add esp, 8
mov eax, dword [esi + 0x118]
test eax, eax
jle 0x477053
mov ecx, dword [esi + 8]
cdq
add dword [ecx + 0x10], eax
mov eax, dword [ecx + 0x14]
adc eax, edx
mov dword [ecx + 0x14], eax
mov eax, dword [esi + 0xe4]
test eax, eax
jle 0x47706c
mov ecx, dword [esi + 8]
cdq
add dword [ecx + 0x18], eax
mov eax, dword [ecx + 0x1c]
adc eax, edx
mov dword [ecx + 0x1c], eax
mov edx, dword [0x4c8db8]
mov eax, dword [esi + 0x24]
cmp edx, eax
jg 0x477099
test byte [esi + 0x124], bl
jne 0x477099
test byte [esi + 0xf0], bl
je 0x4770a2
mov eax, dword [esi + 0xd4]
mov ecx, dword [esi + 0xd8]
sub eax, ecx
jne 0x4770a2
push esi
call fcn.00477ab0
add esp, 4
mov esi, edi
mov edi, dword [edi + 4]
cmp esi, ebp
jne 0x476f5c
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2030
ret