Function at 0x4784b0
Capabilities:
Get socket status

Disassembly:
mov eax, 0x2030
call fcn.0042b9c0
push ebx
mov ebx, dword [esp + 0x203c]
push ebp
push esi
push edi
push 0
mov dword [esp + 0x14], 0xffffffff
call fcn.0042c4ff
mov esi, dword [0x4bf3bc]
add esp, 4
xor edx, edx
cmp esi, 0x4bf3b8
mov dword [0x4cbf08], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x103c], edx
je 0x478548
mov ebp, dword [esp + 0x10]
xor eax, eax
test edx, edx
jbe 0x478514
mov edi, dword [esi + 0xc]
lea ecx, [esp + 0x3c]
cmp dword [ecx], edi
je 0x478514
inc eax
add ecx, 4
cmp eax, edx
jb 0x478508
cmp eax, edx
jne 0x478530
cmp edx, 0x400
jae 0x478530
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 0x47853d
mov ebp, eax
mov dword [esp + 0x10], ebp
mov esi, dword [esi + 4]
cmp esi, 0x4bf3b8
jne 0x4784fb
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 0x478613
mov edx, dword [esi + 0x104]
mov eax, dword [esi + 0x108]
sub edx, eax
je 0x478598
mov edx, dword [esi + 0xf8]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x38]
push eax
push ecx
push edx
call fcn.004793a0
add esp, 0xc
mov eax, dword [esi + 0xd4]
mov ecx, dword [esi + 0xd8]
sub eax, ecx
je 0x4785c4
mov eax, dword [esi + 0xf8]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x103c]
push ecx
push edx
push eax
call fcn.004793a0
add esp, 0xc
mov ecx, dword [esi + 0xd0]
mov eax, dword [esi + 0xd4]
sub ecx, eax
je 0x4785e4
mov eax, dword [esi + 0xf0]
test al, 4
je 0x4785e4
test al, 0x40
je 0x4785e4
xor ebx, ebx
mov edx, dword [esi + 0x108]
mov eax, dword [esi + 0x10c]
sub edx, eax
je 0x478604
mov eax, dword [esi + 0xf0]
test al, 8
je 0x478604
test al, 0x40
je 0x478604
xor ebx, ebx
mov esi, dword [esi + 4]
mov eax, dword [esp + 0x14]
cmp esi, eax
jne 0x47856f
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 0x478674
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2030
ret
mov esi, dword [0x4bf3bc]
mov ebx, 0x10
cmp esi, 0x4bf3b8
je 0x4786d3
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 0x4786c4
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 0x4786c4
push eax
push ebp
call fcn.004781a0
add esp, 8
jmp 0x47869f
mov esi, dword [esi + 4]
cmp esi, 0x4bf3b8
jne 0x47868d
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 0x47883f
mov eax, dword [esi + 0xf8]
lea edx, [esp + 0x38]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x478720
mov ecx, dword [esi + 0x104]
mov eax, dword [esi + 0x108]
sub ecx, eax
je 0x478720
lea edx, [esi + 0xf4]
push edx
call fcn.00479100
add esp, 4
test byte [esi + 0x124], 1
jne 0x478732
push esi
call fcn.00478860
add esp, 4
mov eax, dword [esi + 0xd0]
mov ecx, dword [esi + 0xd4]
sub eax, ecx
je 0x47875a
test byte [esi + 0xf0], 0x40
je 0x47875a
lea ecx, [esi + 0xc0]
push ecx
call fcn.00479100
add esp, 4
mov edx, dword [esi + 0x108]
mov eax, dword [esi + 0x10c]
sub edx, eax
je 0x47879a
test byte [esi + 0xf0], 8
je 0x47879a
mov eax, dword [esi + 0xe0]
test eax, eax
je 0x47879a
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x47879a
lea eax, [esi + 0xc0]
lea ecx, [esi + 0xf4]
push eax
push ecx
call fcn.004791b0
add esp, 8
mov edx, dword [esi + 0xd4]
mov eax, dword [esi + 0xd8]
sub edx, eax
je 0x4787ca
mov eax, dword [esi + 0x114]
test eax, eax
je 0x4787ca
lea eax, [esi + 0xf4]
lea ecx, [esi + 0xc0]
push eax
push ecx
call fcn.004791b0
add esp, 8
mov eax, dword [esi + 0x118]
test eax, eax
jle 0x4787e3
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 0x4787fc
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 [0x4cbf08]
mov eax, dword [esi + 0x24]
cmp edx, eax
jg 0x478829
test byte [esi + 0x124], bl
jne 0x478829
test byte [esi + 0xf0], bl
je 0x478832
mov eax, dword [esi + 0xd4]
mov ecx, dword [esi + 0xd8]
sub eax, ecx
jne 0x478832
push esi
call fcn.00479240
add esp, 4
mov esi, edi
mov edi, dword [edi + 4]
cmp esi, ebp
jne 0x4786ec
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