Function at 0x41a850
Capabilities:
Get socket status

Disassembly:
sub esp, 0x32c
mov eax, dword [0x5279f0]
xor eax, esp
mov dword [esp + 0x328], eax
xor eax, eax
push ebp
mov ebp, dword [esp + 0x33c]
push esi
mov esi, dword [esp + 0x344]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x338]
push edi
mov edi, dword [esp + 0x340]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
cmp eax, 0xffffffff
jne 0x41a8f3
cmp edi, 0xffffffff
jne 0x41a8f3
cmp ebp, edi
jne 0x41a8f3
test esi, esi
je 0x41a8d9
jns 0x41a8d2
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, edi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.004c22ab
add esp, 0x32c
ret
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.004c22ab
add esp, 0x32c
ret
test esi, esi
jle 0x41a90f
mov dword [esp + 0x18], esi
call fcn.00413840
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x33c]
mov dword [esp + 0x10], edx
push ebx
xor ecx, ecx
xor edx, edx
or ebx, 0xffffffff
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x130], edx
cmp eax, 0xffffffff
je 0x41a946
mov edx, 1
mov ecx, edx
mov dword [esp + 0x134], eax
mov dword [esp + 0x130], edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], ecx
mov ebx, eax
cmp edi, 0xffffffff
je 0x41a9a6
xor eax, eax
test edx, edx
je 0x41a95f
cmp dword [esp + eax*4 + 0x134], edi
je 0x41a95f
inc eax
cmp eax, edx
jb 0x41a951
cmp eax, edx
jne 0x41a976
cmp edx, 0x40
jae 0x41a976
mov dword [esp + eax*4 + 0x134], edi
inc dword [esp + 0x130]
xor eax, eax
test ecx, ecx
je 0x41a98b
lea esp, [esp]
cmp dword [esp + eax*4 + 0x30], edi
je 0x41a98b
inc eax
cmp eax, ecx
jb 0x41a980
cmp eax, ecx
jne 0x41a9a1
cmp ecx, 0x40
jae 0x41a9a1
mov dword [esp + eax*4 + 0x30], edi
mov ecx, dword [esp + 0x2c]
inc ecx
mov dword [esp + 0x2c], ecx
cmp edi, ebx
cmova ebx, edi
mov dword [esp + 0x234], 0
cmp ebp, 0xffffffff
je 0x41a9f1
xor eax, eax
mov dword [esp + 0x238], ebp
mov dword [esp + 0x234], 1
test ecx, ecx
je 0x41a9db
mov edi, edi
cmp dword [esp + eax*4 + 0x30], ebp
je 0x41a9db
inc eax
cmp eax, ecx
jb 0x41a9d0
cmp eax, ecx
jne 0x41a9ec
cmp ecx, 0x40
jae 0x41a9ec
mov dword [esp + eax*4 + 0x30], ebp
inc dword [esp + 0x2c]
cmp ebp, ebx
cmova ebx, ebp
xor ecx, ecx
lea eax, [esp + 0x20]
test esi, esi
cmovs eax, ecx
lea ecx, [ebx + 1]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ecx
jmp 0x41aa10
test esi, esi
jle 0x41aa43
mov eax, 0x10624dd3
imul ebx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x20], ecx
imul ecx, ecx, 0x3e8
mov eax, ebx
sub eax, ecx
imul eax, eax, 0x3e8
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
jmp 0x41aa55
jne 0x41aa55
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x23c]
push eax
lea eax, [esp + 0x13c]
push eax
push dword [esp + 0x38]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x41aabb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x41aa8b
cmp eax, 0x2714
jne 0x41aabf
mov eax, dword [esp + 0x10]
test esi, esi
jle 0x41aa43
push dword [esp + 0x14]
push dword [esp + 0x1c]
call fcn.00413840
push edx
push eax
call fcn.004137b0
mov ebx, esi
sub ebx, eax
add esp, 0x10
test ebx, ebx
jle 0x41aabf
mov eax, dword [esp + 0x10]
jmp 0x41aa10
test eax, eax
jns 0x41aac7
or eax, 0xffffffff
jmp 0x41ab62
jne 0x41aad0
xor eax, eax
jmp 0x41ab62
mov ebx, dword [esp + 0x340]
xor esi, esi
cmp ebx, 0xffffffff
je 0x41ab08
lea eax, [esp + 0x130]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
lea eax, [esp + 0x2c]
push eax
mov ecx, 1
push ebx
cmovne esi, ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41ab08
or esi, 4
cmp edi, 0xffffffff
je 0x41ab34
lea eax, [esp + 0x130]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41ab22
or esi, 8
lea eax, [esp + 0x2c]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41ab34
or esi, 4
cmp ebp, 0xffffffff
je 0x41ab60
lea eax, [esp + 0x234]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41ab4e
or esi, 2
lea eax, [esp + 0x2c]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41ab60
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x338]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004c22ab
add esp, 0x32c
ret