Function at 0x180040a0c
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa8
mov r11, qword [0x1801c1900]
mov r15, rcx
mov rbx, qword [0x1801c18c0]
mov r14d, 1
movzx r10d, word [0x1801c1890]
mov r8, qword [0x1801c18e8]
movzx ebp, dl
movzx ecx, byte [rbx + rcx + 0x18]
mov eax, ebp
xor rax, r11
and rcx, r10
mov qword [rsp + 0x58], rax
add bpl, r14b
mov qword [rsp + 0x48], rcx
add rbx, r14
mov qword [0x1801c18c0], rbx
mov eax, 0x7c97d911
movzx r9d, bpl
mul r9d
mov ecx, r9d
shr edx, 0xb
imul eax, edx, 0x1070
xor edx, edx
sub ecx, eax
movzx eax, bpl
mov qword [rsp + 0x40], rax
add bpl, r14b
mov eax, dword [0x1801c1888]
add eax, 0x1b3f
movsxd r12, ecx
cdqe
lea ecx, [r9 + 2]
mov qword [rsp + 0x70], rax
movzx eax, byte [r8 + rbx + 0x19]
add rbx, r14
sub eax, 0x1375
mov qword [rsp + 0x50], r12
movsxd rsi, eax
mov rax, qword [0x1801c18d8]
movzx edi, word [rax + rcx*2]
mov rax, qword [0x1801c18b0]
add edi, r9d
movzx ecx, byte [r8 + 0x4ea]
add ecx, 0x1dec
movzx r9d, bpl
mov qword [rsp + 0x38], rcx
movzx eax, byte [rax + 0x11a1]
div r10d
movsxd r10, dword [0x1801c18f0]
cdqe
mov qword [rsp + 0x60], rax
mov eax, dword [0x1801c188c]
mov dword [0x1801c1888], eax
lea rax, [r15 + r11*2]
mov qword [0x1801c18c0], rbx
movzx ecx, byte [r11 + rax]
mov r11d, 1
movzx eax, bpl
imul ecx, eax
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x108], r9
mov qword [rsp + 0x30], r10
sub ecx, dword [rdi + rbx*8]
mov dword [rdi + rbx*8], ecx
mov rax, qword [0x1801c18d8]
movzx r14d, word [rax + r9*2]
mov dword [rsp + 0xf8], r14d
cmp r14d, 0x251
jl 0x180040e6f
mov r13d, r14d
lea edi, [r14 + 5]
neg r13d
mov dword [rsp + 0xf0], edi
mov ebx, r9d
add qword [rsi], r11
sub bpl, r11b
mov r8, qword [0x1801c18c0]
add r8, r11
movzx ebp, bpl
mov qword [0x1801c18c0], r8
mov r9d, ebp
mov rcx, qword [rsi]
mov qword [rsp + 0x90], rbp
lea rax, [r15 + rcx*2]
movzx edx, byte [rcx + rax]
or dx, r14w
sub dx, r14w
or dx, word [r8*8 + 0x1102]
mov word [rbp*4 + 0xcfb], dx
mov rcx, qword [rsi]
mov rax, qword [0x1801c18a0]
movzx r8d, r14w
movzx edx, word [rax + rcx*8]
imul edx, r8d
mov word [rbp*2 + 0xcc9], dx
mov rax, qword [rsi]
movzx ecx, byte [rax + r12]
cmp ecx, r14d
jle 0x180040c92
xor edx, edx
movsxd r10, r14d
lea eax, [rdi - 4]
movsxd r8, edi
movsxd rcx, eax
mov rax, qword [rbx + rcx*8]
mov rcx, qword [0x1801c18d0]
add rax, 0x768
div r9
mov r9d, 0x2e1
or word [0x1801c18c8], ax
mov eax, 0x887
cdq
idiv dword [rcx + r8*4]
mov rdx, qword [rsi]
sub rsi, 8
mov rcx, qword [0x1801c18a0]
mov r8, qword [rsp + 0x58]
or eax, dword [rcx + rdx*8]
xor edx, edx
movsxd rcx, dword [r8 + r10*4]
and eax, 0x9f0
div rcx
mov rax, qword [rsp + 0x38]
mov dword [r8 + r10*4], edx
mov rdx, qword [rsp + 0x60]
movsxd rcx, dword [rax + rbp*4]
mov rax, qword [rsi]
xor rcx, 0x1440
movzx r8d, byte [rax + rdx]
mov rdx, r10
and r8, r10
call fcn.1800411b0
mov r10, qword [rsp + 0x30]
mov r11d, 1
mov word [0x1801c18c8], ax
lea eax, [rdi + 7]
movsxd rcx, eax
mov rax, qword [0x1801c18e8]
movzx ecx, byte [rcx + rax]
cmp dword [0x1801c1888], ecx
jl 0x1800410fc
lea eax, [rdi - 1]
movsxd rcx, eax
movzx edx, byte [rcx + r15]
mov rcx, qword [rsi]
mov dword [rsp + 0x100], edx
lea rax, [r15 + rcx*2]
movzx ecx, byte [rcx + rax]
cmp edx, ecx
jle 0x180040e4b
mov r9, rbp
movsxd rax, r14d
mov r12d, 0x1131
mov qword [rsp + 0x80], rax
sub r12d, edx
mov ebp, edx
imul r12d, r14d
mov rdi, r9
mov r14, qword [rsp + 0x48]
mov rax, qword [rsi]
sub rsi, 8
movzx r10d, byte [r9 + r15 + 0x11]
mov rdx, qword [rsp + 0x68]
sub r10w, bp
mov r11, qword [rsp + 0x30]
movzx ecx, byte [rax + r15]
movsxd rbx, ebp
imul edx, dword [rdx + rax*4], 0x98a
mov rax, qword [0x1801c18c0]
add rax, 4
add rax, rax
mov r8, qword [rsi + rax*8]
mov rax, qword [rsi]
xor r8, qword [rsp + 0x40]
mov r9, qword [r11 + rax*8 + 0x100]
mov rax, qword [rsp + 0x108]
mov rax, qword [rax + rbx*8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r9
movzx r9d, r10w
call fcn.180042640
mov r8, qword [rsp + 0x80]
mov r11d, 1
mov r10, qword [rsp + 0x30]
add ebp, r11d
movsxd rdx, eax
mov r9, rdi
mov rax, qword [0x1801c1900]
lea rcx, [rax + rax*2]
mov rax, qword [rsp + 0x108]
mov qword [rax + rcx*8], rdx
mov eax, r12d
add qword [0x1801c1900], r11
cdq
mov rcx, qword [0x1801c18a8]
add r12d, r13d
idiv dword [rcx + r8*4]
mov r8d, dword [0x1801c18f0]
xor edx, edx
movsxd rcx, eax
sub r8d, r11d
xor qword [0x1801c18c0], rcx
movzx eax, word [0x1801c18c8]
add ax, r11w
mov dword [0x1801c18f0], r8d
mov word [0x1801c18c8], ax
movzx ecx, ax
movsxd rax, dword [r14 + 0x4cb4]
add ecx, 0xc
div qword [r10 + rcx*8]
movsxd rcx, r8d
movsxd rdx, dword [r14 + rcx*4]
movsxd rcx, dword [0x1801c1898]
xor rax, rdx
mov rdx, qword [r10 + rbx*8]
and rdx, rcx
mov qword [rsp + 0x40], rax
and rdx, rbx
mov qword [rsi + rdi*8], rdx
mov rdx, qword [rsi]
lea rcx, [r15 + rdx*2]
movzx eax, byte [rdx + rcx]
cmp ebp, eax
jg 0x180040cf9
mov rbp, qword [rsp + 0x90]
mov r14d, dword [rsp + 0xf8]
mov edi, dword [rsp + 0xf0]
mov r12, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x108]
add r14d, r11d
add edi, r11d
sub r13d, r11d
mov dword [rsp + 0xf8], r14d
mov dword [rsp + 0xf0], edi
cmp edi, 0x256
jge 0x180040b7e
mov r8, qword [rsi]
xor edx, edx
mov eax, 0x1cef
movzx ecx, byte [r8 + r12]
div ecx
mov byte [r8 + r12], al
mov rax, qword [0x1801c18d0]
movsxd r8, dword [0x1801c18f0]
mov rcx, qword [rsi]
movsxd rdi, dword [rax + r8*4]
mov rax, qword [0x1801c18a8]
cmp edi, dword [rax + rcx*8 + 0x20]
jl 0x180040f3e
mov r12, qword [rsp + 0x48]
lea r14, [rdi*4 + 0xc]
mov rbx, rdi
movzx r13d, bpl
shl rbx, 4
add rbx, r10
mov ecx, dword [0x1801c1894]
mov r8, r13
movzx eax, word [0x1801c18bc]
add ecx, r11d
mov dword [0x1801c1894], ecx
and eax, ecx
mov dword [r12 + r14 + 0x58], eax
mov rcx, r13
mov rdx, qword [rbx]
movzx r9d, word [0x1801c18c8]
xor rdx, 0x306
or r9, 0x19a5
call fcn.1800411b0
mov rcx, qword [0x1801c18d0]
lea rbx, [rbx + 0x10]
mov r11d, 1
add edi, r11d
mov dword [r14 + rcx], eax
lea r14, [r14 + 4]
mov rcx, qword [rsi]
mov rax, qword [0x1801c18a8]
cmp edi, dword [rax + rcx*8 + 0x20]
jge 0x180040ec5
mov r8d, dword [0x1801c18f0]
mov r12, qword [rsp + 0x50]
mov rax, qword [0x1801c18e0]
add rax, r11
movzx ebx, bpl
mov qword [0x1801c18e0], rax
or rax, qword [rsp + 0x40]
mov rcx, qword [rsi]
lea rdx, [rcx + rcx*2]
mov rcx, qword [rsp + 0x38]
movsxd rcx, dword [rcx + rdx*4 + 0x88]
xor edx, edx
div rcx
movsxd rcx, r8d
mov rax, rdx
xor edx, edx
div rcx
movsxd rcx, dword [0x1801c188c]
xor edx, edx
mov dword [0x1801c18f0], eax
mov rax, qword [0xc4e2]
div rcx
mov rcx, qword [0x1801c1900]
imul rcx, rax
mov qword [0x1801c1900], rcx
mov rdx, qword [rsi]
movzx eax, word [0xdd5]
mov ecx, dword [rsi + rdx*8 + 0x30]
xor ecx, eax
mov rax, qword [rsp + 0x58]
mov dword [rax + rdx*4], ecx
mov rax, qword [0x1801c18a8]
mov r8d, dword [0x1801c188c]
sub r8d, r11d
mov dword [0x1801c188c], r8d
mov rcx, qword [rsi - 0x10]
movzx edx, word [rax + rcx*4 + 8]
add dx, word [rsi + rbx*8 - 0x10]
movzx ecx, dx
movzx eax, r8w
imul ecx, eax
movzx eax, bpl
sub cx, ax
mov rax, qword [0x1801c18c0]
add word [0x1801c1890], cx
mov rcx, qword [rsp + 0x48]
movsxd rdx, dword [rcx + rax*4]
mov rcx, qword [0x1801c1900]
call fcn.1800489c4
mov rcx, qword [rsi - 0x10]
xor edx, edx
mov r11, qword [rsp + 0x30]
mov byte [rcx + r15 + 0x23], al
mov r10, qword [rsi - 0x10]
mov rax, qword [rsp + 0x60]
movzx ecx, word [r10*4 + 0xce3]
add r10, r10
movzx eax, byte [rax + rbx + 1]
mov rbx, qword [rsp + 0x68]
div ecx
mov ecx, dword [0x1801c18f0]
mov r9d, eax
lea edx, [rcx + rcx*2]
mov rcx, qword [0x1801c18b0]
movsxd r8, edx
movzx edx, byte [r8 + rcx]
sub r9d, edx
and r9d, 0x1657
mov qword [r11 + r10*8], r9
mov eax, dword [0x1801c1894]
movsxd rdx, dword [0x1801c18f0]
mov r8, qword [rsi - 0x10]
lea eax, [rax*2 + 0x1c]
movsxd rcx, eax
mov rax, qword [0x1801c18e8]
mov cl, byte [rcx + rax]
and cl, byte [rdx + r12]
movzx eax, word [r8 + r8 + 0xcc9]
movzx ecx, cl
imul eax, ecx
sub bpl, 1
movzx ecx, bpl
mov word [r8*2 + 0xcc9], ax
movsxd rdx, dword [rbx + 0x5e18]
and rdx, rcx
call fcn.1800489c4
mov rcx, qword [0x1801c18c0]
lea rdx, [rcx + rcx*2]
mov dword [rbx + rdx*4], eax
mov rax, qword [rsi - 0x10]
mov rcx, qword [rsp + 0x70]
movzx eax, byte [rax + rcx]
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
movsxd rax, dword [0x1801c1894]
movzx ecx, word [0x1801c1890]
mov rdi, rax
add cx, r11w
movsxd r10, r14d
mov word [0x1801c1890], cx
cdq
add qword [rsi], r11
mov r8, qword [rsi]
idiv r14d
movsxd rdx, dword [0x1801c18f0]
movzx ecx, cx
or rdi, rcx
mov rcx, qword [rsp + 0x38]
movzx r11d, byte [rdx + r12]
lea rdx, [r8 + r8*2]
mov r8, qword [rsi + rdx*8]
and r11d, 0xbb1
movzx r9d, word [rcx + rbp*4]
mov edx, eax
mov qword [rsp + 0x28], r11
xor r8, 0x973
mov rcx, rdi
mov qword [rsp + 0x20], r10
call fcn.180042640
movzx edx, word [0x1801c18bc]
mov eax, 0xffff
add dx, ax
mov rax, qword [0x1801c18a0]
mov word [0x1801c18bc], dx
movzx ecx, byte [r15 + 0x8e8]
mov rax, qword [rax + rbp*8]
sub rax, rcx
movzx ecx, dx
xor edx, edx
div rcx
xor word [0x1801c1890], ax
mov rax, qword [rsi]
jmp 0x1800410df