Function at 0x20401470
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push rbx
test ecx, ecx
je 0x204015a4
mov eax, dword [0x205b86ac]
cmp eax, 0x10
nop word cs:[rax + rax]
mov eax, dword [0x205b86a8]
mov ecx, dword [0x205a5130]
neg ecx
add ecx, eax
add ecx, 0xd8085ab0
imul ecx, eax
test cl, 1
jne 0x20401490
test edx, edx
jne 0x20401547
movzx eax, byte [0x205a3e15]
cmp al, 0x9c
je 0x204017a7
mov ecx, 0x27f7a597
mov dl, 0xb0
mov r8b, 1
nop
mov eax, dword [0x205b86ac]
mov r9d, dword [0x205a5130]
add r9d, ecx
cmp eax, r9d
jge 0x20401520
nop word cs:[rax + rax]
mov al, 0x9a
lock cmpxchg byte [0x205a3e15], dl
sete r9b
test r8b, r8b
je 0x20401520
test r9b, r9b
jne 0x2040169e
cmp al, 0x9c
jne 0x204014d0
jmp 0x204017a7
mov al, 0x9a
lock cmpxchg byte [0x205a3e15], dl
test r8b, r8b
je 0x20401520
jmp 0x204014f0
movzx eax, byte [0x205a3e52]
mov eax, dword [0x205b86a8]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
jne 0x20401540
movzx eax, byte [0x205a3e52]
movzx ecx, byte [0x205a5134]
mov edx, dword [0x205b86ac]
cmp edx, 0x3e
jge 0x20401540
add cl, 0xe2
cmp al, cl
je 0x20401692
nop dword [rax]
movzx ecx, byte [0x205a5134]
lea eax, [rcx - 0x52]
add cl, 0x1a
lock cmpxchg byte [0x205a3e52], cl
je 0x20401647
cmp al, 0xb7
jne 0x20401580
jmp 0x20401692
test edx, edx
je 0x204015e9
movzx eax, byte [0x205a446c]
movzx ecx, byte [0x205a5134]
mov edx, ecx
xor dl, 0x53
and cl, 0x53
add cl, cl
add cl, dl
cmp al, cl
je 0x204018cf
mov cl, 0x19
nop dword [rax]
mov al, 0x39
lock cmpxchg byte [0x205a446c], cl
je 0x20401768
cmp al, 0x28
jne 0x204015d0
jmp 0x204018cf
movzx eax, byte [0x205a453d]
cmp al, 0xb2
je 0x20401896
mov cl, 0x43
xor edx, edx
nop dword [rax]
mov eax, dword [0x205b86ac]
cmp eax, 0x1e
jg 0x20401630
mov al, 0x3c
lock cmpxchg byte [0x205a453d], cl
sete r8b
test dl, dl
jne 0x20401630
test r8b, r8b
jne 0x204017da
cmp al, 0xb2
jne 0x20401600
jmp 0x20401896
mov al, 0x3c
lock cmpxchg byte [0x205a453d], cl
mov eax, dword [0x205b86ac]
cmp eax, 0x4e
jge 0x20401600
jmp 0x2040160b
xor r8d, r8d
lea rax, [0x205a3e50]
lea rcx, [0x2049a910]
mov edx, 0x27f7a551
nop dword [rax]
movsxd r8, r8d
movzx r9d, byte [r8 + rcx]
add byte [r8 + rax], r9b
mov r9d, r8d
xor r9d, 1
and r8d, 1
lea r8d, [r9 + r8*2]
mov r9d, dword [0x205a5130]
add r9d, edx
cmp r8d, r9d
jl 0x20401660
mov al, 0xb7
xchg byte [0x205a3e52], al
lea rax, [0x205a3e50]
jmp 0x2040189d
xor r9d, r9d
lea r10, [0x205a3e00]
lea r11, [0x2049a8c0]
lea rax, [fcn.20401470]
lea esi, [rax + rax]
add esi, 0x1680
mov edi, esi
not edi
jmp 0x204016dd
inc r9d
cmp r9d, 0x15
jge 0x20401798
cmp dword [0x205a5130], 0xd8085ab1
movsxd rbx, r9d
jne 0x20401710
nop dword [rax]
movzx eax, byte [rbx + r11]
xor byte [rbx + r10], al
mov eax, dword [0x205b86ac]
cmp eax, 0x39
jl 0x204016d0
nop word cs:[rax + rax]
movzx eax, byte [rbx + r10]
movzx edx, byte [rbx + r11]
sub al, dl
mul dl
mov ecx, eax
sub al, dl
mul dl
mov edx, eax
mov eax, ecx
sub al, dl
mul dl
mov edx, eax
sub cl, al
mov eax, ecx
mul dl
mov r8d, eax
mov ecx, edx
shl r8b, cl
mov eax, r8d
sub al, dl
mul dl
mov ecx, eax
shl r8b, cl
sub r8b, al
mov eax, r8d
mul cl
sub al, cl
mov edx, eax
neg dl
dec al
xor al, dl
and al, cl
xor al, dl
mov byte [rbx + r10], al
test edi, esi
jne 0x20401710
jmp 0x204016f0
xor eax, eax
lea rcx, [0x205a4460]
lea rdx, [0x2049af20]
nop dword [rax + rax]
movzx r8d, byte [rax + rdx]
xor byte [rax + rcx], r8b
lea r8d, [rax + 1]
cmp r8d, 0xb
jg 0x204017b3
inc rax
jmp 0x20401780
movzx eax, byte [0x205a5134]
add al, 0xc7
xchg byte [0x205a3e15], al
lea rax, [0x205a3e00]
jmp 0x2040189d
mov eax, dword [0x205b86ac]
nop dword [rax]
mov eax, dword [0x205b86ac]
cmp eax, 0x37
jg 0x204017c0
mov al, 1
test al, al
je 0x204018be
jmp 0x204018a1
xor ecx, ecx
lea r8, [0x205a4530]
lea r9, [0x2049aff0]
mov r10d, 0x27f7a551
mov r11b, 1
jmp 0x2040180b
inc ecx
cmp ecx, 0xd
jge 0x2040188e
mov eax, dword [0x205b86a8]
lea edx, [rax - 1]
imul edx, eax
movsxd rsi, ecx
test dl, 1
jne 0x20401850
nop
movzx eax, byte [rsi + r9]
add byte [rsi + r8], al
mov edx, dword [0x205b86a8]
lea eax, [rdx - 1]
imul eax, edx
mov edi, dword [0x205a5130]
add edi, r10d
xor edx, edx
div edi
test edx, edx
je 0x20401800
nop word cs:[rax + rax]
movzx eax, byte [rsi + r9]
mov edx, eax
sub dl, byte [rsi + r8]
movzx ebx, byte [0x205a5134]
mov edi, ebx
sub dil, dl
add dil, al
mov eax, ebx
xor al, 0x2b
and bl, 0x2b
add bl, bl
add bl, al
sub bl, dl
add bl, dil
add bl, 0x2b
mov eax, ebx
sub al, dl
add al, bl
mov byte [rsi + r8], al
test r11b, r11b
je 0x20401850
jmp 0x20401820
mov al, 0xb2
xchg byte [0x205a453d], al
lea rax, [0x205a4530]
pop rbx
pop rdi
pop rsi
ret
mov al, 0x28
xchg byte [0x205a446c], al
mov eax, dword [0x205b86ac]
mov ecx, 0x27f7a5a5
add ecx, dword [0x205a5130]
cmp eax, ecx
jl 0x204018cf
movzx eax, byte [0x205a5134]
add al, 0x53
xchg byte [0x205a446c], al
jmp 0x204018a1
lea rax, [0x205a4460]
jmp 0x2040189d