Function at 0x180050ee0
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2f0
mov rax, qword [0x180092190]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov rax, qword [rsp + 0x350]
xor ebx, ebx
movsxd r12, r8d
mov rsi, rcx
mov qword [rsp + 0x98], rcx
lea rcx, [0x180000000]
mov r14d, dword [rcx + r12*4 + 0x82f5c]
mov r13d, 0x1000
mov qword [rsp + 0x60], r9
mov dword [rsp + 0x90], r12d
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0xa0], rax
imul r14d, dword [rsp + 0x368]
sar r14d, 6
mov qword [rsp + 0x70], rbx
mov word [rsp + 0x20], bx
mov dword [rsp + 0x28], 0xffffffff
mov dword [rsp + 0x48], r13d
mov dword [rsp + 0x24], 0xffffffff
mov dword [rsp + 0x38], r14d
mov r15d, ebx
mov rdi, rdx
cmp dword [rsp + 0x378], ebx
je 0x180050fd2
mov rcx, rdx
call qword [0x1801090d0]
mov r8d, 0x8000
mov edx, r8d
imul eax, dword [rsp + 0x370]
add eax, eax
nop dword [rax + rax]
mov ecx, edx
imul ecx, edx
cmp ecx, eax
jbe 0x180050fbc
xor edx, r8d
shr r8d, 1
je 0x180050fc6
or edx, r8d
jmp 0x180050fb0
lea eax, [rdx + 0x30]
shr eax, 6
mov dword [rsp + 0x30], eax
jmp 0x180050fd6
mov dword [rsp + 0x30], ebx
movsxd rdx, dword [rsp + 0x358]
mov r8, qword [rsp + 0x60]
mov dword [rsp + 0xb0], r13d
mov rcx, rdx
test edx, edx
js 0x18005100b
movzx eax, word [r8 + rcx*2]
cmp word [rsi + rax*2], bx
jne 0x180051006
dec edx
dec rcx
jns 0x180050ff2
jmp 0x18005100b
cmp edx, 3
jge 0x180051010
mov edx, 3
movsxd rax, edx
mov qword [rsp + 0x2e8], rbp
mov dword [rsp + 0x2c], ebx
mov r10, rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x80], 0xffffffffffffffff
mov qword [rsp + 0xa8], rax
test edx, edx
js 0x180051673
mov r11, rbx
mov qword [rsp + 0x58], rbx
nop dword [rax + rax]
movzx ecx, word [r8 + r10*2]
mov rax, qword [rsp + 0xa0]
mov r9d, dword [rsp + 0x378]
movzx eax, word [rax + rcx*2]
movsx edi, word [rdi + rcx*2]
movsx rsi, word [rsi + rcx*2]
imul eax, r12d
sar eax, 4
lea ebp, [rax - 1]
lea r12d, [rax + rax]
or ebp, 1
lea ebx, [rbp + r12]
test r9d, r9d
je 0x1800510bf
movzx r8d, word [r8 + r10*2]
movzx edx, word [rsp + 0x30]
mov r9d, r14d
movzx ecx, di
call fcn.180050e40
mov r11, qword [rsp + 0x58]
mov r10, qword [rsp + 0x50]
mov r8, qword [rsp + 0x60]
mov edx, dword [rsp + 0x38]
mov r9d, dword [rsp + 0x378]
jmp 0x1800510cb
mov edx, dword [rsp + 0x38]
mov eax, edi
imul eax, edi
imul eax, edx
add r15d, eax
lea r14d, [rsi + 1]
mov dword [rsp + 0x68], eax
mov r13d, 0xf0000000
mov dword [rsp + 0x34], r15d
cmp r14d, 3
jae 0x18005120c
mov ebp, 1
test edi, edi
jns 0x18005110b
or rax, 0xffffffffffffffff
add ebx, edi
mov esi, eax
mov dword [rsp + 0x40], eax
mov word [rsp + r11 + 0x1c2], ax
jmp 0x18005111c
mov esi, ebp
mov dword [rsp + 0x40], ebp
mov word [rsp + r11 + 0x1c2], bp
sub ebx, edi
test r9d, r9d
je 0x18005113f
movzx r8d, word [r8 + r10*2]
mov r9d, edx
movzx edx, word [rsp + 0x30]
movzx ecx, bx
call fcn.180050e40
mov r11, qword [rsp + 0x58]
mov ebx, eax
jmp 0x180051145
imul ebx, ebx
imul ebx, edx
mov r14d, dword [rsp + 0x2c]
mov eax, dword [rsp + r11 + 0xb0]
mov word [rsp + r11 + 0x1c0], bp
mov edx, r14d
lea r13d, [rax + rbx + 0x1800]
sub edx, dword [rsp + 0x28]
test edx, edx
jle 0x1800511ed
mov rax, qword [rsp + 0x50]
movsxd rcx, edx
lea rsi, [0x180000000]
sub rax, rcx
lea r9, [rcx - 1]
lea r10, [rsp + rax*4 + 0xb4]
mov eax, dword [r10]
movzx r8d, byte [r9 + rsi + 0x82d30]
lea ecx, [rbx + rax]
movzx eax, byte [r9 + rsi + 0x82e30]
shl r8d, 0xb
shl eax, 0xb
add r8d, ecx
add eax, ecx
cmp r8d, r13d
jae 0x1800511c5
mov r13d, r8d
mov word [rsp + r11 + 0x1c0], dx
cmp eax, r15d
jae 0x1800511d7
mov r15d, eax
mov word [rsp + 0x70], dx
mov dword [rsp + 0x24], r14d
dec edx
add r10, 4
dec r9
test edx, edx
jg 0x180051190
mov esi, dword [rsp + 0x40]
mov dword [rsp + 0x34], r15d
mov r9d, dword [rsp + 0x24]
mov ebx, dword [rsp + 0x28]
cmp r9d, r14d
jne 0x180051516
movzx ebp, si
mov word [rsp + 0x20], si
jmp 0x18005151b
lea eax, [rsi + 0x19]
cmp eax, 0x33
jae 0x180051483
mov r15d, esi
lea r11, [0x180000000]
imul r15d, r12d
sub r15d, edi
cmp esi, 1
jle 0x1800512a5
add r15d, ebp
lea r14d, [rsi - 1]
mov ebp, r15d
sub ebp, r12d
cmp esi, 0x18
jg 0x18005124a
mov rcx, qword [r11 + rsi*8 + 0x82e68]
jmp 0x180051251
lea rcx, [0x180082830]
mov qword [rsp + 0x40], rcx
cmp r14d, 0x18
jg 0x180051269
movsxd rax, r14d
mov rdi, qword [r11 + rax*8 + 0x82e68]
jmp 0x180051270
lea rdi, [0x180082830]
cmp esi, 6
jg 0x18005127f
mov rcx, qword [r11 + rsi*8 + 0x82f28]
jmp 0x180051286
lea rcx, [0x180082830]
mov qword [rsp + 0x78], rcx
cmp r14d, 6
jg 0x180051327
movsxd rax, r14d
mov r12, qword [r11 + rax*8 + 0x82f28]
jmp 0x18005132e
sub r15d, ebp
lea ebp, [r15 + r12]
cmp esi, 0xffffffe8
jl 0x1800512c2
mov eax, esi
not eax
movsxd rcx, eax
mov rcx, qword [r11 + rcx*8 + 0x82e70]
jmp 0x1800512c9
lea rcx, [0x180082830]
mov qword [rsp + 0x40], rcx
cmp r14d, 0xffffffe8
jl 0x1800512e6
mov eax, r14d
not eax
movsxd rcx, eax
mov rdi, qword [r11 + rcx*8 + 0x82e70]
jmp 0x1800512ed
lea rdi, [0x180082830]
cmp esi, 0xfffffffa
jl 0x180051303
mov eax, esi
not eax
movsxd rcx, eax
mov rcx, qword [r11 + rcx*8 + 0x82f30]
jmp 0x18005130a
lea rcx, [0x180082830]
mov qword [rsp + 0x78], rcx
cmp r14d, 0xfffffffa
jl 0x180051327
mov eax, r14d
not eax
movsxd rcx, eax
mov r12, qword [r11 + rcx*8 + 0x82f30]
jmp 0x18005132e
lea r12, [0x180082830]
test r9d, r9d
je 0x180051368
movzx ebx, word [r8 + r10*2]
mov r9d, edx
movzx edx, word [rsp + 0x30]
mov r8d, ebx
movzx ecx, r15w
call fcn.180050e40
mov r9d, dword [rsp + 0x38]
movzx edx, word [rsp + 0x30]
mov r8d, ebx
movzx ecx, bp
mov r15d, eax
call fcn.180050e40
mov ebp, eax
jmp 0x180051376
imul r15d, r15d
imul ebp, ebp
imul r15d, edx
imul ebp, edx
mov edx, dword [rsp + 0x2c]
mov ebx, dword [rsp + 0x28]
mov r11, qword [rsp + 0x58]
sub edx, ebx
sub ebp, r15d
test edx, edx
jle 0x18005150c
mov rax, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x78]
movsxd rcx, edx
sub rax, rcx
lea r8, [rcx + rdi - 1]
mov rcx, qword [rsp + 0x40]
sub rcx, rdi
sub rbx, rdi
sub r12, rdi
mov edi, dword [rsp + 0x34]
mov qword [rsp + 0x40], rcx
lea r10, [rsp + rax*4 + 0xb4]
nop word [rax + rax]
mov eax, dword [r10]
lea r9d, [r15 + rax]
movzx eax, byte [rcx + r8]
movzx ecx, byte [r8]
shl ecx, 0xb
shl eax, 0xb
add ecx, r9d
add eax, r9d
add ecx, ebp
cmp ecx, eax
jae 0x1800513f9
mov eax, ecx
mov ecx, r14d
jmp 0x1800513fb
mov ecx, esi
cmp eax, r13d
jae 0x180051415
mov r13d, eax
mov word [rsp + r11 + 0x1c0], dx
mov word [rsp + r11 + 0x1c2], cx
movzx ecx, byte [r12 + r8]
movzx eax, byte [rbx + r8]
shl ecx, 0xb
shl eax, 0xb
add ecx, r9d
add eax, r9d
add ecx, ebp
cmp ecx, eax
jae 0x180051438
mov eax, ecx
mov ecx, r14d
jmp 0x18005143a
mov ecx, esi
cmp eax, edi
jae 0x180051456
mov r9d, dword [rsp + 0x2c]
mov edi, eax
mov word [rsp + 0x70], dx
mov dword [rsp + 0x24], r9d
mov word [rsp + 0x20], cx
jmp 0x18005145b
mov r9d, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x40]
dec edx
add r10, 4
dec r8
test edx, edx
jg 0x1800513d0
mov r14d, dword [rsp + 0x2c]
mov ebx, dword [rsp + 0x28]
mov dword [rsp + 0x34], edi
jmp 0x180051516
mov r14d, dword [rsp + 0x2c]
mov ebx, dword [rsp + 0x28]
mov edx, r14d
sub edx, ebx
test edx, edx
jle 0x180051511
movsxd rax, edx
mov rcx, r10
sub rcx, rax
lea r8, [rsp + rcx*4 + 0xb4]
nop word [rax + rax]
mov eax, dword [r8]
add eax, 0xf000
cmp eax, r13d
jae 0x1800514d2
mov r13d, eax
mov word [rsp + r11 + 0x1c0], dx
mov word [rsp + r11 + 0x1c2], si
cmp eax, r15d
jae 0x1800514f1
mov r15d, eax
mov word [rsp + 0x70], dx
movzx ebp, si
mov word [rsp + 0x20], si
mov r9d, r14d
mov dword [rsp + 0x24], r14d
jmp 0x1800514fb
mov r9d, dword [rsp + 0x24]
movzx ebp, word [rsp + 0x20]
dec edx
add r8, 4
test edx, edx
jg 0x1800514b0
mov dword [rsp + 0x34], r15d
jmp 0x18005151b
mov r14d, dword [rsp + 0x2c]
mov r9d, dword [rsp + 0x24]
movzx ebp, word [rsp + 0x20]
mov edx, dword [rsp + 0x68]
mov eax, dword [rsp + 0x48]
mov dword [rsp + r11 + 0xb4], r13d
lea ecx, [rdx + rax]
cmp r13d, ecx
jae 0x18005154c
mov r10, qword [rsp + 0x50]
mov dword [rsp + 0x48], r13d
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x80], r10
jmp 0x1800515b3
mov r8, qword [rsp + 0x80]
add eax, 0x800
cmp dword [rsp + r8*4 + 0xb4], eax
jbe 0x18005158b
nop word [rax + rax]
inc r8
inc ebx
cmp dword [rsp + r8*4 + 0xb4], eax
ja 0x180051570
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x80], r8
mov r10, qword [rsp + 0x50]
mov rax, r8
cmp r8, r10
jge 0x1800515af
nop dword [rax + rax]
add dword [rsp + rax*4 + 0xb4], edx
inc rax
cmp rax, r10
jl 0x1800515a0
mov dword [rsp + 0x48], ecx
mov r15d, dword [rsp + 0x34]
mov r8, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x98]
mov rdi, qword [rsp + 0x88]
mov r12d, dword [rsp + 0x90]
inc r14d
inc r10
add r11, 4
mov dword [rsp + 0x2c], r14d
mov r14d, dword [rsp + 0x38]
mov qword [rsp + 0x50], r10
mov qword [rsp + 0x58], r11
cmp r10, qword [rsp + 0xa8]
jle 0x180051050
test r9d, r9d
js 0x180051673
xor edx, edx
mov r8d, 0x80
mov rcx, rsi
call fcn.18000e2e0
movsxd rdi, dword [rsp + 0x24]
mov r10, qword [rsp + 0x60]
movzx eax, word [r10 + rdi*2]
mov word [rsi + rax*2], bp
mov rax, qword [rsp + 0x70]
cwde
sub edi, eax
movsx eax, bp
cdq
mov r9d, eax
xor r9d, edx
sub r9d, edx
test edi, edi
js 0x18005166e
movsxd r8, edi
movsx edx, word [rsp + r8*4 + 0x1c2]
movzx ecx, word [r10 + r8*2]
mov word [rsi + rcx*2], dx
movsx ecx, word [rsp + r8*4 + 0x1c0]
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add r9d, eax
sub edi, ecx
jns 0x180051642
mov eax, r9d
jmp 0x18005167a
mov eax, dword [rsp + 0x360]
mov rbp, qword [rsp + 0x2e8]
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.18000caa0
add rsp, 0x2f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret