Function at 0x14001b040
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbp
push rsi
sub rsp, 0x20
mov edx, dword [0x140057b08]
mov r9d, dword [0x1400a3dc4]
xor esi, esi
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rdi
mov dword [0x140073d4c], 2
mov edi, esi
mov ebx, esi
lea rbp, [0x140083d80]
test edx, edx
je 0x14001affe
mov r8d, dword [0x140057b10]
mov qword [rsp + 0x40], r12
lea r12, [0x140000000]
cmp edx, 3
jb 0x14001ae57
lea eax, [r9 + 2]
shl r8d, 5
movzx eax, byte [rax + rbp]
xor eax, r8d
and eax, 0x7fff
mov ecx, eax
mov dword [0x140057b10], eax
movzx edi, word [r12 + rax*2 + 0x73d60]
mov eax, r9d
mov word [r12 + rcx*2 + 0x73d60], r9w
and eax, 0x7fff
mov word [r12 + rax*2 + 0x93dc0], di
test edi, edi
je 0x14001ae93
mov eax, r9d
sub eax, edi
cmp eax, 0x7efa
ja 0x14001ae93
mov eax, dword [0x1400a3dc8]
mov ecx, edi
cmp eax, edx
cmova eax, edx
mov dword [0x1400a3dc8], eax
call fcn.14001ccb0
mov ecx, dword [0x140057b08]
mov r9d, dword [0x1400a3dc4]
cmp eax, ecx
mov ebx, eax
cmova ebx, ecx
cmp ebx, 3
jb 0x14001af59
sub r9d, dword [0x140073d54]
lea edx, [rbx - 3]
mov ecx, r9d
call fcn.14001b910
mov edx, dword [0x140057b08]
sub edx, ebx
cmp ebx, dword [0x140057b0c]
mov r11d, eax
mov dword [0x140057b08], edx
ja 0x14001af29
cmp edx, 3
jb 0x14001af29
mov r9d, dword [0x1400a3dc4]
mov r8d, dword [0x140057b10]
dec ebx
lea r10d, [r9 + 2]
shl r8d, 5
inc r9d
inc r10d
movzx ecx, byte [r10 + rbp]
mov eax, r9d
xor r8d, ecx
and eax, 0x7fff
and r8d, 0x7fff
dec ebx
movzx edi, word [r12 + r8*2 + 0x73d60]
mov word [r12 + r8*2 + 0x73d60], r9w
mov word [r12 + rax*2 + 0x93dc0], di
jne 0x14001aee0
mov dword [0x140057b10], r8d
jmp 0x14001af86
mov r9d, dword [0x1400a3dc4]
add r9d, ebx
mov ebx, esi
movzx r8d, byte [r9 + rbp]
lea eax, [r9 + 1]
movzx eax, byte [rax + rbp]
shl r8d, 5
xor r8d, eax
and r8d, 0x7fff
mov dword [0x140057b10], r8d
jmp 0x14001af89
mov eax, r9d
xor ecx, ecx
movzx edx, byte [rax + rbp]
call fcn.14001b910
mov edx, dword [0x140057b08]
mov r9d, dword [0x1400a3dc4]
mov r8d, dword [0x140057b10]
dec edx
mov r11d, eax
mov dword [0x140057b08], edx
inc r9d
mov dword [0x1400a3dc4], r9d
test r11d, r11d
je 0x14001afd0
mov eax, dword [0x1400a3dc0]
lea rcx, [rbp + rax]
test eax, eax
jns 0x14001afa7
mov rcx, rsi
sub r9d, eax
xor r8d, r8d
mov edx, r9d
call 0x14001ca70
mov r9d, dword [0x1400a3dc4]
mov edx, dword [0x140057b08]
mov r8d, dword [0x140057b10]
mov dword [0x1400a3dc0], r9d
cmp edx, 0x106
jae 0x14001aff1
call fcn.14001ab60
mov edx, dword [0x140057b08]
mov r8d, dword [0x140057b10]
mov r9d, dword [0x1400a3dc4]
test edx, edx
jne 0x14001ae13
mov r12, qword [rsp + 0x40]
mov eax, dword [0x1400a3dc0]
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
test eax, eax
js 0x14001b017
lea rsi, [rbp + rax]
sub r9d, dword [0x1400a3dc0]
mov r8d, 1
mov rcx, rsi
mov edx, r9d
mov rbp, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
jmp 0x14001ca70
push rbx
push rbp
push rdi
push r12
push r14
sub rsp, 0x20
xor ebp, ebp
cmp dword [0x140053f20], 3
mov r14d, 2
mov r12d, ebp
mov edi, ebp
mov ebx, r14d
jg 0x14001b075
add rsp, 0x20
pop r14
pop r12
pop rdi
pop rbp
pop rbx
jmp 0x14001adc0
mov edx, dword [0x140057b08]
mov r9d, dword [0x1400a3dc4]
mov qword [rsp + 0x58], r13
lea r13, [0x140083d80]
test edx, edx
je 0x14001b323
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x60], r15
lea r15, [0x140000000]
cmp edx, 3
jb 0x14001b0f2
lea eax, [r9 + 2]
movzx r11d, byte [rax + r13]
mov eax, dword [0x140057b10]
shl eax, 5
xor r11d, eax
mov eax, r9d
and r11d, 0x7fff
and eax, 0x7fff
movzx r12d, word [r15 + r11*2 + 0x73d60]
mov dword [0x140057b10], r11d
mov word [r15 + r11*2 + 0x73d60], r9w
mov word [r15 + rax*2 + 0x93dc0], r12w
mov esi, dword [0x140073d54]
mov ecx, ebx
mov dword [0x140073d4c], ebx
mov ebx, r14d
test r12d, r12d
je 0x14001b168
cmp ecx, dword [0x140057b0c]
jae 0x14001b168
mov eax, r9d
sub eax, r12d
cmp eax, 0x7efa
ja 0x14001b168
mov eax, dword [0x1400a3dc8]
mov ecx, r12d
cmp eax, edx
cmova eax, edx
mov dword [0x1400a3dc8], eax
call fcn.14001ccb0
mov edx, dword [0x140057b08]
mov r9d, dword [0x1400a3dc4]
cmp eax, edx
mov ebx, eax
cmova ebx, edx
cmp ebx, 3
jne 0x14001b162
mov ecx, r9d
sub ecx, dword [0x140073d54]
cmp ecx, 0x1000
cmova ebx, r14d
mov ecx, dword [0x140073d4c]
cmp ecx, 3
jb 0x14001b266
cmp ebx, ecx
ja 0x14001b266
lea ebx, [r9 + rdx - 3]
sub r9d, esi
lea edx, [rcx - 3]
lea ecx, [r9 - 1]
call fcn.14001b910
mov r8d, dword [0x140073d4c]
mov edx, dword [0x140057b08]
mov r9d, dword [0x1400a3dc4]
mov ecx, 1
mov esi, eax
sub ecx, r8d
lea r10d, [r9 + 2]
add edx, ecx
add r8d, 0xfffffffe
mov dword [0x140057b08], edx
nop dword [rax + rax]
inc r9d
inc r10d
cmp r9d, ebx
ja 0x14001b20d
mov eax, dword [0x140057b10]
movzx r11d, byte [r10 + r13]
shl eax, 5
xor r11d, eax
mov eax, r9d
and r11d, 0x7fff
and eax, 0x7fff
movzx r12d, word [r15 + r11*2 + 0x73d60]
mov dword [0x140057b10], r11d
mov word [r15 + r11*2 + 0x73d60], r9w
mov word [r15 + rax*2 + 0x93dc0], r12w
dec r8d
jne 0x14001b1c0
inc r9d
mov dword [0x140073d4c], r8d
mov edi, ebp
mov ebx, r14d
mov dword [0x1400a3dc4], r9d
test esi, esi
je 0x14001b2dc
mov eax, dword [0x1400a3dc0]
lea rcx, [r13 + rax]
test eax, eax
jns 0x14001b242
mov rcx, rbp
sub r9d, eax
xor r8d, r8d
mov edx, r9d
call 0x14001ca70
mov r9d, dword [0x1400a3dc4]
mov edx, dword [0x140057b08]
mov dword [0x1400a3dc0], r9d
jmp 0x14001b2dc
test edi, edi
je 0x14001b2c5
lea eax, [r9 - 1]
xor ecx, ecx
movzx edx, byte [rax + r13]
call fcn.14001b910
test eax, eax
je 0x14001b2b6
mov eax, dword [0x1400a3dc0]
lea rcx, [r13 + rax]
test eax, eax
jns 0x14001b290
mov rcx, rbp
mov edx, dword [0x1400a3dc4]
xor r8d, r8d
sub edx, eax
call 0x14001ca70
mov r9d, dword [0x1400a3dc4]
mov edx, dword [0x140057b08]
mov dword [0x1400a3dc0], r9d
jmp 0x14001b2ca
mov r9d, dword [0x1400a3dc4]
mov edx, dword [0x140057b08]
jmp 0x14001b2ca
mov edi, 1
inc r9d
dec edx
mov dword [0x140057b08], edx
mov dword [0x1400a3dc4], r9d
cmp edx, 0x106
jae 0x14001b2f6
call fcn.14001ab60
mov edx, dword [0x140057b08]
mov r9d, dword [0x1400a3dc4]
test edx, edx
jne 0x14001b0a7
mov r15, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x50]
test edi, edi
je 0x14001b323
lea eax, [r9 - 1]
xor ecx, ecx
movzx edx, byte [rax + r13]
call fcn.14001b910
mov r9d, dword [0x1400a3dc4]
mov eax, dword [0x1400a3dc0]
test eax, eax
js 0x14001b332
lea rbp, [r13 + rax]
sub r9d, dword [0x1400a3dc0]
mov r8d, 1
mov rcx, rbp
mov edx, r9d
mov r13, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop r12
pop rdi
pop rbp
pop rbx
jmp 0x14001ca70
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x20
movzx eax, byte [0x1400686ac]
mov r9d, dword [0x140057ba0]
mov rbx, rcx
lea rcx, [0x1400714d0]
mov edi, r8d
mov esi, edx
mov byte [r9 + rcx], al
mov rax, qword [0x140072718]
mov ecx, 0xffff
cmp word [rax], cx
jne 0x14001cabf
call fcn.14001bb00
lea rcx, [0x140054110]
call fcn.14001c020
lea rcx, [0x140054138]
call fcn.14001c020
call fcn.14001c3e0
mov ebp, dword [0x140072710]
mov r12d, dword [0x140057b9c]
add ebp, 0xa
mov r13d, eax
add r12d, 0xa
shr ebp, 3
shr r12d, 3
cmp r12d, ebp
cmovbe ebp, r12d
cmp esi, ebp
ja 0x14001cb76
test edi, edi
je 0x14001cb76
cmp qword [0x1400729c0], 0
je 0x14001cb76
cmp qword [0x140069428], 0
jne 0x14001cb76
cmp dword [0x1400714c8], 0
jne 0x14001cb76
call fcn.140012020
test eax, eax
je 0x14001cb76
cmp dword [0x140057988], 0
jne 0x14001cb76
test rbx, rbx
jne 0x14001cb49
lea rcx, str.block_vanished
call fcn.1400015d0
xor r8d, r8d
mov edx, esi
mov rcx, rbx
call fcn.14001bd80
mov rax, qword [0x1400729c0]
mov r8d, dword [0x1400714c8]
mov dword [rax], 0
mov qword [0x140069428], rsi
jmp 0x14001cc5c
lea eax, [rsi + 4]
cmp eax, ebp
ja 0x14001cbcf
test rbx, rbx
je 0x14001cbcf
mov edx, 3
mov ecx, edi
call fcn.14001bbc0
mov r11d, dword [0x1400714c8]
mov r8d, 1
add r11d, 0xa
mov edx, esi
mov dword [0x1400714c8], 0
shr r11d, 3
lea ecx, [r11 + rsi + 4]
add qword [0x140069428], rcx
mov rcx, rbx
call fcn.14001bd80
mov r8d, dword [0x1400714c8]
jmp 0x14001cc5c
mov edx, 3
cmp r12d, ebp
jne 0x14001cbfd
lea ecx, [rdi + 2]
call fcn.14001bbc0
lea rdx, [0x140057b20]
lea rcx, [0x1400686b0]
call fcn.14001c520
mov r11d, dword [0x140057b9c]
jmp 0x14001cc38
lea ecx, [rdi + 4]
call fcn.14001bbc0
mov edx, dword [0x14005415c]
mov ecx, dword [0x140054134]
inc edx
lea r8d, [r13 + 1]
inc ecx
call fcn.14001c460
lea rdx, [0x1400728c0]
lea rcx, [0x140067db0]
call fcn.14001c520
mov r11d, dword [0x140072710]
mov eax, dword [0x1400714c8]
lea r8d, [rax + r11 + 3]
mov eax, r8d
shr rax, 3
add qword [0x140069428], rax
and r8d, 7
mov dword [0x1400714c8], r8d
call fcn.14001b4b0
test edi, edi
je 0x14001cc7c
call fcn.14001bc90
mov r8d, dword [0x1400714c8]
add r8d, 7
mov dword [0x1400714c8], r8d
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov eax, r8d
shr rax, 3
add rax, qword [0x140069428]
add rsp, 0x20
pop r13
pop r12
pop rdi
ret