Function at 0x431d90
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*4 - 5]
lea eax, [rax + rax + 0x47]
cdqe
lea r13, [rax - 1]
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.004476b0
mov r11d, 0xfffffc7b
movsx cx, byte [rbx + rdi - 4]
lea rdx, [rbp - 0x32]
sub rsp, rax
movzx ecx, cx
movabs rax, 0x222068003e003e68
mov word [rsp + 0x74], r11w
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
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 dword [rsp + 0x70], 0
mov byte [rsp + 0x76], 0x16
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]
lea ecx, [r8 - 1]
test r8d, r8d
mov byte [r9 + 6], al
lea eax, [rcx + rcx*4]
lea eax, [rax + rax + 0x3e]
mov word [r9 + 4], dx
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 0x431f63
lea rax, [rsi + 0x3e]
add rbx, 5
xor edx, edx
movzx ecx, byte [rbx - 4]
add edx, 1
add rax, 0xa
add rbx, 0xa
mov byte [rax - 0xe], cl
movzx ecx, byte [rbx - 0xd]
mov byte [rax - 0xd], cl
movzx ecx, byte [rbx - 0xc]
mov byte [rax - 0xc], cl
movzx ecx, byte [rbx - 0xb]
mov byte [rax - 0xb], cl
mov ecx, dword [rbx - 0xa]
mov dword [rax - 0xa], ecx
movzx ecx, word [rbx - 6]
mov word [rax - 6], cx
movsx ecx, byte [rsi + 0x39]
cmp ecx, edx
jg 0x431f23
sub ecx, 1
lea r10d, [rcx + rcx*4]
add r10d, r10d
cmp r10d, 0xffffffc3
jl 0x4322f2
lea eax, [r10 + 0x3d]
mov edx, 0xffffffff
lea r11, [rsi + rax + 7]
movzx eax, byte [r9]
mov ecx, 8
xor edx, eax
nop dword [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 0x431f90
add r9, 1
cmp r11, r9
jne 0x431f82
mov eax, edx
movzx edx, dh
lea r8d, [r13 + 1]
add r10d, 0x44
lea r14, [rbp - 0x28]
movsxd r10, r10d
mov byte [rsi + r10], al
movsx eax, byte [rsi + 0x39]
lea eax, [rax + rax*4 - 5]
lea eax, [rax + rax + 0x45]
cdqe
mov byte [rsi + rax], dl
movsx eax, byte [rsi + 0x39]
mov rdx, rsi
lea eax, [rax + rax*4 - 5]
lea eax, [rax + rax + 0x46]
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 0x4322e9
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 0x432206
lea r14, [rbp - 0x28]
mov ebx, 1
jmp 0x43211c
movsxd rcx, dword [rax + 4]
mov r8d, dword [rax + 8]
lea edx, [rcx + 2]
and r8d, 0x7fffffff
cmp edx, r8d
jbe 0x432082
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 0x4321a4
cmp eax, 0xffffffff
je 0x4320c7
lock sub dword [rcx], 1
je 0x4321a0
mov rcx, qword [rbp - 0x18]
mov eax, dword [rcx]
test eax, eax
je 0x4321c3
cmp eax, 0xffffffff
je 0x4320e8
lock sub dword [rcx], 1
mov rcx, qword [rbp - 0x18]
je 0x4321c3
mov rcx, qword [rbp - 0x20]
mov eax, dword [rcx]
test eax, eax
je 0x4321e2
cmp eax, 0xffffffff
je 0x432109
lock sub dword [rcx], 1
mov rcx, qword [rbp - 0x20]
je 0x4321e2
mov rax, qword [rbp - 0x30]
mov edx, ebx
add rbx, 1
cmp edx, dword [rax + 4]
jge 0x432206
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 0x4322e0
mov rax, qword [rbp - 0x10]
mov edx, dword [rax]
cmp edx, 1
jbe 0x432054
mov edx, dword [rax + 4]
add edx, 2
jmp 0x43206b
mov rcx, qword [rbp - 0x10]
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
mov rcx, qword [rbp - 0x18]
mov eax, dword [rcx]
test eax, eax
jne 0x4320d5
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
mov rcx, qword [rbp - 0x20]
mov eax, dword [rcx]
test eax, eax
jne 0x4320f6
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 0x43211c
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 0x43217c
lock add dword [rdx], 1
jmp 0x43201a
mov edx, 0xffffffff
mov eax, edx
jmp 0x431fba