Function at 0x504370
Capabilities:
Get socket status

Disassembly:
sub esp, 0x350
mov eax, dword [0x600088]
xor eax, esp
mov dword [esp + 0x34c], eax
push ebx
xor eax, eax
mov dword [esp + 0x1c], 0
push ebp
mov dword [esp + 0xc], eax
xorps xmm0, xmm0
mov eax, dword [esp + 0x36c]
movlpd qword [esp + 0x18], xmm0
mov dword [esp + 8], eax
push esi
push edi
test eax, eax
jl 0x5043cc
jg 0x5043bf
mov edi, dword [esp + 0x370]
cmp edi, 0x7fffffff
jb 0x5043d3
xor eax, eax
mov edi, 0x7fffffff
mov dword [esp + 0x10], eax
jmp 0x5043d3
mov edi, dword [esp + 0x370]
cmp dword [esp + 0x364], 0xffffffff
mov ebp, dword [esp + 0x368]
jne 0x504419
cmp ebp, 0xffffffff
jne 0x504419
cmp dword [esp + 0x36c], ebp
jne 0x504419
test edi, edi
je 0x504412
jns 0x50440b
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x50472b
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x50472b
test eax, eax
jl 0x504439
jg 0x504423
test edi, edi
je 0x504439
lea eax, [esp + 0x30]
mov dword [esp + 0x14], edi
push eax
call fcn.0050bd10
add esp, 4
movups xmm0, xmmword [eax]
jmp 0x50443e
movups xmm0, xmmword [esp + 0x20]
mov eax, dword [esp + 0x364]
xor esi, esi
mov dword [esp + 0x50], esi
movups xmmword [esp + 0x30], xmm0
cmp eax, 0xffffffff
je 0x504469
mov esi, 1
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x25c], eax
or ecx, 0xffffffff
mov ebx, eax
cmp eax, ecx
mov edx, esi
cmove ebx, ecx
mov ecx, edx
mov dword [esp + 0x258], ecx
cmp ebp, 0xffffffff
je 0x5044f9
xor eax, eax
test esi, esi
je 0x50449b
nop dword [eax]
cmp dword [esp + eax*4 + 0x54], ebp
je 0x50449b
inc eax
cmp eax, esi
jb 0x504490
cmp eax, esi
jne 0x5044b1
cmp esi, 0x40
jae 0x5044b1
mov dword [esp + eax*4 + 0x54], ebp
mov esi, dword [esp + 0x50]
inc esi
mov dword [esp + 0x50], esi
xor eax, eax
test edx, edx
je 0x5044c5
cmp dword [esp + eax*4 + 0x25c], ebp
je 0x5044c5
inc eax
cmp eax, edx
jb 0x5044b7
mov ecx, edx
mov dword [esp + 0x258], ecx
cmp eax, edx
jne 0x5044f4
mov dword [esp + 0x258], ecx
cmp edx, 0x40
jae 0x5044f4
mov dword [esp + eax*4 + 0x25c], ebp
mov ecx, dword [esp + 0x258]
inc ecx
mov dword [esp + 0x258], ecx
cmp ebp, ebx
cmova ebx, ebp
mov edx, dword [esp + 0x36c]
mov dword [esp + 0x154], 0
cmp edx, 0xffffffff
je 0x50455a
xor eax, eax
mov dword [esp + 0x158], edx
mov dword [esp + 0x154], 1
test ecx, ecx
je 0x50453e
nop dword [eax + eax]
cmp dword [esp + eax*4 + 0x25c], edx
je 0x50453e
inc eax
cmp eax, ecx
jb 0x504530
cmp eax, ecx
jne 0x504555
cmp ecx, 0x40
jae 0x504555
mov dword [esp + eax*4 + 0x25c], edx
inc dword [esp + 0x258]
cmp edx, ebx
cmova ebx, edx
mov ecx, dword [esp + 0x10]
test ecx, ecx
jg 0x504572
jl 0x504568
test edi, edi
jae 0x504572
mov dword [esp + 0x18], 0
jmp 0x50457a
lea eax, [esp + 0x20]
mov dword [esp + 0x18], eax
lea eax, [ebx + 1]
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x1c], eax
test ecx, ecx
jl 0x5045be
jg 0x504591
test edi, edi
je 0x5045be
mov ecx, dword [esp + 0x14]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x20], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x24], eax
jmp 0x5045cc
mov eax, edi
or eax, ecx
jne 0x5045cc
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
push dword [esp + 0x18]
xor ecx, ecx
lea eax, [esp + 0x25c]
cmp dword [esp + 0x158], ecx
push eax
lea eax, [esp + 0x15c]
cmove eax, ecx
test esi, esi
push eax
lea eax, [esp + 0x5c]
cmove eax, ecx
push eax
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x504681
call ebx
test eax, eax
je 0x504623
cmp dword [0x60d164], 0
jne 0x504403
cmp eax, 0x2714
jne 0x504403
mov ecx, dword [esp + 0x10]
test ecx, ecx
jl 0x504631
jg 0x50463a
test edi, edi
jne 0x50463a
mov esi, dword [esp + 0x50]
jmp 0x504587
lea eax, [esp + 0x40]
push eax
call fcn.0050bd10
movups xmm0, xmmword [esp + 0x34]
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.0050bd50
mov ecx, edi
add esp, 0x20
sub ecx, eax
mov dword [esp + 0x14], ecx
test ecx, ecx
jle 0x504412
mov esi, dword [esp + 0x50]
mov ecx, dword [esp + 0x10]
jmp 0x504587
test eax, eax
js 0x504403
je 0x504412
mov ebx, dword [esp + 0x364]
xor esi, esi
cmp ebx, 0xffffffff
je 0x5046c7
lea eax, [esp + 0x50]
push eax
push ebx
call fcn.0058cf2a
test eax, eax
mov ecx, 1
lea eax, [esp + 0x258]
push eax
push ebx
cmovne esi, ecx
call fcn.0058cf2a
test eax, eax
je 0x5046c7
or esi, 4
cmp ebp, 0xffffffff
je 0x5046f3
lea eax, [esp + 0x50]
push eax
push ebp
call fcn.0058cf2a
test eax, eax
je 0x5046de
or esi, 8
lea eax, [esp + 0x258]
push eax
push ebp
call fcn.0058cf2a
test eax, eax
je 0x5046f3
or esi, 4
mov ebx, dword [esp + 0x36c]
cmp ebx, 0xffffffff
je 0x504729
lea eax, [esp + 0x154]
push eax
push ebx
call fcn.0058cf2a
test eax, eax
je 0x504714
or esi, 2
lea eax, [esp + 0x258]
push eax
push ebx
call fcn.0058cf2a
test eax, eax
je 0x504729
or esi, 4
mov eax, esi
mov ecx, dword [esp + 0x35c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ac0cf
add esp, 0x350
ret