Function at 0x101aa140
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
push 3
push 0x3e5
xor edi, edi
push str.WebSocket_receiveFrame
mov dword [ebp - 4], edi
call fcn.101a4960
mov eax, dword [0x104e4688]
add esp, 0xc
test eax, eax
jne 0x101aa175
call fcn.10197d90
mov dword [0x104e4688], eax
mov eax, dword [eax]
test eax, eax
je 0x101aa17e
mov edi, dword [eax + 8]
mov esi, dword [ebp + 8]
mov ebx, 2
mov dword [ebp - 0x10], 0
nop dword [eax]
lea eax, [ebp - 0xc]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0x1c], 0
push eax
push 2
push esi
call fcn.101a9a70
add esp, 0x10
mov ecx, eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x101aa3f8
test ecx, ecx
je 0x101aa496
cmp dword [ebp - 8], 2
jb 0x101aa496
movzx edx, byte [ecx]
movsx eax, byte [ecx]
shr edx, 7
and eax, 0xf
mov dword [ebp - 0x20], edx
cmovne ebx, eax
mov dword [ebp - 0x14], ebx
cmp ebx, 0xa
ja 0x101aa3f8
cmp ebx, 2
jle 0x101aa1fb
cmp ebx, 8
jl 0x101aa3f8
movsx esi, byte [ecx + 1]
movzx ebx, byte [ecx + 1]
and esi, 0x7f
shr ebx, 7
mov dword [ebp - 0x18], ebx
cmp esi, 0x7e
jne 0x101aa252
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 8]
push 2
push eax
call fcn.101a9a70
add esp, 0x10
cmp dword [ebp - 0xc], 0xffffffff
je 0x101aa3f8
test eax, eax
je 0x101aa3f8
cmp dword [ebp - 8], 2
jb 0x101aa496
movzx eax, word [eax]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
jmp 0x101aa294
cmp esi, 0x7f
jne 0x101aa294
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 8]
push 8
push eax
call fcn.101a9a70
add esp, 0x10
mov esi, eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x101aa3f8
test esi, esi
je 0x101aa3f8
cmp dword [ebp - 8], 8
jb 0x101aa496
mov eax, dword [esi]
mov esi, dword [esi + 4]
bswap eax
bswap esi
test ebx, ebx
je 0x101aa2c9
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 4
push dword [ebp + 8]
call fcn.101a9a70
add esp, 0x10
cmp dword [ebp - 0xc], 0xffffffff
je 0x101aa3f8
test eax, eax
je 0x101aa3f8
cmp dword [ebp - 8], 4
jb 0x101aa496
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push esi
push dword [ebp + 8]
call fcn.101a9a70
add esp, 0x10
mov ebx, eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x101aa3f8
test ebx, ebx
je 0x101aa3f8
mov ecx, dword [ebp - 8]
cmp ecx, esi
jb 0x101aa496
cmp dword [ebp - 0x18], 0
je 0x101aa324
xor eax, eax
test esi, esi
je 0x101aa324
nop dword [eax + eax]
mov ecx, eax
and ecx, 3
mov cl, byte [ebp + ecx - 0x10]
xor byte [eax + ebx], cl
inc eax
cmp eax, esi
jb 0x101aa310
mov ecx, dword [ebp - 8]
lea eax, [ecx + 8]
test edi, edi
je 0x101aa355
mov esi, dword [edi]
add eax, esi
push eax
push edi
push 0x492
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcWebSocket.c
call fcn.101a4fd0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x101aa378
mov dword [ebp - 4], 0xffffff9d
jmp 0x101aa3ff
push eax
push 0x48a
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcWebSocket.c
call fcn.101a4e30
mov edi, eax
add esp, 0xc
test edi, edi
je 0x101aa349
mov esi, dword [ebp - 0x1c]
mov dword [edi + 4], 0
mov eax, dword [0x104e4688]
test eax, eax
je 0x101aa38a
mov eax, dword [eax]
test eax, eax
je 0x101aa38a
mov dword [eax + 8], edi
push dword [ebp - 8]
lea eax, [edi + 8]
add eax, esi
push ebx
push eax
call fcn.101fcde0
mov eax, dword [ebp - 8]
add eax, esi
mov esi, dword [ebp + 8]
mov dword [edi], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push esi
call fcn.101a9a70
add esp, 0x1c
cmp dword [ebp - 0xc], 0xffffffff
je 0x101aa3f8
cmp dword [ebp - 0x20], 0
mov ebx, dword [ebp - 0x14]
je 0x101aa190
cmp ebx, 9
je 0x101aa421
cmp ebx, 0xa
je 0x101aa430
cmp ebx, 8
jne 0x101aa445
push edi
push 0x4b4
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcWebSocket.c
call fcn.101a4dd0
push 0
push 0x3e9
push esi
call fcn.101a95c0
add esp, 0x18
mov dword [ebp - 4], 0xffffffff
push 3
lea eax, [ebp - 4]
push eax
push 0x4c6
push str.WebSocket_receiveFrame
call fcn.101a4a10
mov eax, dword [ebp - 4]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [edi]
lea eax, [edi + 8]
push eax
push esi
call fcn.101a9f20
add esp, 0xc
push edi
push 0x4ae
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcWebSocket.c
call fcn.101a4dd0
add esp, 0xc
xor edi, edi
cmp ebx, 9
je 0x101aa190
cmp ebx, 0xa
je 0x101aa190
mov ecx, dword [0x104e4688]
cmp dword [ecx + 0xc], 0
jne 0x101aa473
mov eax, dword [edi]
add eax, 8
push eax
push edi
push ecx
call fcn.10197af0
add esp, 0xc
mov ecx, dword [edi]
mov eax, dword [ebp + 0xc]
sub ecx, dword [edi + 4]
mov dword [eax], ecx
cmp dword [ebp - 4], 0xffffffea
jne 0x101aa3ff
mov dword [0x104e4694], 0
jmp 0x101aa3ff
mov dword [ebp - 4], 0xffffffea
mov dword [0x104e4694], 0
jmp 0x101aa3ff