Function at 0x140156f40
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x488
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x400], 0xfffffffffffffffe
cmp byte [rcx + 8], 0
jne 0x140156fcd
mov ebx, r8d
mov rdi, rdx
mov rsi, rcx
cmp qword [0x140561c90], 0
jne 0x140156fb1
mov ecx, 0x900
mov edx, 0xdc26137e
mov r8d, 0xdf04b2a1
call fcn.1400af2b0
mov qword [rbp + 0x3f0], rax
mov rcx, rax
call fcn.1400877f0
mov rax, qword [rbp + 0x3f0]
mov qword [0x140561c90], rax
mov r14, qword [0x140561c90]
mov rax, qword [r14 + 0x700]
mov rcx, rdi
call qword [case.0x140119ecb.0]
cmp eax, 0xffffffff
je 0x140156fe7
mov eax, dword [0x14055f3a0]
add rsp, 0x488
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov eax, dword [0x14055f3a4]
cmp eax, 0x25
jle 0x140156ff4
jmp 0x14015705c
mov qword [rbp + 0x3f8], 0
mov rax, qword [r14 + 0x710]
lea r8, [rbp - 0x60]
lea r9, [rbp + 0x3f8]
mov rcx, rdi
mov edx, 0x400
call qword [case.0x140119ecb.0]
mov ecx, eax
mov edx, dword [0x14055f3a0]
lea eax, [rdx - 1]
imul eax, edx
mov r8d, dword [0x1404ff818]
mov edx, r8d
xor edx, 0xbc252bb6
mov r9d, r8d
and r9d, 0x3c252bb6
lea r9d, [rdx + r9*2]
xor edx, edx
div r9d
add r8d, 0xbc252bb4
cmp edx, r8d
je 0x14015708c
mov qword [rbp + 0x3f8], 0
mov rax, qword [r14 + 0x710]
lea r8, [rbp - 0x60]
lea r9, [rbp + 0x3f8]
mov rcx, rdi
mov edx, 0x400
call qword [case.0x140119ecb.0]
jmp 0x140156ff4
test ecx, ecx
je 0x140156fcd
mov qword [rbp + 0x3b8], 0
mov qword [rbp + 0x3c0], 0xf
mov byte [rbp + 0x3a8], 0
lea rax, [0x1404208d8]
mov qword [rbp + 0x3a0], rax
lea rcx, [rbp + 0x3a0]
lea rdx, [rbp - 0x60]
mov r8d, 2
call fcn.140248090
xor eax, eax
test al, al
nop dword [rax]
mov edi, dword [rbp + 0x3b8]
mov eax, dword [0x14055f3a4]
cmp eax, 0x35
jg 0x1401570e0
test edi, edi
lea r15, [rbp + 0x3a8]
je 0x14015719a
cmp dword [0x1404ff818], 0x43dad44c
je 0x14015710e
jmp 0x140157144
cmp qword [rbp + 0x3c0], 0x10
mov rcx, r15
jb 0x140157122
mov rcx, qword [rbp + 0x3a8]
mov eax, 0xbc252bb5
add eax, dword [0x1404ff818]
lea rdx, [fcn.140156f40]
add edx, edx
add edx, 0x3f00
xor edx, eax
not edx
test edx, eax
je 0x140157193
lea r14, [0x140160d30]
nop dword [rax + rax]
mov eax, dword [0x1404ff818]
mov ecx, eax
xor ecx, 0xbc252c15
and eax, 0x3c252c15
add eax, eax
mov edx, ecx
xor edx, eax
and eax, ecx
lea ecx, [rdx + rax*2]
call fcn.1403bcbb4
mov qword [0x14055f398], rax
mov rcx, r14
call fcn.1403dccbc
cmp dword [0x1404ff818], 0x43dad44c
jne 0x140157150
jmp 0x14015710e
mov edx, edi
call fcn.140087770
mov eax, dword [0x14055f3a0]
lea ecx, [rax + 1]
nop word cs:[rax + rax]
imul ecx, eax
test cl, 1
je 0x1401571ca
mov eax, dword [0x14055f3a0]
mov ecx, dword [0x1404ff818]
add ecx, eax
dec ecx
jmp 0x1401571b0
lea rdi, [rsi + 0x90]
lea rdx, [rbp + 0x3a0]
mov rcx, rdi
call fcn.1400f86c0
mov ecx, 0xbc252bb4
nop word cs:[rax + rax]
mov rdx, qword [rdi]
mov r8d, dword [0x14055f3a0]
lea r9d, [r8 - 1]
imul r9d, r8d
and r9d, 1
mov r8d, dword [0x1404ff818]
add r8d, ecx
cmp r9d, r8d
je 0x140157229
mov edx, dword [0x14055f3a0]
lea r8d, [rdx - 1]
imul r8d, edx
test r8b, 1
jmp 0x1401571f0
cmp rax, rdx
jne 0x140157416
lea rdi, [rbp + 0x3d0]
movabs r13, 0x9bb69b0f04e4a9fb
movabs r12, 0x9bb69b0f04e4aa0a
lea r14, [rbp - 0x60]
nop word cs:[rax + rax]
mov rax, qword [0x1404ff820]
lea rcx, [rax + r13]
mov qword [rbp + 0x3e0], rcx
add rax, r12
mov qword [rbp + 0x3e8], rax
movzx eax, byte [0x1404ff828]
add al, 0x87
mov byte [rbp + 0x3d0], al
mov rcx, r14
mov edx, 0xc614a2a1
mov r8d, 0xcc2ef73b
call fcn.1400af8b0
mov r15, rax
mov eax, dword [0x14055f3a0]
mov ecx, dword [0x1404ff818]
add ecx, eax
dec ecx
imul ecx, eax
test cl, 1
je 0x1401572d8
mov qword [rbp + 0x3e0], 0
mov qword [rbp + 0x3e8], 0xf
mov byte [rbp + 0x3d0], 0
jmp 0x140157260
cmp r15, 0xf
jbe 0x1401572fc
mov eax, dword [0x14055f3a0]
lea r9, [rbp - 0x60]
mov rcx, rdi
mov rdx, r15
call fcn.14008ad70
lea rax, [0x1404208d8]
jmp 0x140157322
mov qword [rbp + 0x3e0], r15
lea rdx, [rbp - 0x60]
mov rcx, rdi
mov r8, r15
call fcn.1404048d0
mov byte [rbp + r15 + 0x3d0], 0
lea rax, [0x1404208d8]
mov qword [rbp + 0x3c8], rax
test bl, bl
je 0x140157342
add rsi, 0x10
lea rdx, [rbp + 0x3c8]
mov rcx, rsi
call fcn.140157600
jmp 0x140157355
add rsi, 0x30
lea rdx, [rbp + 0x3c8]
mov rcx, rsi
call fcn.140157600
mov eax, 0xbc252bb5
add eax, dword [0x1404ff818]
lea rcx, [fcn.140156f40]
add ecx, ecx
add ecx, 0x4980
xor ecx, eax
not ecx
test ecx, eax
jne 0x1401573a0
jmp 0x140157379
mov rax, qword [rbp + 0x3e8]
mov ecx, dword [0x14055f3a0]
lea edx, [rcx - 1]
imul edx, ecx
test dl, 1
je 0x1401573ad
nop word cs:[rax + rax]
mov eax, dword [0x14055f3a4]
cmp eax, 0x2b
jge 0x1401573a0
jmp 0x140157379
cmp rax, 0x10
jb 0x140157416
mov rcx, qword [rbp + 0x3d0]
mov r8, qword [0x1404ff820]
add r8, rax
movabs rdx, 0x9bb69b0f04e4a9fc
add rdx, r8
cmp rdx, 0x1000
jb 0x140157411
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
movabs rdx, 0x9bb69b0f04e4aa1b
add rdx, qword [0x1404ff820]
cmp rcx, rdx
jae 0x140157493
mov rcx, qword [0x14055f3a8]
lea rdx, [rax + rcx]
add rdx, 0x28
mov rcx, r8
call fcn.1400ac440
mov rax, qword [rbp + 0x3c0]
cmp rax, 0x10
jb 0x140156fcd
mov rcx, qword [rbp + 0x3a8]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140157484
mov r8, qword [rcx - 8]
movabs rdx, 0xdf1dc5c7a15f0761
xor rdx, rcx
movabs r9, 0x5f1dc5c7a15f0761
and r9, rcx
lea rcx, [rdx + r9*2]
add rcx, qword [0x1404ff820]
sub rcx, r8
movabs rdx, 0xbc98d5476385a292
add rdx, rcx
cmp rdx, 0x20
jae 0x14015748e
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.1400ac440
jmp 0x140156fcd
call fcn.1403bcb3c
call fcn.1403bcb3c
int3