Function at 0x52afc0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c4cf8
mov eax, dword fs:[0]
push eax
sub esp, 0x878
mov eax, dword [0x68cc00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x14]
mov ecx, esi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x87c], esi
call fcn.0046d400
cmp byte [ebp + 0x10], 0
je 0x52b00e
mov ebx, 1
jmp 0x52b01b
mov ebx, dword [ebp + 0xc]
mov eax, 0x1499700
test ebx, ebx
cmove ebx, eax
mov eax, dword [esi + 4]
test eax, eax
je 0x52b043
cmp dword [eax + 0x88], 0
jne 0x52b043
mov ecx, esi
call fcn.0046d4a0
test al, al
je 0x52b043
mov eax, dword [esi + 4]
mov dword [eax + 0x88], 0x42
mov ecx, dword [ebp + 8]
cmp ecx, 0xffffffff
jne 0x52b060
mov eax, dword [edi]
mov ecx, edi
push str.invalid_socket__not_ready_for_writing.
call dword [eax + 0x14]
mov byte [esi + 0x16], 1
jmp 0x52b276
mov eax, dword [ebp - 0x87c]
mov esi, 0x32
mov dword [ebp - 0x880], esi
mov eax, dword [eax + 4]
test eax, eax
je 0x52b08e
mov esi, dword [eax + 0x88]
mov eax, 0x32
cmp esi, eax
cmovb esi, eax
mov dword [ebp - 0x880], esi
push ecx
call fcn.00401460
add esp, 4
test al, al
je 0x52b0d5
mov eax, dword [ebp - 0x87c]
mov dword [ebp - 0x14], 0
push dword [eax + 4]
lea eax, [ebp - 0x14]
push eax
push edi
push 0
push 0
push ebx
push esi
push dword [ebp + 8]
call fcn.0059f640
add esp, 0x20
test al, al
je 0x52b276
cmp dword [ebp - 0x14], 0
setg al
jmp 0x52b278
xor eax, eax
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0x52b233
xor ecx, ecx
xor edx, edx
xor esi, esi
cmp byte [ebp + 0x10], cl
jne 0x52b124
mov esi, ebx
sub esi, eax
mov eax, dword [ebp - 0x880]
cmp ebx, esi
cmovbe esi, eax
test eax, eax
je 0x52b105
cmp esi, eax
cmova esi, eax
cmp esi, ebx
mov eax, 0x10624dd3
cmova esi, ebx
mul esi
mov ecx, esi
shr edx, 6
imul eax, edx, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x878]
mov dword [ebp - 0x24], edx
call fcn.004fbbf0
lea ecx, [ebp - 0x878]
mov dword [ebp - 4], 0
call fcn.004fbf70
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0x878]
call fcn.004fbf20
test al, al
je 0x52b3ab
xorps xmm0, xmm0
lea ecx, [ebp - 0x1c]
movlpd qword [ebp - 0x1c], xmm0
call fcn.00429fd0
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 1
push eax
push 0
lea eax, [ebp - 0x86c]
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x884], eax
cmp eax, 0xffffffff
je 0x52b341
test eax, eax
js 0x52b341
jg 0x52b2b7
cmp byte [ebp + 0x10], 0
jne 0x52b294
mov eax, dword [ebp - 0x14]
add eax, esi
mov dword [ebp - 0x14], eax
cmp eax, ebx
jae 0x52b219
mov esi, dword [ebp - 0x87c]
mov ecx, esi
push edi
call fcn.0046d560
test al, al
jne 0x52b1f0
lea ecx, [ebp - 0x1c]
call fcn.0042a070
lea ecx, [ebp - 0x878]
mov dword [ebp - 4], 0xffffffff
call fcn.004fbd40
mov eax, dword [ebp - 0x14]
jmp 0x52b0e2
mov byte [esi + 0x15], 1
mov ecx, edi
mov eax, dword [edi]
push str.socket_write_aborted_by_application..
call dword [eax + 0x14]
lea ecx, [ebp - 0x1c]
xor bl, bl
call fcn.0042a070
lea ecx, [ebp - 0x878]
call fcn.004fbd40
mov al, bl
jmp 0x52b278
lea ecx, [ebp - 0x1c]
call fcn.0042a070
lea ecx, [ebp - 0x878]
mov dword [ebp - 4], 0xffffffff
call fcn.004fbd40
push dword [ebp + 8]
mov ecx, edi
push str.socketNum
call fcn.00448710
push ebx
push str.timeoutMs
mov ecx, edi
call fcn.00448710
movzx eax, byte [ebp + 0x10]
mov ecx, edi
push eax
push str.bPoll
call fcn.00448710
mov eax, dword [edi]
mov ecx, edi
push str.UDP_socket_is_not_ready_for_writing_
call dword [eax + 0x14]
mov eax, dword [ebp - 0x87c]
mov byte [eax + 0x14], 1
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005af5a8
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x87c]
lea ecx, [ebp - 0x1c]
xor bl, bl
mov byte [eax + 0x14], 1
call fcn.0042a070
lea ecx, [ebp - 0x878]
call fcn.004fbd40
mov al, bl
jmp 0x52b278
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x86c]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x52b38f
push eax
push str.nfds
mov ecx, edi
call fcn.00448710
push dword [ebp - 0x884]
mov ecx, edi
push str.nStatus
call fcn.00448710
push esi
push str.socketNum
mov ecx, edi
call fcn.00448710
push ebx
push str.timeoutMs
mov ecx, edi
call fcn.00448710
movzx eax, byte [ebp + 0x10]
mov ecx, edi
push eax
push str.bPoll
call fcn.00448710
mov eax, dword [edi]
mov ecx, edi
push str.UDP_socket_select_for_writeability_returned_unexpected_result_
call dword [eax + 0x18]
lea ecx, [ebp - 0x1c]
mov bl, 1
call fcn.0042a070
lea ecx, [ebp - 0x878]
call fcn.004fbd40
mov al, bl
jmp 0x52b278
mov ecx, edi
call fcn.00448fd0
push 0
push str.nfds
mov ecx, edi
call fcn.00448710
push dword [ebp + 8]
mov ecx, edi
push str.socketNum
call fcn.00448710
push ebx
push str.timeoutMs
mov ecx, edi
call fcn.00448710
movzx eax, byte [ebp + 0x10]
mov ecx, edi
push eax
push str.bPoll
call fcn.00448710
mov eax, dword [edi]
mov ecx, edi
push str.UDP_socket_select_for_writeable_returned_an_error_
call dword [eax + 0x14]
lea ecx, [ebp - 0x1c]
mov bl, 1
call fcn.0042a070
lea ecx, [ebp - 0x878]
call fcn.004fbd40
mov al, bl
jmp 0x52b278
lea ecx, [ebp - 0x878]
mov bl, 1
call fcn.004fbd40
mov al, bl
jmp 0x52b278