Function at 0x451f70
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x4c506c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x334], esi
test esi, esi
je 0x451fac
mov ecx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
je 0x451fac
cmp dword [esi + eax*8], 0xffffffff
jne 0x451fe6
inc eax
cmp eax, ecx
jb 0x451fa1
mov eax, edx
or eax, ebx
je 0x45243f
test ebx, ebx
jg 0x452429
jl 0x451fc8
test edx, edx
jae 0x45241e
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475c6f
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x334]
xor edx, edx
push edi
xor ebx, ebx
mov dword [ebp - 0x20c], edx
xor esi, esi
mov dword [ebp - 0x310], ebx
or edi, 0xffffffff
mov dword [ebp - 0x108], esi
add eax, 4
mov dword [ebp - 0x324], edi
mov dword [ebp - 0x32c], edx
mov dword [ebp - 0x320], eax
nop dword [eax]
xor ecx, ecx
mov dword [ebp - 0x328], edi
mov word [eax + 2], cx
mov ecx, dword [eax - 4]
cmp ecx, 0xffffffff
je 0x452147
jae 0x452186
movzx edx, word [eax]
movzx esi, dx
test edx, 0x710
mov dword [ebp - 0x314], edx
mov edx, dword [ebp - 0x20c]
mov dword [ebp - 0x31c], esi
mov esi, dword [ebp - 0x108]
je 0x452147
cmp ecx, dword [ebp - 0x328]
mov edi, ecx
cmovbe edi, dword [ebp - 0x328]
test dword [ebp - 0x314], 0x300
mov dword [ebp - 0x324], edi
je 0x4520bb
xor eax, eax
test ebx, ebx
je 0x45209e
nop
cmp dword [ebp + eax*4 - 0x30c], ecx
je 0x45209e
inc eax
cmp eax, ebx
jb 0x452090
cmp eax, ebx
jne 0x4520bb
cmp ebx, 0x40
jae 0x4520bb
mov dword [ebp + eax*4 - 0x30c], ecx
mov ebx, dword [ebp - 0x310]
inc ebx
mov dword [ebp - 0x310], ebx
mov eax, dword [ebp - 0x31c]
test al, 0x10
je 0x452101
xor eax, eax
test esi, esi
je 0x4520de
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x104], ecx
je 0x4520de
inc eax
cmp eax, esi
jb 0x4520d0
cmp eax, esi
jne 0x4520fb
cmp esi, 0x40
jae 0x4520fb
mov dword [ebp + eax*4 - 0x104], ecx
mov esi, dword [ebp - 0x108]
inc esi
mov dword [ebp - 0x108], esi
mov eax, dword [ebp - 0x31c]
test eax, 0x600
je 0x452141
xor eax, eax
test edx, edx
je 0x45211e
nop
cmp dword [ebp + eax*4 - 0x208], ecx
je 0x45211e
inc eax
cmp eax, edx
jb 0x452110
cmp eax, edx
jne 0x45213b
cmp edx, 0x40
jae 0x45213b
mov dword [ebp + eax*4 - 0x208], ecx
mov edx, dword [ebp - 0x20c]
inc edx
mov dword [ebp - 0x20c], edx
mov dword [ebp - 0x324], edi
mov eax, dword [ebp - 0x320]
mov ecx, dword [ebp - 0x32c]
add eax, 8
inc ecx
mov dword [ebp - 0x320], eax
mov dword [ebp - 0x32c], ecx
cmp ecx, dword [ebp + 0xc]
jb 0x452020
test ebx, ebx
jne 0x4521a5
test esi, esi
jne 0x4521a5
test edx, edx
jne 0x4521a5
push dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
push edi
call fcn.00452580
add esp, 8
jmp 0x45233a
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475c6f
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x318]
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jg 0x4521d0
jl 0x4521c1
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jae 0x4521d3
mov dword [ebp - 0x31c], 0
jmp 0x4522f6
mov ecx, dword [ebp + 0x10]
test eax, eax
jl 0x4522e2
jg 0x4521e5
test ecx, ecx
je 0x4522e2
mov eax, ecx
mov ebx, 0x1a9fbe77
mul ebx
mov edi, 0x624dd2f
mov dword [ebp - 0x318], eax
mov esi, edx
mov eax, ecx
mul edi
push 0
mov edi, eax
mov dword [ebp - 0x314], edx
mov eax, dword [ebp + 0x14]
mul ebx
push 0x3e8
mov ecx, eax
mov ebx, edx
mov eax, dword [ebp + 0x14]
mov edx, 0x624dd2f
mul edx
add ecx, esi
mov dword [ebp - 0x328], eax
adc ebx, 0
add edi, ecx
mov ecx, dword [ebp - 0x314]
adc ecx, 0
mov dword [ebp - 0x330], edi
mov edi, dword [ebp + 0x10]
xor eax, eax
add ebx, ecx
mov ecx, dword [ebp - 0x328]
adc eax, eax
add ecx, ebx
mov ebx, dword [ebp + 0x14]
mov esi, ebx
adc edx, eax
mov eax, edi
sub eax, ecx
sbb esi, edx
shrd eax, esi, 1
shr esi, 1
add eax, ecx
adc esi, edx
shrd eax, esi, 9
shr esi, 9
push esi
push eax
mov dword [ebp - 0x32c], eax
call fcn.00476a50
sub edi, eax
push 0
push 0x3e8
sbb ebx, edx
push ebx
push edi
call fcn.00476a50
mov dword [ebp - 0x314], edx
test esi, esi
jl 0x4522c8
jg 0x4522a5
mov ecx, dword [ebp - 0x32c]
cmp ecx, 0x7fffffff
jbe 0x4522ce
mov ebx, dword [ebp - 0x310]
mov ecx, closesocket
mov dword [ebp - 0x314], 0
mov dword [ebp - 0x318], ecx
mov dword [ebp - 0x314], eax
jmp 0x4522f6
mov ecx, dword [ebp - 0x32c]
mov ebx, dword [ebp - 0x310]
mov dword [ebp - 0x318], ecx
mov dword [ebp - 0x314], eax
jmp 0x4522f6
mov dword [ebp - 0x318], 0
mov dword [ebp - 0x314], 0
push dword [ebp - 0x31c]
xor eax, eax
lea edx, [ebp - 0x20c]
cmp dword [ebp - 0x20c], eax
lea ecx, [ebp - 0x108]
cmove edx, eax
cmp dword [ebp - 0x108], eax
push edx
cmove ecx, eax
xor esi, esi
test ebx, ebx
lea eax, [ebp - 0x310]
push ecx
cmove eax, esi
push eax
mov eax, dword [ebp - 0x324]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x452194
mov esi, dword [ebp - 0x334]
xor edi, edi
mov eax, dword [ebp + 0xc]
add esi, 6
mov ebx, 0x200
xor ecx, ecx
mov word [esi], cx
mov ecx, dword [esi - 6]
cmp ecx, 0xffffffff
je 0x4523fc
lea eax, [ebp - 0x310]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4523a1
movzx ecx, word [esi - 2]
test ecx, 0x100
je 0x45238b
mov eax, 0x100
or word [esi], ax
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x300
je 0x4523a1
or eax, 0x300
mov word [esi], ax
lea eax, [ebp - 0x108]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4523be
test byte [esi - 2], 0x10
je 0x4523be
or word [esi], 0x10
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4523f2
movzx ecx, word [esi - 2]
test ebx, ecx
je 0x4523dc
or word [esi], bx
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x400
je 0x4523f2
or eax, 0x400
mov word [esi], ax
cmp word [esi], 0
mov eax, dword [ebp + 0xc]
je 0x4523fc
inc edi
add esi, 8
sub eax, 1
mov dword [ebp + 0xc], eax
jne 0x452355
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475c6f
mov esp, ebp
pop ebp
ret
test ebx, ebx
jl 0x452438
jg 0x452429
cmp edx, 0xffffffff
jb 0x452438
mov edx, 0xfffffffe
mov dword [ebp - 0x314], 0
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.00475c6f
mov esp, ebp
pop ebp
ret