Function at 0x431700
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0x80]
mov rax, qword [0x005270d0]
movzx edi, byte [rdx]
lea r12, [rdx + rdi - 1]
mov qword [rbp - 0x30], rax
mov r15, rcx
mov rbx, rdx
mov qword [rbp - 0x28], rax
movsx eax, byte [r12]
lea eax, [rax + rax*2 - 3]
lea eax, [rax*4 + 0x49]
cdqe
lea r13, [rax - 1]
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.004476b0
movsx cx, byte [rbx + rdi - 4]
lea rdx, [rbp - 0x32]
sub rsp, rax
movzx ecx, cx
movabs rax, 0x2220680040004068
mov byte [rsp + 0x78], 0x16
mov qword [rsp + 0x30], rax
lea r8, [rdx + 1]
movabs rax, 0x140146875090103
mov qword [rsp + 0x38], rax
lea rsi, [rsp + 0x30]
movabs rax, 0x52000007004023a
mov qword [rsp + 0x40], rax
lea r14, [rbp - 0x28]
movabs rax, 0x13202000100
mov qword [rsp + 0x68], rax
movabs rax, 0xfc7b000000000000
mov qword [rsp + 0x70], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x48], 1
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rbp - 0x48], rax
call fcn.0040f1c0
mov edx, dword [r15 + 0x3a0]
lea r9, [rsi + 6]
movsx r8d, byte [r12]
movzx eax, byte [r15 + 0x3a6]
mov dword [rsp + 0x36], edx
movzx edx, word [r15 + 0x3a4]
test r8d, r8d
mov byte [r9 + 6], al
mov word [r9 + 4], dx
lea edx, [r8 - 1]
lea eax, [rdx + rdx*2]
lea eax, [rax*4 + 0x40]
mov word [rsp + 0x31], ax
mov word [rsp + 0x33], ax
movzx eax, byte [rbp - 0x32]
mov byte [rsp + 0x44], al
movzx eax, byte [rbp - 0x31]
mov byte [rsp + 0x45], al
movzx eax, byte [rbx + rdi - 0x22]
mov byte [rsp + 0x48], al
lea rax, [rbx + rdi - 0x21]
mov r11, qword [rax]
mov qword [rsp + 0x49], r11
mov r11, qword [rax + 8]
mov qword [rsi + 0x21], r11
mov r11, qword [rax + 0x10]
mov rax, qword [rax + 0x18]
mov qword [rsi + 0x29], r11
mov qword [rsi + 0x31], rax
mov byte [rsp + 0x69], r8b
jle 0x4318de
lea rax, [rsi + 0x3e]
add rbx, 5
xor ecx, ecx
movzx edx, byte [rbx - 4]
add ecx, 1
add rax, 0xc
add rbx, 0xc
mov byte [rax - 0x10], dl
movzx edx, byte [rbx - 0xf]
mov byte [rax - 0xf], dl
movzx edx, byte [rbx - 0xe]
mov byte [rax - 0xe], dl
movzx edx, byte [rbx - 0xd]
mov byte [rax - 0xd], dl
mov edx, dword [rbx - 0xc]
mov dword [rax - 0xc], edx
movzx edx, word [rbx - 8]
mov word [rax - 8], dx
movzx edx, byte [rbx - 6]
mov byte [rax - 6], dl
movzx edx, byte [rbx - 5]
mov byte [rax - 5], dl
movsx edx, byte [rsi + 0x39]
cmp edx, ecx
jg 0x431890
sub edx, 1
lea r10d, [rdx + rdx*2]
shl r10d, 2
cmp r10d, 0xffffffc1
jl 0x431c77
lea eax, [r10 + 0x3f]
mov edx, 0xffffffff
lea r11, [rsi + rax + 7]
nop
movzx eax, byte [r9]
mov ecx, 8
xor edx, eax
nop dword [rax + rax]
movzx eax, dx
sar eax, 1
mov r8d, eax
xor r8w, 0xa001
and edx, 1
mov edx, r8d
cmove edx, eax
sub ecx, 1
jne 0x431910
add r9, 1
cmp r11, r9
jne 0x431900
mov eax, edx
movzx edx, dh
lea r8d, [r13 + 1]
add r10d, 0x46
lea r14, [rbp - 0x28]
movsxd r10, r10d
mov byte [rsi + r10], al
movsx eax, byte [rsi + 0x39]
lea eax, [rax + rax*2 - 3]
lea eax, [rax*4 + 0x47]
cdqe
mov byte [rsi + rax], dl
movsx eax, byte [rsi + 0x39]
mov rdx, rsi
lea eax, [rax + rax*2 - 3]
lea eax, [rax*4 + 0x48]
cdqe
mov byte [rsi + rax], 0x16
lea rax, [rbp - 0x30]
mov qword [rbp - 0x48], rax
mov rcx, rax
call qword [0x005270e0]
mov rdx, qword [rbp - 0x30]
mov qword [rbp - 0x10], rdx
mov eax, dword [rdx]
add eax, 1
cmp eax, 1
ja 0x431c6e
lea rdi, [rbp - 0x10]
mov rcx, r15
mov rdx, rdi
call fcn.0042c940
lea r14, [rbp - 0x28]
mov rcx, rdi
call fcn.00453540
mov rax, qword [rbp - 0x30]
mov r10d, dword [rax + 4]
test r10d, r10d
jle 0x431b92
lea r14, [rbp - 0x28]
mov ebx, 1
jmp 0x431aa8
movsxd rcx, dword [rax + 4]
mov r8d, dword [rax + 8]
lea edx, [rcx + 2]
and r8d, 0x7fffffff
cmp edx, r8d
jbe 0x431a0e
mov r8d, 1
mov rcx, rdi
call qword [0x00527248]
mov rax, qword [rbp - 0x10]
movsxd rcx, dword [rax + 4]
lea edx, [rcx + 1]
mov dword [rax + 4], edx
add rax, qword [rax + 0x10]
mov edx, 0x20
lea rax, [rax + rcx*2]
xor ecx, ecx
mov word [rax], dx
mov rdx, rdi
mov word [rax + 2], cx
mov rcx, r14
call qword [0x00527298]
mov rcx, qword [rbp - 0x10]
mov eax, dword [rcx]
test eax, eax
je 0x431b30
cmp eax, 0xffffffff
je 0x431a53
lock sub dword [rcx], 1
je 0x431b22
mov rcx, qword [rbp - 0x18]
mov eax, dword [rcx]
test eax, eax
je 0x431b4f
cmp eax, 0xffffffff
je 0x431a74
lock sub dword [rcx], 1
mov rcx, qword [rbp - 0x18]
je 0x431b4f
mov rcx, qword [rbp - 0x20]
mov eax, dword [rcx]
test eax, eax
je 0x431b6e
cmp eax, 0xffffffff
je 0x431a95
lock sub dword [rcx], 1
mov rcx, qword [rbp - 0x20]
je 0x431b6e
mov rax, qword [rbp - 0x30]
mov edx, ebx
add rbx, 1
cmp edx, dword [rax + 4]
jge 0x431b92
lea rcx, [0x004a0d91]
mov edx, 2
call qword [0x00527278]
mov r9d, 0x30
movzx r8d, byte [rsi + rbx - 1]
mov qword [rbp - 0x20], rax
lea r12, [rbp - 0x18]
mov word [rsp + 0x28], r9w
mov r9d, 2
lea r13, [rbp - 0x20]
mov dword [rsp + 0x20], 0x10
mov rcx, r12
mov rdx, r13
call qword [0x005273a8]
mov rdx, qword [rbp - 0x18]
mov qword [rbp - 0x10], rdx
mov eax, dword [rdx]
add eax, 1
cmp eax, 1
ja 0x431c65
mov rax, qword [rbp - 0x10]
mov edx, dword [rax]
cmp edx, 1
jbe 0x4319e0
mov edx, dword [rax + 4]
add edx, 2
jmp 0x4319f7
mov rcx, qword [rbp - 0x10]
nop word cs:[rax + rax]
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
mov rcx, qword [rbp - 0x18]
mov eax, dword [rcx]
test eax, eax
jne 0x431a61
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
mov rcx, qword [rbp - 0x20]
mov eax, dword [rcx]
test eax, eax
jne 0x431a82
mov edx, 2
mov r8d, 8
call qword [0x005270c8]
mov rax, qword [rbp - 0x30]
mov edx, ebx
add rbx, 1
cmp edx, dword [rax + 4]
jl 0x431aa8
mov rax, qword [r15 + 0x40]
mov edx, 7
mov rcx, rdi
mov rbx, qword [rax + 0x108]
call qword [0x00527478]
mov rdx, rdi
mov rcx, rbx
mov rbx, qword [0x00527c08]
call rbx
mov rcx, r15
call fcn.0042cc80
mov rax, qword [r15 + 0x40]
lea r12, [rbp - 0x18]
mov r8d, 0xd
lea rdx, [0x004a0d94]
mov rcx, r12
mov rsi, qword [rax + 0x108]
call qword [0x00527268]
mov rdx, r14
mov rcx, r12
call qword [0x00527298]
lea r8, [0x004a0da2]
mov rdx, r12
mov rcx, rdi
call fcn.00491630
mov rdx, rdi
mov rcx, rsi
call qword [0x00527c30]
mov rcx, rdi
call fcn.00491270
mov rcx, r12
call fcn.00491270
mov rax, qword [r15 + 0x40]
mov edx, 0x386487
mov rcx, rdi
mov rsi, qword [rax + 0x108]
call qword [0x00527480]
mov rdx, rdi
mov rcx, rsi
call rbx
mov rcx, r14
call fcn.00491270
mov rcx, qword [rbp - 0x48]
call fcn.00453540
nop
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lock add dword [rdx], 1
jmp 0x431b08
lock add dword [rdx], 1
jmp 0x4319a0
mov edx, 0xffffffff
mov eax, edx
jmp 0x43193a