Function at 0x140031fb0
Capabilities:
Encode data using xor

Disassembly:
mov r11, rsp
mov word [r11 + 0x18], r8w
mov qword [r11 + 0x10], rdx
push r12
push r14
sub rsp, 0x68
xor r10d, r10d
movzx eax, r8w
movzx edx, r10w
mov word [rsp + 0x80], dx
lea r14d, [rax + 1]
shr r14d, 1
cmp cl, 0x14
ja 0x1400323f2
movzx eax, cl
lea r8, [0x140000000]
shl rax, 4
mov qword [rsp + 0x20], rax
mov r12d, dword [rax + r8 + 0x159060]
test r12d, r12d
je 0x1400323f2
cmp word [rax + r8 + 0x15906c], r10w
jge 0x1400323f2
mov qword [r11 - 0x28], rsi
movzx esi, r10w
mov qword [r11 - 0x38], r13
movzx r13d, word [rax + r8 + 0x159062]
mov qword [r11 - 0x40], r15
mov r15d, dword [rax + r8 + 0x159068]
test r14w, r14w
je 0x1400321c7
mov qword [r11 - 0x18], rbx
mov r8d, 0x600
mov qword [r11 - 0x20], rbp
mov r9d, 0xfa00
mov r11d, 0x200
mov qword [rsp + 0x48], rdi
nop dword [rax]
nop dword [rax + rax]
movzx eax, r13w
movzx ebp, r14w
add bp, bp
mov ecx, 0x1000
sub ecx, eax
movzx eax, bp
cmp eax, ecx
jbe 0x1400320c8
movzx eax, word [0x1401591bc]
mov ebp, 0x1000
sub bp, r13w
cmp word [0x140159050], ax
jae 0x140032207
mov esi, r10d
lea rcx, str.write_failed__out_of_space__n
call fcn.140041200
movzx r14d, bp
shr r14w, 1
movzx edx, word [rsp + 0x80]
xor r10d, r10d
test bp, bp
je 0x14003217d
mov rdi, qword [rsp + 0x88]
movzx ebx, bp
shr bx, 1
mov r8, rdi
movzx r9d, bx
movzx edx, r13w
movzx ecx, r12w
call fcn.140030210
add r13w, bp
sub r14w, bx
jne 0x14003210c
movzx eax, word [rsp + 0x90]
and ax, 1
sub bp, ax
xor r10d, r10d
cmp r10w, bp
jae 0x14003215c
mov r8, rdi
movzx r9d, bp
lea r10, [0x140000000]
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r8]
lea r8, [r8 + 1]
movzx eax, r15w
xor rcx, rax
mov eax, r15d
shr eax, 8
movzx edx, cl
mov r15d, dword [r10 + rdx*4 + 0x158c40]
xor r15d, eax
sub r9, 1
jne 0x140032130
xor r10d, r10d
movzx edx, word [rsp + 0x80]
movzx eax, bp
add rdi, rax
add dx, bp
mov qword [rsp + 0x88], rdi
mov word [rsp + 0x80], dx
test si, si
je 0x140032190
movzx r12d, si
mov r13d, 2
movzx esi, r10w
mov r8d, 0x600
mov r9d, 0xfa00
mov r11d, 0x200
test r14w, r14w
jne 0x140032070
mov rax, qword [rsp + 0x20]
lea r8, [0x140000000]
mov rdi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x50]
mov word [rax + r8 + 0x159062], r13w
mov r13, qword [rsp + 0x40]
mov dword [rax + r8 + 0x159068], r15d
mov r15, qword [rsp + 0x38]
movzx ecx, dx
add dword [rax + r8 + 0x159064], ecx
mov word [rax + r8 + 0x159060], r12w
movzx eax, dx
add rsp, 0x68
pop r14
pop r12
ret
cmp word [0x1409686a8], 0
mov esi, 0xffff
jbe 0x14003221d
add word [0x1409686a8], si
movzx edi, word [0x140159050]
lea ebx, [rdi - 1]
cmp bx, word [0x1401591bc]
mov word [0x140159050], bx
jb 0x14003231b
nop dword [rax + rax]
cmp bx, r8w
jb 0x140032274
mov r8d, 0xb5
lea rdx, str.....yoctolib_v1.0Privateyfs.c
lea rcx, str.ASSERT_FAILED:_s:_d_n
call fcn.140021b20
xor r10d, r10d
mov r8d, 0x600
mov r9d, 0xfa00
mov r11d, 0x200
movzx eax, word [0x1401186b4]
test ax, ax
je 0x14003228d
add bx, ax
cmp bx, r8w
jb 0x14003228d
add bx, r9w
add bx, r11w
cmp word [0x1401186e0], 0
je 0x1400322be
call fcn.140009a00
sub ax, word [0x1401186e0]
xor r10d, r10d
mov r11d, 0x200
cmp ax, 5
jbe 0x1400322be
mov word [0x1401186e0], r10w
movzx eax, bx
lea rcx, [0x14015e170]
shl rax, 0xc
add rax, rcx
movsd xmm0, qword [rax]
movsd qword [rsp + 0x98], xmm0
cmp dword [rsp + 0x98], 0xffffffff
jne 0x1400322f0
cmp dword [rsp + 0x9c], 0xffffffff
je 0x14003231b
movzx ebx, word [0x140159050]
add bx, si
cmp bx, word [0x1401591bc]
mov word [0x140159050], bx
jb 0x14003232b
mov r8d, 0x600
mov r9d, 0xfa00
jmp 0x140032240
movzx eax, word [0x1401591bc]
cmp word [0x140159050], ax
jae 0x14003233b
mov word [0x140159050], r10w
mov word [0x1409686a8], r10w
movzx esi, di
test di, di
je 0x1400320a9
mov edi, 0x600
movzx ebx, r12w
cmp r12w, di
jb 0x14003236f
mov r8d, 0xfe
lea rdx, str.....yoctolib_v1.0Privateyfs.c
lea rcx, str.ASSERT_FAILED:_s:_d_n
call fcn.140021b20
movzx eax, word [0x1401186b4]
test ax, ax
je 0x14003238c
lea ebx, [r12 + rax]
cmp bx, di
jb 0x14003238c
mov eax, 0xfa00
add bx, ax
mov eax, 0x200
add bx, ax
cmp word [0x1401186e0], 0
je 0x1400323b9
call fcn.140009a00
sub ax, word [0x1401186e0]
cmp ax, 5
jbe 0x1400323b9
xor eax, eax
mov word [0x1401186e0], ax
movzx edi, bx
lea rcx, [0x14015e170]
shl rdi, 0xc
add rdi, rcx
cmp byte [rdi], 0xff
jne 0x1400323d5
cmp byte [rdi + 1], 0xff
je 0x1400323ea
movzx edx, bx
lea rcx, str.Flash_write_to_non_cleared_word_at_0x_x:0x_d0x_x_n
xor r9d, r9d
xor r8d, r8d
call fcn.140040c90
mov word [rdi], si
jmp 0x1400320bd
movzx eax, r10w
add rsp, 0x68
pop r14
pop r12
ret