Function at 0x101a9300
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push 3
push 0xef
push str.WebSocket_buildFrame
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
call fcn.101a4960
mov eax, dword [ebp + 8]
add esp, 0xc
xorps xmm0, xmm0
movq qword [ebp - 0x14], xmm0
cmp dword [eax + 0x38], 0
je 0x101a95b5
mov esi, dword [ebp + 0x1c]
xor ecx, ecx
mov eax, dword [ebp + 0x18]
push ebx
push edi
mov edx, dword [esi]
mov ebx, dword [eax]
test edx, edx
jle 0x101a93c9
cmp edx, 8
jb 0x101a93ba
mov edi, dword [esi + 8]
mov eax, edx
and eax, reloc.WS2_32.dll_getsockopt
jns 0x101a9366
dec eax
or eax, 0xfffffff8
inc eax
mov dword [ebp + 8], edx
xorps xmm1, xmm1
sub dword [ebp + 8], eax
movaps xmm2, xmm1
mov eax, dword [ebp + 8]
nop word [eax + eax]
movups xmm0, xmmword [edi + ecx*4]
paddd xmm1, xmm0
movups xmm0, xmmword [edi + ecx*4 + 0x10]
add ecx, 8
paddd xmm2, xmm0
cmp ecx, eax
jl 0x101a9380
paddd xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
paddd xmm1, xmm0
movaps xmm0, xmm1
psrldq xmm0, 4
paddd xmm1, xmm0
movd eax, xmm1
add ebx, eax
cmp ecx, edx
jge 0x101a93c9
mov eax, dword [esi + 8]
add ebx, dword [eax + ecx*4]
inc ecx
cmp ecx, edx
jl 0x101a93c1
cmp ebx, 0x7e
jae 0x101a93d5
mov edi, 2
jmp 0x101a93e3
cmp ebx, 0x10000
sbb edi, edi
and edi, 0xfffffffa
add edi, 0xa
test byte [ebp + 0x10], 1
je 0x101a93ec
add edi, 4
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
je 0x101a9434
mov ecx, dword [ebp + 0x18]
mov eax, dword [ecx]
add eax, edi
push eax
push 0x101
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcWebSocket.c
mov dword [ebp - 8], eax
call fcn.101a4e30
add esp, 0xc
mov dword [ebp + 8], eax
test eax, eax
je 0x101a9586
mov ecx, dword [ebp + 0x18]
push dword [ecx]
mov ecx, dword [ebp + 0x14]
push dword [ecx]
lea ecx, [edi + eax]
push ecx
call fcn.101fcde0
add esp, 0xc
jmp 0x101a9455
push edi
push 0x108
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcWebSocket.c
call fcn.101a4e30
add esp, 0xc
mov dword [ebp + 8], eax
test eax, eax
je 0x101a95ad
mov dword [ebp - 8], edi
cmp dword [ebp + 0x10], 0
je 0x101a9476
cmp byte [esi + 0x10], 0
lea eax, [esi + 0x10]
jne 0x101a9476
push 4
push eax
call fcn.10227340
add esp, 8
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov byte [edx + eax], 0x80
mov ecx, dword [ebp - 4]
mov al, byte [ebp + 0xc]
and al, 0xf
or byte [ecx + edx], al
mov ecx, dword [ebp - 4]
mov al, byte [ebp + 0x10]
inc ecx
shl al, 7
mov dword [ebp - 4], ecx
mov byte [edx + ecx], al
cmp ebx, 0x7e
jae 0x101a94af
mov eax, dword [ebp - 4]
and bl, 0x7f
or byte [eax + edx], bl
mov ecx, dword [ebp - 4]
inc ecx
jmp 0x101a94ff
cmp ebx, 0x10000
jae 0x101a94de
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov ebx, dword [ebp + 8]
movzx ecx, ax
mov eax, dword [ebp - 4]
or byte [ebx + eax], 0x7e
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
mov word [ebx + eax], cx
mov ecx, dword [ebp - 4]
add ecx, 2
jmp 0x101a9502
mov eax, dword [ebp - 4]
xor ecx, ecx
bswap ecx
bswap ebx
or byte [edx + eax], 0x7f
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
mov dword [edx + eax], ecx
mov dword [edx + eax + 4], ebx
mov ecx, dword [ebp - 4]
add ecx, 8
mov ebx, dword [ebp + 8]
cmp dword [ebp + 0x10], 0
mov dword [ebp - 4], ecx
je 0x101a9586
mov eax, dword [esi + 0x10]
xor edx, edx
mov dword [ebx + ecx], eax
add dword [ebp - 4], 4
mov eax, dword [ebp - 8]
cmp edi, eax
jge 0x101a953a
lea ecx, [edi + ebx]
mov ebx, eax
sub ebx, edi
mov eax, edx
lea ecx, [ecx + 1]
and eax, 3
inc edx
mov al, byte [eax + esi + 0x10]
xor byte [ecx - 1], al
sub ebx, 1
jne 0x101a9525
mov eax, dword [esi]
xor ebx, ebx
test eax, eax
jle 0x101a9586
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jne 0x101a9553
cmp ebx, 2
je 0x101a9586
dec eax
cmp ebx, eax
je 0x101a9586
mov eax, dword [esi + 8]
xor edi, edi
cmp dword [eax + ebx*4], edi
jbe 0x101a957f
nop dword [eax]
mov eax, dword [esi + 4]
mov ecx, dword [eax + ebx*4]
mov eax, edx
and eax, 3
inc edx
mov al, byte [eax + esi + 0x10]
xor byte [ecx + edi], al
inc edi
mov eax, dword [esi + 8]
cmp edi, dword [eax + ebx*4]
jb 0x101a9560
mov ecx, dword [ebp - 0xc]
mov eax, dword [esi]
inc ebx
cmp ebx, eax
jl 0x101a9545
mov esi, dword [ebp + 8]
pop edi
pop ebx
push 3
lea eax, [ebp - 4]
push eax
push 0x15a
push str.WebSocket_buildFrame
call fcn.101a4a10
mov edx, dword [ebp - 8]
add esp, 0x10
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
jmp 0x101a9586
mov eax, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 8], eax
jmp 0x101a958b