Function at 0x4be232
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x274
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x134], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x10], 0
jmp 0x4be62c
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [eax + 0xc], 0
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
movzx eax, byte [eax]
movzx eax, al
cmp eax, 2
je 0x4be42b
cmp eax, 3
je 0x4be514
cmp eax, 1
jne 0x4be5f6
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 8]
and eax, 1
test eax, eax
je 0x4be367
mov dword [ebp - 0x20], 0
jmp 0x4be2f2
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + eax*4 - 0x130]
mov eax, dword [ebp - 0x10]
shl eax, 4
mov ecx, eax
mov eax, dword [ebp + 8]
add eax, ecx
mov eax, dword [eax + 4]
cmp edx, eax
je 0x4be2ff
add dword [ebp - 0x20], 1
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 0x20]
ja 0x4be2d0
jmp 0x4be300
nop
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 0x20]
jne 0x4be33f
mov eax, dword [ebp - 0x134]
cmp eax, 0x3f
ja 0x4be33f
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0x20]
mov dword [ebp + eax*4 - 0x130], edx
mov eax, dword [ebp - 0x134]
add eax, 1
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
cmp eax, dword [ebp - 0x1c]
jbe 0x4be367
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 8]
and eax, 4
test eax, eax
je 0x4be621
mov dword [ebp - 0x24], 0
jmp 0x4be3ad
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp + eax*4 - 0x234]
mov eax, dword [ebp - 0x10]
shl eax, 4
mov ecx, eax
mov eax, dword [ebp + 8]
add eax, ecx
mov eax, dword [eax + 4]
cmp edx, eax
je 0x4be3ba
add dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x238]
cmp eax, dword [ebp - 0x24]
ja 0x4be38b
jmp 0x4be3bb
nop
mov eax, dword [ebp - 0x238]
cmp eax, dword [ebp - 0x24]
jne 0x4be3fa
mov eax, dword [ebp - 0x238]
cmp eax, 0x3f
ja 0x4be3fa
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0x234], edx
mov eax, dword [ebp - 0x238]
add eax, 1
mov dword [ebp - 0x238], eax
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
cmp eax, dword [ebp - 0x1c]
jbe 0x4be621
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], eax
jmp 0x4be621
mov dword [ebp - 0x28], 0
jmp 0x4be45f
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + eax*4 - 0x130]
mov eax, dword [ebp - 0x10]
shl eax, 4
mov ecx, eax
mov eax, dword [ebp + 8]
add eax, ecx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 0x144]
cmp edx, eax
je 0x4be46c
add dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 0x28]
ja 0x4be434
jmp 0x4be46d
nop
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 0x28]
jne 0x4be4b5
mov eax, dword [ebp - 0x134]
cmp eax, 0x3f
ja 0x4be4b5
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x4c]
mov edx, dword [eax + 0x144]
mov eax, dword [ebp - 0x28]
mov dword [ebp + eax*4 - 0x130], edx
mov eax, dword [ebp - 0x134]
add eax, 1
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 0x144]
cmp eax, dword [ebp - 0x1c]
jbe 0x4be4ef
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 0x144]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x18], 0
jne 0x4be624
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x4c]
mov dword [ebp - 0x18], eax
jmp 0x4be624
mov dword [ebp - 0x2c], 0
jmp 0x4be548
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp + eax*4 - 0x130]
mov eax, dword [ebp - 0x10]
shl eax, 4
mov ecx, eax
mov eax, dword [ebp + 8]
add eax, ecx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x144]
cmp edx, eax
je 0x4be555
add dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 0x2c]
ja 0x4be51d
jmp 0x4be556
nop
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 0x2c]
jne 0x4be59e
mov eax, dword [ebp - 0x134]
cmp eax, 0x3f
ja 0x4be59e
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 0x144]
mov eax, dword [ebp - 0x2c]
mov dword [ebp + eax*4 - 0x130], edx
mov eax, dword [ebp - 0x134]
add eax, 1
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x144]
cmp eax, dword [ebp - 0x1c]
jbe 0x4be5d8
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x144]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x18], 0
jne 0x4be627
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x18], eax
jmp 0x4be627
cmp dword [ebp - 0x18], 0
je 0x4be617
mov dword [esp + 8], str.Invalid_descriptor_passed_to_libssh2_poll__
mov dword [esp + 4], 0xffffffdd
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym.__libssh2_error
mov eax, 0xffffffff
jmp 0x4bec62
nop
jmp 0x4be628
nop
jmp 0x4be628
nop
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jb 0x4be26a
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
jmp 0x4be983
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x10]
shl eax, 4
mov ecx, eax
mov eax, dword [ebp + 8]
add eax, ecx
mov eax, dword [eax + 0xc]
cmp edx, eax
je 0x4be967
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
movzx eax, byte [eax]
movzx eax, al
cmp eax, 2
je 0x4be69f
cmp eax, 3
je 0x4be8b0
jmp 0x4be967
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 8]
and eax, 1
test eax, eax
je 0x4be717
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 0xc]
and eax, 1
test eax, eax
jne 0x4be717
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._libssh2_poll_channel_read
test eax, eax
setne al
movzx ecx, al
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ebx, edx
shl ebx, 4
mov edx, dword [ebp + 8]
add edx, ebx
mov edx, dword [edx + 0xc]
or edx, ecx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 8]
and eax, 2
test eax, eax
je 0x4be799
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 0xc]
and eax, 2
test eax, eax
jne 0x4be799
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._libssh2_poll_channel_read
test eax, eax
je 0x4be770
mov ebx, 2
jmp 0x4be775
mov ebx, 0
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 4
mov edx, dword [ebp + 8]
add edx, ecx
mov edx, dword [edx + 0xc]
mov ecx, ebx
or edx, ecx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 8]
and eax, 4
test eax, eax
je 0x4be813
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 0xc]
and eax, 4
test eax, eax
jne 0x4be813
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._poll_channel_write
test eax, eax
je 0x4be7ea
mov ebx, 4
jmp 0x4be7ef
mov ebx, 0
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 4
mov edx, dword [ebp + 8]
add edx, ecx
mov edx, dword [edx + 0xc]
mov ecx, ebx
or edx, ecx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
movzx eax, byte [eax + 0x40]
test al, al
jne 0x4be843
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
movzx eax, byte [eax + 0x2c]
test al, al
je 0x4be866
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 4
mov edx, dword [ebp + 8]
add edx, ecx
mov edx, dword [edx + 0xc]
or dl, 0x80
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 0x148]
cmp eax, 0xffffffff
jne 0x4be963
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 4
mov edx, dword [ebp + 8]
add edx, ecx
mov edx, dword [edx + 0xc]
or dl, 0x90
mov dword [eax + 0xc], edx
jmp 0x4be963
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 8]
and eax, 1
test eax, eax
je 0x4be920
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 0xc]
and eax, 1
test eax, eax
jne 0x4be920
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._poll_listener_queued
test eax, eax
setne al
movzx ecx, al
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ebx, edx
shl ebx, 4
mov edx, dword [ebp + 8]
add edx, ebx
mov edx, dword [edx + 0xc]
or edx, ecx
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x148]
cmp eax, 0xffffffff
jne 0x4be966
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 4
mov edx, dword [ebp + 8]
add edx, ecx
mov edx, dword [edx + 0xc]
or dl, 0x90
mov dword [eax + 0xc], edx
jmp 0x4be966
nop
jmp 0x4be967
nop
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4be97f
add dword [ebp - 0x14], 1
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jb 0x4be651
cmp dword [ebp - 0x14], 0
je 0x4be99c
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0xc]
mov edx, 0x10624dd3
mov eax, ecx
imul edx
sar edx, 6
mov eax, ecx
sar eax, 0x1f
sub edx, eax
mov eax, edx
mov dword [ebp - 0x240], eax
mov ecx, dword [ebp - 0xc]
mov edx, 0x10624dd3
mov eax, ecx
imul edx
sar edx, 6
mov eax, ecx
sar eax, 0x1f
sub edx, eax
mov eax, edx
imul eax, eax, 0x3e8
sub ecx, eax
mov eax, ecx
imul eax, eax, 0x3e8
mov dword [ebp - 0x23c], eax
mov dword [esp + 4], 0
lea eax, [ebp - 0x248]
mov dword [esp], eax
call dbg.gettimeofday
mov eax, dword [ebp - 0x1c]
add eax, 1
mov edx, eax
lea eax, [ebp - 0x240]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x238]
mov dword [esp + 8], eax
lea eax, [ebp - 0x134]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [sym.imp.WS2_32.dll_select]
call eax
sub esp, 0x14
mov dword [ebp - 0x30], eax
mov dword [esp + 4], 0
lea eax, [ebp - 0x250]
mov dword [esp], eax
call dbg.gettimeofday
mov edx, dword [ebp - 0x250]
mov eax, dword [ebp - 0x248]
sub edx, eax
mov eax, edx
imul eax, eax, 0xfffffc18
add dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x24c]
mov eax, dword [ebp - 0x244]
mov ecx, edx
sub ecx, eax
mov edx, 0x10624dd3
mov eax, ecx
imul edx
sar edx, 6
mov eax, ecx
sar eax, 0x1f
sub edx, eax
mov eax, edx
sub dword [ebp - 0xc], eax
cmp dword [ebp - 0x30], 0
jle 0x4bec4f
mov dword [ebp - 0x10], 0
jmp 0x4bec43
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
movzx eax, byte [eax]
movzx eax, al
cmp eax, 2
je 0x4beb90
cmp eax, 3
je 0x4bebe4
cmp eax, 1
jne 0x4bec3f
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
lea edx, [ebp - 0x134]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x4beb23
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 4
mov edx, dword [ebp + 8]
add edx, ecx
mov edx, dword [edx + 0xc]
or edx, 1
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
lea edx, [ebp - 0x238]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x4beb6f
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov edx, dword [ebp - 0x10]
mov ecx, edx
shl ecx, 4
mov edx, dword [ebp + 8]
add edx, ecx
mov edx, dword [edx + 0xc]
or edx, 4
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4bec38
add dword [ebp - 0x14], 1
jmp 0x4bec38
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 0x144]
lea edx, [ebp - 0x134]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x4bec3b
nop
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x4c]
mov dword [esp], eax
call sym.__libssh2_transport_read
test eax, eax
jg 0x4bebc3
jmp 0x4bec3b
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x144]
lea edx, [ebp - 0x134]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x4bec3e
nop
mov eax, dword [ebp - 0x10]
shl eax, 4
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sym.__libssh2_transport_read
test eax, eax
jg 0x4bec17
jmp 0x4bec3e
nop
jmp 0x4bec3f
nop
jmp 0x4bec3f
nop
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jb 0x4beaa9
cmp dword [ebp - 0xc], 0
jle 0x4bec5f
cmp dword [ebp - 0x14], 0
je 0x4be63e
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 4]
leave
ret