Function at 0x50e210
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov ecx, dword [0x8993fc]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 0x1c]
cmp eax, dword [ecx + 8]
jbe 0x50e71b
sub esp, 0x9c
mov eax, dword [esp + 0xa0]
test byte [eax], al
lea ecx, [eax + 0x14]
mov dword [esp + 0x74], ecx
mov dword [esp], ecx
call sym.sync._Mutex_.Lock
mov eax, dword [esp + 0xa0]
mov ecx, dword [eax + 0x10]
cmp ecx, 4
je 0x50e68a
cmp ecx, 6
je 0x50e68a
cmp ecx, 7
je 0x50e652
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call sym.sync._Mutex_.Unlock
mov eax, dword [esp + 0xa0]
lea ecx, [eax + 4]
mov dword [esp + 0x70], ecx
mov dword [esp], ecx
call sym.sync_atomic.LoadUint32
mov eax, dword [esp + 4]
test eax, eax
jne 0x50e452
mov eax, dword [esp + 0xa0]
lea ecx, [eax + 0x68]
mov dword [esp], ecx
call sym.sync_atomic._Value_.Load
mov eax, dword [esp + 4]
mov dword [esp + 0x40], eax
mov esi, dword [esp + 8]
lea edi, [esp + 0x88]
xor eax, eax
call fcn.0046f01b
mov eax, dword [esp + 0x40]
lea ecx, [0x68fc60]
cmp eax, ecx
jne 0x50e704
lea edi, [esp + 0x88]
call fcn.0046f4fe
lea edi, [esp + 0x44]
lea esi, [esp + 0x88]
call fcn.0046f4fe
lea edi, [esp + 0x58]
lea esi, [esp + 0x88]
call fcn.0046f4fe
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
test eax, 0x80000000
je 0x50e336
mov edx, ecx
shl ecx, 1
shl eax, 1
mov ebx, edx
shr edx, 0x1f
or eax, edx
mov edx, eax
shl eax, 1
shr ecx, 0x1f
or ecx, eax
shr edx, 0x1f
add ecx, 0xd7b17f80
adc edx, 0xd
jmp 0x50e342
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
mov ebx, ecx
mov ecx, eax
test edx, edx
sete al
test ecx, ecx
sete cl
and eax, ecx
test al, al
je 0x50e35e
test ebx, 0x3fffffff
jne 0x50e35e
xor eax, eax
jmp 0x50e3ae
call sym.time.Now
lea edi, [esp + 0x88]
lea esi, [esp]
call fcn.0046f4fe
lea edi, [esp]
lea esi, [esp + 0x44]
call fcn.0046f4fe
lea edi, [esp + 0x14]
lea esi, [esp + 0x88]
call fcn.0046f4fe
call sym.time.Time.Sub
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
nop
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym.time.NewTimer
mov eax, dword [esp + 8]
mov eax, dword [eax]
mov ecx, dword [esp + 0xa0]
mov edx, dword [ecx + 0x5c]
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x80], edx
mov dword [esp + 0x78], eax
lea eax, [esp + 0x78]
mov dword [esp], eax
lea eax, [esp + 0x30]
mov dword [esp + 4], eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 2
mov byte [esp + 0x14], 1
call sym.runtime.selectgo
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x50e22e
mov eax, dword [0x853688]
mov dword [esp + 0xb0], 0
lea ecx, [0x6f6ed4]
mov dword [esp + 0xb4], ecx
mov dword [esp + 0xb8], eax
add esp, 0x9c
ret
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xa0]
mov dword [esp], eax
call sym.github.com_hashicorp_yamux._Stream_.sendFlags
movzx eax, word [esp + 4]
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0x38]
cmp ecx, edx
ja 0x50e47b
mov edx, ecx
mov ebx, dword [esp + 0xac]
cmp ebx, edx
jb 0x50e6fb
mov ebp, dword [esp + 0xa0]
mov esi, dword [ebp + 0x44]
mov edi, dword [ebp + 0x48]
mov ecx, dword [ebp + 8]
test esi, esi
jbe 0x50e6f2
mov ebx, dword [ebp + 0x40]
mov byte [ebx], 0
cmp esi, 1
jbe 0x50e6e6
mov byte [ebx + 1], 0
cmp edi, 4
jb 0x50e6da
rol ax, 8
mov word [ebx + 2], ax
cmp edi, 8
jb 0x50e6ce
bswap ecx
mov dword [ebx + 4], ecx
cmp edi, 0xc
jb 0x50e6c2
mov dword [esp + 0x3c], edx
mov eax, edx
bswap edx
mov dword [ebx + 8], edx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x40]
mov ebx, dword [ebp + 0x44]
mov esi, dword [ebp + 0x48]
mov edi, dword [ebp + 0x4c]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], esi
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0xac]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edi
call sym.github.com_hashicorp_yamux._Session_.waitForSendErr
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x6c], ecx
test eax, eax
je 0x50e614
mov edx, dword [0x85a030]
mov ebx, dword [0x85a034]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebx
call sym.errors.Is
movzx eax, byte [esp + 0x10]
test al, al
jne 0x50e59b
mov eax, dword [0x85a070]
mov ecx, dword [0x85a074]
mov edx, dword [esp + 0x40]
mov dword [esp], edx
mov ebx, dword [esp + 0x6c]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
call sym.errors.Is
movzx eax, byte [esp + 0x10]
test al, al
je 0x50e5ec
lea eax, [0x660420]
mov dword [esp], eax
mov dword [esp + 4], 0xc
mov dword [esp + 8], 0xc
call sym.runtime.makeslice
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xa0]
mov dword [ecx + 0x44], 0xc
mov dword [ecx + 0x48], 0xc
mov edx, dword [0x899508]
test edx, edx
je 0x50e5e9
call sym.runtime.gcWriteBarrier2
mov dword [edi], eax
mov edx, dword [ecx + 0x40]
mov dword [edi + 4], edx
mov dword [ecx + 0x40], eax
mov dword [esp + 0xb0], 0
mov eax, dword [esp + 0x40]
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0xb8], eax
add esp, 0x9c
ret
mov eax, dword [esp + 0x70]
mov dword [esp], eax
mov eax, dword [esp + 0x3c]
neg eax
mov dword [esp + 4], eax
call sym.sync_atomic.AddUint32
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0xb8], eax
add esp, 0x9c
ret
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call sym.sync._Mutex_.Unlock
mov eax, dword [0x85a068]
mov ecx, dword [0x85a06c]
mov dword [esp + 0xb0], 0
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], ecx
add esp, 0x9c
ret
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call sym.sync._Mutex_.Unlock
mov eax, dword [0x85a050]
mov ecx, dword [0x85a054]
mov dword [esp + 0xb0], 0
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], ecx
add esp, 0x9c
ret
mov ecx, 0xc
mov edx, edi
call sym.runtime.panicSliceAcap
mov ecx, 8
mov edx, edi
call sym.runtime.panicSliceAcap
mov ecx, 4
mov edx, edi
call sym.runtime.panicSliceAcap
mov eax, 1
mov ecx, eax
call sym.runtime.panicIndex
xor eax, eax
mov ecx, eax
call sym.runtime.panicIndex
mov ecx, edx
mov edx, ebx
call sym.runtime.panicSliceAcapU
mov dword [esp], eax
mov dword [esp + 4], ecx
lea eax, [0x661580]
mov dword [esp + 8], eax
call sym.runtime.panicdottypeE
nop
call sym.runtime.morestack_noctxt
jmp sym.github.com_hashicorp_yamux._Stream_.write