Function at 0x438b40
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x80]
mov rax, qword [0x005270d0]
mov r15, rcx
movzx ecx, byte [rdx]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
lea r11d, [rcx + rcx + 0x1c]
mov r8d, ecx
movsxd rax, r11d
lea r10, [rax - 1]
add rax, 0xf
and eax, 0x7f0
call fcn.004476b0
mov esi, 0x1000
mov r9d, dword [r15 + 0x3a0]
lea ecx, [rcx + rcx + 0x13]
sub rsp, rax
test r8b, r8b
movabs rax, 0x700a023a014014
mov dword [rsp + 0x36], r9d
movzx r9d, word [r15 + 0x3a4]
mov qword [rsp + 0x3d], rax
movzx eax, byte [r15 + 0x3a6]
lea rbx, [rsp + 0x30]
mov byte [rsp + 0x30], 0x68
mov byte [rsp + 0x35], 0x68
mov word [rsp + 0x45], si
mov byte [rsp + 0x47], 5
mov dword [rsp + 0x49], 0x56560001
mov byte [rsp + 0x4d], 0x16
mov word [rsp + 0x3a], r9w
mov byte [rsp + 0x3c], al
mov word [rsp + 0x31], cx
mov word [rsp + 0x33], cx
mov byte [rsp + 0x48], r8b
jle 0x438c2f
mov eax, 1
nop word [rax + rax]
movzx r8d, byte [rdx + rax]
mov byte [rbx + rax + 0x19], 0
mov ecx, eax
mov byte [rbx + rax + 0x18], r8b
movsx r8d, byte [rbx + 0x18]
add rax, 1
cmp r8d, ecx
jg 0x438c10
lea eax, [r11 - 0xa]
mov edx, 0xffffffff
lea r9, [rbx + 6]
lea rsi, [rbx + 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 0x438c50
add r9, 1
cmp r9, rsi
jne 0x438c41
lea eax, [r11 - 3]
lea r8d, [r10 + 1]
cdqe
mov byte [rbx + rax], dl
lea eax, [r11 - 2]
shr dx, 8
sub r11d, 1
lea r14, [rbp - 0x38]
cdqe
movsxd r11, r11d
mov byte [rbx + rax], dl
lea rax, [rbp - 0x40]
mov rdx, rbx
mov byte [rbx + r11], 0x16
mov rcx, rax
mov qword [rbp - 0x48], rax
call qword [0x005270e0]
mov rdx, qword [rbp - 0x40]
mov qword [rbp - 0x20], rdx
mov eax, dword [rdx]
add eax, 1
cmp eax, 1
ja 0x439003
lea rdi, [rbp - 0x20]
mov rcx, r15
mov rdx, rdi
call fcn.0042c940
mov rcx, qword [rbp - 0x20]
mov eax, dword [rcx]
test eax, eax
je 0x438fd0
cmp eax, 0xffffffff
je 0x438cf5
lock sub dword [rcx], 1
je 0x438fc9
mov rax, qword [rbp - 0x40]
lea r14, [rbp - 0x38]
mov r10d, dword [rax + 4]
test r10d, r10d
jle 0x438eb3
lea r14, [rbp - 0x38]
mov esi, 1
jmp 0x438dec
movsxd rcx, dword [rax + 4]
mov r8d, dword [rax + 8]
lea edx, [rcx + 2]
and r8d, 0x7fffffff
cmp edx, r8d
jbe 0x438d4e
mov r8d, 1
mov rcx, rdi
call qword [0x00527248]
mov rax, qword [rbp - 0x20]
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 - 0x20]
mov eax, dword [rcx]
test eax, eax
je 0x438fa0
cmp eax, 0xffffffff
je 0x438d97
lock sub dword [rcx], 1
mov rcx, qword [rbp - 0x20]
je 0x438fa0
mov rcx, qword [rbp - 0x28]
mov eax, dword [rcx]
test eax, eax
je 0x438e70
cmp eax, 0xffffffff
je 0x438db8
lock sub dword [rcx], 1
mov rcx, qword [rbp - 0x28]
je 0x438e70
mov rcx, qword [rbp - 0x30]
mov eax, dword [rcx]
test eax, eax
je 0x438e8f
cmp eax, 0xffffffff
je 0x438dd9
lock sub dword [rcx], 1
mov rcx, qword [rbp - 0x30]
je 0x438e8f
mov rax, qword [rbp - 0x40]
mov edx, esi
add rsi, 1
cmp edx, dword [rax + 4]
jge 0x438eb3
lea rcx, [0x004a0d91]
mov edx, 2
call qword [0x00527278]
mov r9d, 0x30
movzx r8d, byte [rbx + rsi - 1]
mov qword [rbp - 0x30], rax
lea r12, [rbp - 0x28]
mov word [rsp + 0x28], r9w
mov r9d, 2
lea r13, [rbp - 0x30]
mov dword [rsp + 0x20], 0x10
mov rcx, r12
mov rdx, r13
call qword [0x005273a8]
mov rdx, qword [rbp - 0x28]
mov qword [rbp - 0x20], rdx
mov eax, dword [rdx]
add eax, 1
cmp eax, 1
ja 0x438fc0
mov rax, qword [rbp - 0x20]
mov edx, dword [rax]
cmp edx, 1
jbe 0x438d20
mov edx, dword [rax + 4]
add edx, 2
jmp 0x438d37
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
mov rcx, qword [rbp - 0x30]
mov eax, dword [rcx]
test eax, eax
jne 0x438dc6
mov edx, 2
mov r8d, 8
call qword [0x005270c8]
mov rax, qword [rbp - 0x40]
mov edx, esi
add rsi, 1
cmp edx, dword [rax + 4]
jl 0x438dec
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 - 0x28]
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 - 0x40]
mov eax, dword [rcx]
test eax, eax
je 0x438ff0
cmp eax, 0xffffffff
je 0x438f88
lock sub dword [rcx], 1
mov rcx, qword [rbp - 0x40]
je 0x438ff0
lea rsp, [rbp - 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
jmp 0x438d97
lock add dword [rdx], 1
jmp 0x438e4c
mov rcx, qword [rbp - 0x20]
nop dword [rax]
mov r8d, 8
mov edx, 1
call qword [0x005270c8]
jmp 0x438cf5
mov r8d, 8
mov edx, 1
call qword [0x005270c8]
jmp 0x438f88
lock add dword [rdx], 1
jmp 0x438cc9