Function at 0x41d810
Capabilities:
Get socket status

Disassembly:
sub esp, 0x348
mov eax, dword [0x476018]
xor eax, esp
mov dword [esp + 0x344], eax
mov ecx, dword [esp + 0x354]
push ebx
mov ebx, dword [esp + 0x350]
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x14], esi
cmp ebx, esi
je 0x41d86c
mov edx, dword [esp + 0x360]
xor eax, eax
cmp edx, esi
jbe 0x41d86c
cmp dword [ebx + eax*8], 0xffffffff
jne 0x41d893
inc eax
cmp eax, edx
jb 0x41d861
cmp ecx, esi
je 0x41d88c
jge 0x41d885
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x41db99
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x41db99
cmp ecx, esi
jle 0x41d8c3
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x18], ecx
call fcn.00430860
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x28], edx
mov edx, dword [eax + 0xc]
add esp, 4
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
xor ecx, ecx
xor edi, edi
or eax, 0xffffffff
mov dword [esp + 0x48], ecx
mov dword [esp + 0x14c], esi
mov dword [esp + 0x250], edi
mov dword [esp + 0x18], eax
xor ebp, ebp
xor edx, edx
mov word [ebx + ebp*8 + 6], dx
mov edx, dword [ebx + ebp*8]
cmp edx, 0xffffffff
je 0x41d9b5
movzx ebx, word [ebx + ebp*8 + 4]
test bl, 7
je 0x41d9ad
cmp edx, eax
jbe 0x41d90b
mov dword [esp + 0x18], edx
test bl, 1
je 0x41d937
xor eax, eax
test ecx, ecx
je 0x41d921
cmp dword [esp + eax*4 + 0x4c], edx
je 0x41d921
inc eax
cmp eax, ecx
jb 0x41d916
cmp eax, ecx
jne 0x41d937
cmp ecx, 0x40
jae 0x41d937
mov dword [esp + eax*4 + 0x4c], edx
mov ecx, dword [esp + 0x48]
inc ecx
mov dword [esp + 0x48], ecx
test bl, 4
je 0x41d96f
xor eax, eax
test esi, esi
je 0x41d950
cmp dword [esp + eax*4 + 0x150], edx
je 0x41d950
inc eax
cmp eax, esi
jb 0x41d942
cmp eax, esi
jne 0x41d96f
cmp esi, 0x40
jae 0x41d96f
mov dword [esp + eax*4 + 0x150], edx
mov esi, dword [esp + 0x14c]
inc esi
mov dword [esp + 0x14c], esi
test bl, 2
je 0x41d9ad
xor eax, eax
test edi, edi
je 0x41d98e
lea ebx, [ebx]
cmp dword [esp + eax*4 + 0x254], edx
je 0x41d98e
inc eax
cmp eax, edi
jb 0x41d980
cmp eax, edi
jne 0x41d9ad
cmp edi, 0x40
jae 0x41d9ad
mov dword [esp + eax*4 + 0x254], edx
mov edi, dword [esp + 0x250]
inc edi
mov dword [esp + 0x250], edi
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc ebp
cmp ebp, dword [esp + 0x360]
jb 0x41d8e2
test ecx, ecx
jne 0x41d9eb
test esi, esi
jne 0x41d9eb
test edi, edi
jne 0x41d9eb
mov eax, dword [esp + 0x10]
test eax, eax
je 0x41d9e4
js 0x41d872
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x41db99
xor ebx, ebx
cmp dword [esp + 0x10], ebx
lea edx, [esp + 0x30]
setl bl
lea ebp, [eax + 1]
dec ebx
and ebx, edx
jmp 0x41da12
mov edi, dword [esp + 0x250]
mov esi, dword [esp + 0x14c]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x10]
xor edx, edx
cmp eax, edx
jle 0x41da47
mov eax, 0x10624dd3
imul dword [esp + 0x14]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x30], eax
imul eax, eax, 0x3e8
sub edx, eax
imul edx, edx, 0x3e8
jmp 0x41da4d
jne 0x41da51
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
neg edi
sbb edi, edi
lea eax, [esp + 0x250]
and edi, eax
neg esi
sbb esi, esi
push ebx
lea edx, [esp + 0x150]
and esi, edx
neg ecx
push edi
sbb ecx, ecx
lea eax, [esp + 0x50]
push esi
and ecx, eax
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x41db1a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x41daab
cmp dword [0x47a798], 0
jne 0x41d87d
cmp eax, 0x2714
jne 0x41d87d
cmp dword [esp + 0x10], 0
jle 0x41da00
lea ecx, [esp + 0x38]
push ecx
call fcn.00430860
mov edx, dword [esp + 0x24]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x34]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x38]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x3c]
mov dword [ecx + 0xc], edx
mov edx, dword [eax]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
call fcn.00430940
mov ecx, dword [esp + 0x30]
sub ecx, eax
add esp, 0x20
mov dword [esp + 0x14], ecx
test ecx, ecx
jle 0x41d88c
jmp 0x41da00
test eax, eax
js 0x41d87d
je 0x41d88c
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x360]
xor ebx, ebx
add esi, 6
mov eax, dword [esi - 6]
xor ecx, ecx
mov word [esi], cx
cmp eax, 0xffffffff
je 0x41db91
lea edx, [esp + 0x48]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41db58
or word [esi], 1
mov ecx, dword [esi - 6]
lea eax, [esp + 0x14c]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41db71
or word [esi], 4
mov eax, dword [esi - 6]
lea edx, [esp + 0x250]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41db8a
or word [esi], 2
cmp word [esi], 0
je 0x41db91
inc ebx
add esi, 8
dec edi
jne 0x41db38
mov eax, ebx
mov ecx, dword [esp + 0x354]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00418a8f
add esp, 0x348
ret