Function at 0x180003040
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x88
movzx r8d, word [0x18002f940]
mov r12, rdx
mov r10, qword [0x18002f920]
xor edx, edx
mov eax, 0x883
mov qword [rsp + 0x50], r10
div r8d
mov rax, qword [r12]
mov r11d, 0x2198
movsxd rdi, edx
mov r14d, 1
mov r13, rcx
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0xe8], r11
movzx eax, byte [rax + rcx + 6]
mov qword [rsp + 0xd0], rax
mov eax, 0x82f
cdq
idiv dword [0x18002f910]
movsxd rbx, eax
mov eax, dword [0x18002f8c4]
add eax, r14d
mov qword [rsp + 0x58], rbx
mov dword [0x18002f8c4], eax
movzx r9d, byte [rcx + 0xdf8]
movsxd r15, eax
mov rax, qword [0x18002f8f8]
mov qword [rsp + 0x60], r15
mov rsi, qword [r12 + rax*8]
mov rax, qword [0x18002f8b0]
mov rbp, qword [r12 + rax*8]
mov eax, 0xffff
add word [r11], ax
movzx ecx, word [r11]
mov rax, qword [r12 + 0x8d28]
mov qword [rsp + 0x68], rbp
cmp qword [r12 + rcx*8], rax
jb 0x18000324a
mov rax, qword [r12]
movzx ecx, byte [r13 + 0xd25]
movzx edx, word [r15 + rax*2]
mov rax, qword [0x18002f8f8]
and dx, cx
mov word [rax*2 + 0x2198], dx
xor edx, edx
add byte [r13], r14b
mov rax, qword [r12]
movzx r8d, byte [r13]
movsxd rcx, dword [rax*4 + 0xb18]
mov rax, qword [rdi + 0xf568]
div rcx
and dx, word [r12 + 0x7520]
sub dx, word [r15 + r8*2 + 0x30]
mov word [r15 + r8*2 + 0x30], dx
movsxd rax, dword [r9 + 0x77a4]
xor rax, 0x16dc
and qword [0x18002f8d0], rax
mov rax, qword [rdi]
movzx r8d, word [r11]
lea rcx, [rax + rax*2]
movzx eax, word [rcx + rcx + 0x2198]
cdq
idiv dword [rbp + r8*4]
mov dword [rbp + r8*4], eax
mov rax, qword [0x18002f930]
sub rax, qword [0x18002f8e8]
mov rdx, qword [0x18002f918]
mov qword [0x18002f8e8], rax
movzx eax, word [r11]
mov r11d, 0x2196
movzx r8d, byte [r13]
mov qword [rsp + 0xe8], r11
movzx ecx, byte [rax + r13]
imul rax, rcx, 0x812
add qword [rdx + r8*8 + 0x40], rax
movzx ecx, byte [r13]
sub r13, r14
imul rax, qword [r10 + rcx*8 + 0x48], 0x1b3
mov qword [r10 + rcx*8 + 0x48], rax
mov rcx, qword [0x18002f918]
movzx edx, byte [r13]
mov rax, qword [r12 + 0xba58]
sub rax, qword [rcx + rdx*8]
mov qword [rcx + rdx*8], rax
xor edx, edx
add word [r11], r14w
movzx eax, word [r11]
mov r8, qword [0x18002f920]
movzx ecx, word [rax + rax + 0xbf2]
mov eax, 0x3ef
div ecx
mov rax, qword [rbx + r8*8]
movsxd rcx, edx
xor rcx, qword [r12 + 0xce30]
imul rax, rcx
mov qword [rbx + r8*8], rax
movzx eax, word [r11]
movzx ecx, byte [r13 + 0x1d32]
add rax, rax
mov qword [r12 + rax*8], rcx
movsxd rcx, dword [0x18002f8c4]
mov rax, qword [r12 + 0x84c0]
sub rax, qword [r12 + rcx*8]
mov qword [r12 + rcx*8], rax
mov eax, 0xffff
add word [r11], ax
mov al, byte [0x18002f8e0]
movzx ecx, word [r11]
and al, 0xfc
add byte [rcx + r13 + 0x14], al
mov eax, 0x1d59
cdq
idiv dword [0x18002f8d8]
mov dword [0x18002f8d8], edx
movzx eax, word [r11]
movzx edx, byte [r13]
mov rcx, qword [r12 + rax*8]
mov eax, 0x800
xor qword [rbx + rdx*8 + 8], rcx
xor edx, edx
mov r8, qword [0x18002f8f8]
movzx ecx, byte [r8 + r13 + 0x10]
div ecx
mov byte [r8 + r13 + 0x10], al
movzx eax, byte [r13 + 0x67c]
cmp dword [0x18002f8c0], eax
jg 0x1800035fd
mov rax, qword [r12]
mov rcx, qword [r12 + rax*8 + 8]
cmp qword [0x18002f8e8], rcx
ja 0x1800035fd
mov ecx, dword [0x18002f8a4]
add ecx, r14d
mov dword [0x18002f8a4], ecx
movzx eax, byte [r13]
movsxd rcx, ecx
mov rax, qword [r12 + rax*8 + 0xb0]
cmp qword [r12 + rcx*8], rax
jne 0x1800034ea
mov rdx, qword [0x18002f920]
mov eax, 0x88e
mov rcx, qword [0x18002f8c8]
sub rax, qword [rcx + rdx*8]
mov qword [rcx + rdx*8], rax
mov eax, 0x98b85681
add byte [r13], r14b
mov r8d, dword [0x18002f914]
add r8d, r14d
mov dword [0x18002f914], r8d
movzx r10d, byte [r13]
movzx r9d, byte [r10 + r13]
mul r9d
shr edx, 0xc
imul ecx, edx, 0x1ad2
sub r9d, ecx
lea ecx, [r8 + r8]
movsxd r8, ecx
mov eax, r9d
cdq
idiv dword [r8*4 + 0x78f]
movsxd rax, edx
xor edx, edx
or qword [r12 + r10*8], rax
movzx ecx, word [r11]
mov rax, qword [0x18002f8c8]
mov qword [rax + rcx*8 + 0x28], 0x5c7
movzx eax, byte [r13]
mov r8, qword [0x18002f900]
mov r9, qword [0x18002f920]
movzx eax, byte [r13 + rax*2 + 0xb]
and rax, qword [0x18002f930]
movsxd rcx, dword [r8 + r9*4 + 0x30]
div rcx
mov dword [r8 + r9*4 + 0x30], eax
movzx ecx, word [0x18002f93c]
mov r8d, dword [0x18002f948]
sub r8d, r14d
mov dword [0x18002f948], r8d
mov eax, r8d
cdq
idiv ecx
mov word [0x18002f93c], dx
movzx eax, word [r11]
lea rcx, [rax + rax*2]
mov eax, 0x1e54
movzx edx, word [rbx + rcx*8 + 0x100]
movzx ecx, word [0x18002f938]
imul edx, eax
movzx eax, dx
imul ecx, eax
lea eax, [r8 + 0xa]
mov word [0x18002f938], cx
movsxd rcx, eax
movsxd r14, dword [rsi + rcx*4]
mov rsi, r14
cmp r14, qword [r12 + 0x5a10]
jb 0x1800034e0
mov r15d, 1
movsxd rcx, dword [rsi*4 + 0x78f]
xor edx, edx
mov eax, 0x2a5
mov qword [rsp + 0x40], 0x1c64
div qword [r12 + 0x7450]
movzx eax, byte [r13]
mov qword [rsp + 0x38], 0x18b0
mov r9, rdx
mov word [rsp + 0x30], r14w
mov edx, 0x1beb
movzx r8d, byte [r13 + rax*2]
mov eax, 0x1161
and r8w, ax
mov rax, rsi
mov word [rsp + 0x28], r8w
or rax, 0xa48
mov r8d, 0x1cc2
mov qword [rsp + 0x20], rax
call fcn.18001c18c
movsxd rcx, eax
add r14d, r15d
mov rax, qword [r12]
mov qword [rdi + rax*8], rcx
mov al, byte [rsi + r13]
mov rcx, qword [r12]
movsxd rsi, r14d
or byte [rcx + r13], al
cmp rsi, qword [r12 + 0x5a10]
jae 0x18000343e
mov r11, qword [rsp + 0xe8]
mov r15, qword [rsp + 0x60]
mov r10, qword [rsp + 0x50]
jmp 0x180003622
mov rax, qword [rdi]
movzx ecx, word [0x18002f928]
movsxd r8, dword [0x18002f914]
movzx edx, word [r12 + rax*8]
imul edx, ecx
and word [r11 + r8*2], dx
sub dword [0x18002f914], r14d
movzx eax, word [r12 + 0x1e0]
mov word [0x18002f8dc], ax
mov eax, dword [0x18002f948]
add eax, 0x10
movsxd rcx, eax
mov rax, qword [0x18002f8f0]
movzx edx, word [rax + rcx*4]
mov eax, 0x1a60
sub dx, word [0xf6c]
sub dx, ax
movzx eax, word [r11]
mov word [r15 + rax*2], dx
movzx r10d, word [0x18002f93c]
cmp r10, qword [r12 + 0xd400]
jbe 0x1800034e0
lea rsi, [r10*4 + 0x14]
mov ebx, 1
add rsi, rbp
lea r14, [r12 + r10*8]
or dword [0x18002f8c4], r10d
mov eax, 0x143
sub eax, dword [rsi]
xor edx, edx
movsxd rcx, dword [rsi - 0x14]
add r10d, ebx
mov dword [rsi], eax
lea rsi, [rsi + 4]
mov rax, qword [r12 + 0xcf28]
mov r9, qword [0x18002f8f8]
sub rax, rcx
div qword [r14]
mov r8, qword [0x18002f918]
lea r14, [r14 + 8]
and qword [r8 + r9*8], rdx
mov eax, dword [r12 + 0xe9e0]
movzx ecx, word [r11]
sub eax, dword [rcx*4 + 0xb18]
mov dword [rcx*4 + 0xb18], eax
imul rax, qword [0x18002f8b8], 0xc43ce0
mov qword [0x18002f8b8], rax
movsxd rax, r10d
cmp rax, qword [r12 + 0xd400]
ja 0x180003579
mov rbx, qword [rsp + 0x58]
jmp 0x1800034e0
mov ecx, dword [0x18002f910]
mov eax, 0x4818c885
imul ecx
sar edx, 0xb
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x1c68
sub ecx, eax
mov dword [0x18002f8a0], ecx
movsxd rcx, dword [0x18002f8a4]
xor edx, edx
mov eax, dword [0x18002f8e8]
sub eax, dword [rcx*4 + 0x78f]
mov dword [rcx*4 + 0x78f], eax
mov rax, qword [0x18002f8f8]
mov rcx, qword [rsp + 0xd0]
movzx r8d, word [r11]
movzx ecx, word [rcx + rax*2]
mov eax, 0x513
div ecx
movzx ecx, word [r15 + r8*4]
mov eax, edx
cdq
idiv ecx
mov ecx, 0x2bd
mov word [r15 + r8*4], ax
movzx eax, word [r11]
sub ecx, dword [rbp + rax*4]
mov eax, 0x5f76c545
imul ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x55d
sub ecx, eax
mov rax, qword [rdi]
movsxd rcx, ecx
mov qword [r12 + rax*8], rcx
mov eax, 0xffff
add word [r11], ax
movzx eax, word [r11]
movzx r9d, word [rax + rax + 0xbe8]
mov dword [rsp + 0xd0], r9d
cmp r9d, 0x1791
jle 0x18000391c
lea ebx, [r9 + 0x23]
lea eax, [r9*2 + 5]
mov dword [rsp + 0xe0], ebx
mov dword [rsp + 0xd8], eax
movsxd r8, eax
xor edx, edx
mov eax, dword [0x18002f948]
add eax, 2
movsxd r14, r9d
movsxd rcx, eax
mov r15, r14
movzx eax, byte [rcx + r13]
div qword [r10 + r8*8]
movsxd rax, ebx
mov qword [r10 + r8*8], rdx
movzx r8d, word [0x18002f938]
mov r10, qword [rsp + 0x58]
mov rbp, qword [r12 + rax*8]
mov eax, 0x17c2
movzx ecx, ax
sub rbp, r14
mov rax, qword [0x18002f8f0]
movzx esi, word [rax + r14*4]
mov eax, dword [0x18002f8a0]
inc eax
imul esi, ecx
movzx ecx, word [0x18002f8dc]
mov dword [0x18002f8a0], eax
mov r10, qword [r10 + r14*8]
imul r8d, eax
add r10, 0x459
mov rax, qword [r12]
movzx edi, byte [rax + r13]
mov eax, edi
cdq
idiv dword [rcx*4 + 0x78f]
movzx edx, si
mov rcx, rbp
movsxd r9, eax
movzx eax, word [r11]
sub r11, 2
mov qword [rsp + 0xe8], r11
mov r11d, 0x46f
sub r11w, word [r12 + 0x1d50]
movzx ebx, word [rax + rax + 0xbe8]
movzx eax, word [0x18002f93c]
imul eax, edi
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r10
mov word [rsp + 0x30], r11w
mov word [rsp + 0x28], bx
mov qword [rsp + 0x20], 0xb2e
call fcn.18001c18c
mov rbp, qword [rsp + 0x68]
movsxd rsi, eax
mov eax, 0x1617
mov qword [r12 + r14*8], rsi
movzx ecx, byte [r14 + r13]
mov r8d, dword [r15*4 + 0x78f]
sub eax, ecx
mov r9, qword [r12 + 0x3928]
sub rsi, rcx
movzx ecx, word [0x18002f948]
and r8d, 0x1ba
or r14, qword [0x18002f8b8]
movsxd rdi, eax
mov eax, 0x302
cdq
idiv dword [rbp + 0x437c]
mov rax, qword [rsp + 0x58]
movsxd rbx, edx
mov r11, qword [rax + 0x3180]
movzx eax, byte [r13]
movzx r10d, word [r12 + rax*8 + 0x58]
movzx eax, word [0x18002f8dc]
imul r10d, ecx
inc ax
mov word [0x18002f8dc], ax
movzx eax, ax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r9
mov word [rsp + 0x38], r10w
mov qword [rsp + 0x30], r11
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rbx
mov r9d, 0x172e
mov rdx, r14
mov rcx, rdi
call fcn.180018a9c
movzx ecx, word [0x18002f8dc]
mov r9d, dword [rsp + 0xd0]
mov ebx, dword [rsp + 0xe0]
mov r11, qword [rsp + 0xe8]
mov r10, qword [rsp + 0x50]
mov word [rcx*2 + 0xbe8], ax
movsxd rax, dword [0x18002f910]
and qword [0x18002f8d0], rax
movzx eax, word [rbp + r15*4]
movsxd rdx, dword [0x18002f8c4]
and ax, r9w
movzx ecx, ax
movzx eax, word [rdx + rdx + 0xbe8]
imul eax, ecx
mov ecx, 1
add r9d, ecx
add ebx, ecx
mov dword [rsp + 0xd0], r9d
mov dword [rsp + 0xe0], ebx
mov word [rdx*2 + 0xbe8], ax
mov eax, dword [rsp + 0xd8]
add eax, 2
mov dword [rsp + 0xd8], eax
cmp eax, 0x2f27
jg 0x1800036e1
mov rdi, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x58]
mov r15, qword [rsp + 0x60]
movzx eax, word [r15 + 0x1ab2]
mov r9d, 1
movsxd rcx, dword [0x18002f8c4]
sub eax, dword [rcx*4 + 0x78f]
mov dword [rcx*4 + 0x78f], eax
movsxd rax, dword [0x18002f8d8]
mov rcx, qword [0x18002f920]
xor qword [rdi + rcx*8], rax
mov eax, 0xffff
add word [r11], ax
movabs rax, 0x886d3f7bd62a8009
mul qword [0x18002f930]
movzx r8d, word [r11]
mov rax, rdx
xor edx, edx
shr rax, 0xb
movsxd rcx, dword [rbp + r8*4]
div rcx
mov dword [rbp + r8*4], eax
mov eax, dword [rbp + 0x4930]
mov r8, qword [0x18002f8f8]
cdq
movzx ecx, word [r8 + r8 + 0xbe8]
idiv ecx
mov eax, 0x1ab7
mov word [r8*2 + 0xbe8], dx
sub eax, dword [0x18002f944]
mov dword [0x18002f944], eax
movzx eax, word [0x18002f8dc]
and dword [rbp + rax*4], 0x1052
add qword [r12], r9
mov r8, qword [r12]
cmp qword [r12 + r8*8], 0x1c6b
jae 0x180003b67
movzx eax, word [r11]
sub r11, 2
mov rdx, qword [0x18002f8f0]
mov rbp, qword [rsp + 0x50]
mov qword [rsp + 0xe8], r11
movsxd rcx, dword [rdx + rax*4 + 0x30]
cmp rcx, qword [rbp + 0x3eb8]
jne 0x180003b67
mov rax, qword [rbp + 0x9008]
cmp qword [0x18002f8d0], rax
jbe 0x180003b67
add dword [0x18002f944], 0xaf
mov rax, qword [0x18002f8b0]
movsxd rsi, dword [r12 + rax*8]
cmp esi, 0x1cf0
jl 0x180003b54
lea rax, [rsi + rsi*2]
mov r14, rsi
lea r12, [r12 + rax*8]
movzx edx, word [r11]
mov eax, dword [rbp + 0x8828]
mov rcx, qword [0x18002f908]
add dword [rcx + rdx*4], eax
xor edx, edx
mov rax, qword [rdi]
add qword [rbx + rax*8], 0xc44
movzx eax, byte [r13]
mov rcx, qword [0x18002f8c8]
mov r8d, dword [0x18002f914]
imul rbx, qword [r12], 0xdf8
movzx eax, word [rax + rax + 0xbe8]
div qword [rcx + r14*8]
lea eax, [r8 + 0x25]
sub r8d, r9d
movsxd rcx, eax
movzx eax, byte [rcx + r13]
mov dword [0x18002f914], r8d
add eax, esi
movzx r9d, byte [r13 + 0x293]
movzx r10d, byte [r13 + 0x18d9]
movsxd r11, eax
and r10d, 0x1ccf
movzx eax, byte [r13]
dec r13
movsxd r8, esi
xor r8, 0x1285
movzx ecx, word [r15 + rax*2]
mov rax, qword [0x18002f8b8]
or rcx, 0x19fc
or rax, 0x1c8c
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rcx
mov ecx, 0x5b0
mov qword [rsp + 0x38], r9
mov r9d, 1
mov dword [rsp + 0x30], r10d
mov qword [rsp + 0x28], r11
mov qword [rsp + 0x20], rbx
call fcn.180004eb8
mov r11, qword [rsp + 0xe8]
lea r12, [r12 + 0x18]
mov rbx, qword [rsp + 0x58]
mov r9d, 1
mov byte [r14 + r13 + 0x24], al
add esi, r9d
add r14, r9
cmp esi, 0x1cf0
jge 0x180003a4b
mov rdx, qword [0x18002f8f0]
mov rcx, qword [rdi]
mov eax, 0xfdf
sub eax, dword [rdx + rcx*8]
mov dword [rdx + rcx*8], eax
jmp 0x180003c40
lea rax, [r8*2]
add rax, r13
movzx edx, byte [r8 + rax]
movzx eax, word [0x18002f938]
movzx ecx, byte [rax + r13]
imul edx, ecx
mov dword [0x18002f914], edx
mov rdx, qword [rdi]
mov rcx, qword [r12]
movzx eax, byte [r13 + 0x1271]
add rcx, rcx
mov ecx, dword [r12 + rcx*8]
xor ecx, eax
add dword [rdx*4 + 0xb18], ecx
imul rax, qword [0x18002f8b8], 0x9fa
mov qword [0x18002f8b8], rax
mov eax, 0x1aa8
sub eax, dword [0x18002f8a0]
movsxd rcx, eax
sub rcx, qword [0x18002f8f8]
mov qword [0x18002f8f8], rcx
mov rax, qword [r12]
movzx ecx, byte [r13 + 0x7e9]
movzx edx, word [r12 + rax*8 + 0xe0]
xor dx, cx
movzx ecx, word [0x18002f940]
xor dx, word [0x18002f948]
movzx eax, dx
xor edx, edx
imul ecx, eax
mov eax, dword [0x18002f8c4]
add eax, 9
movsxd r8, eax
mov eax, 0xd95
mov word [0x18002f940], cx
movzx ecx, word [r11 + r8*2]
div ecx
mov word [r11 + r8*2], ax
dec byte [r13]
movzx ecx, byte [r13]
movzx eax, byte [r13 + 0x17b]
mov qword [rbx + rcx*8], rax
mov eax, dword [0x18002f948]
add eax, 8
movsxd rcx, eax
mov eax, dword [0x70b3]
cdq
movzx r8d, byte [rcx + r13]
idiv r8d
mov eax, edx
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret