Function at 0x180038c30
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rax - 0x70], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov r13, rdx
mov rsi, rcx
mov rdi, rdx
shr rdi, 2
lea r12, [rdi + 6]
add rdx, 0x20
lea rcx, [rax - 0x50]
call fcn.180037c40
nop
lea rdx, [r13 + 0x20]
lea rcx, [rsp + 0x40]
call fcn.180037c40
nop
lea rax, [rdi - 4]
test rax, 0xfffffffffffffff9
jne 0x180039115
cmp rdi, 0xa
je 0x180039115
call fcn.180037e00
mov r15, rax
mov qword [rsp + 0x30], rax
xor ebx, ebx
mov dword [rsp + 0x20], ebx
cmp qword [0x180299d70], rbx
jne 0x180038cc3
call fcn.180048ce0
mov r8, qword [0x18028f938]
mov rcx, rbx
mov rdx, r8
shr rdx, 2
mov eax, dword [r15 + rcx*4]
or dword [rsp + 0x20], eax
add rcx, rdx
cmp rcx, 0x100
jb 0x180038cd4
mov rcx, rbx
lea r9, [0x180000000]
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx + r9 + 0x1e6c80]
or dword [rsp + 0x20], eax
add rcx, r8
cmp rcx, 0x100
jb 0x180038d00
mov eax, dword [r15 + 0x18c]
and dword [rsp + 0x20], eax
test rdi, rdi
je 0x180038d57
mov rdx, qword [rsp + 0x58]
sub rsi, rdx
mov r8, rdi
nop dword [rax]
nop dword [rax + rax]
mov ecx, dword [rsi + rdx]
bswap ecx
mov eax, dword [rsp + 0x20]
xor eax, ecx
mov dword [rdx], eax
lea rdx, [rdx + 4]
sub r8, 1
jne 0x180038d40
mov r10, rdi
lea rbp, [r12*4 + 4]
mov rsi, qword [rsp + 0x58]
cmp rdi, rbp
jae 0x180038ee3
lea r14, [rdi*4]
lea r11, [rsi - 4]
add r11, r14
mov r13d, 4
sub r13, r14
mov r9, rdi
neg r9
mov qword [rsp + 0x28], r9
lea r15, [0x180000000]
nop word [rax + rax]
mov edx, dword [r11]
rol edx, 8
mov eax, edx
shr eax, 0x18
movzx ecx, al
movzx r8d, byte [rcx + r15 + 0x1e6c80]
shl r8d, 8
mov eax, edx
shr eax, 0x10
movzx ecx, al
movzx eax, byte [rcx + r15 + 0x1e6c80]
or r8d, eax
shl r8d, 8
mov eax, edx
shr eax, 8
movzx ecx, al
movzx eax, byte [rcx + r15 + 0x1e6c80]
or r8d, eax
shl r8d, 8
movzx eax, dl
movzx eax, byte [rax + r15 + 0x1e6c80]
or r8d, eax
lea rax, [r9 + r10]
xor edx, edx
div rdi
xor r8d, dword [r15 + rax*4 + 0x1e6f90]
xor r8d, dword [r11 + r13]
mov dword [r11 + 4], r8d
mov eax, 1
cmp rdi, rax
je 0x180038ec0
lea rcx, [rax + r10]
lea rdx, [rsi + rcx*4]
mov rcx, rax
sub rcx, rdi
add rcx, r10
mov r8d, dword [rsi + rcx*4]
mov dword [rdx], r8d
cmp rdi, 8
jne 0x180038ea7
cmp rax, 4
jne 0x180038ea7
mov r9d, dword [r11 + 0x10]
mov ecx, r9d
shr ecx, 0x18
movzx edx, cl
movzx r8d, byte [rdx + r15 + 0x1e6c80]
shl r8d, 8
mov ecx, r9d
shr ecx, 0x10
movzx edx, cl
movzx ecx, byte [rdx + r15 + 0x1e6c80]
or r8d, ecx
shl r8d, 8
mov ecx, r9d
shr ecx, 8
movzx edx, cl
movzx ecx, byte [rdx + r15 + 0x1e6c80]
or r8d, ecx
shl r8d, 8
movzx ecx, r9b
movzx ecx, byte [rcx + r15 + 0x1e6c80]
or r8d, ecx
xor dword [r11 + 0x14], r8d
jmp 0x180038eaf
mov ecx, dword [rdx - 4]
xor ecx, r8d
mov dword [rdx], ecx
inc rax
cmp rax, rdi
jne 0x180038e21
mov r9, qword [rsp + 0x28]
add r10, rdi
add r11, r14
cmp r10, rbp
jb 0x180038da0
mov r15, qword [rsp + 0x30]
mov r13, qword [rsp + 0xb8]
lea r9, [0x180000000]
mov r8, rbx
mov rdi, qword [rsp + 0x40]
test rbp, rbp
je 0x180038f29
lea rcx, [rdi + 8]
mov rax, r12
shl rax, 4
lea rdx, [rsi + 8]
add rdx, rax
mov eax, dword [rdx - 8]
mov dword [rcx - 8], eax
mov eax, dword [rdx - 4]
mov dword [rcx - 4], eax
mov eax, dword [rdx]
mov dword [rcx], eax
mov eax, dword [rdx + 4]
mov dword [rcx + 4], eax
add r8, 4
lea rcx, [rcx + 0x10]
lea rdx, [rdx - 0x10]
cmp r8, rbp
jne 0x180038f02
mov r10d, 4
cmp r13, 0xffffffffffffffec
je 0x180039004
lea r11, [r13 + 0x18]
nop dword [rax]
mov edx, dword [rdi + r10*4]
mov eax, edx
shr eax, 0x18
movzx ecx, al
movzx r8d, byte [rcx + r9 + 0x1e6c80]
shl r8d, 8
mov eax, edx
shr eax, 0x10
movzx ecx, al
movzx eax, byte [rcx + r9 + 0x1e6c80]
or r8d, eax
shl r8d, 8
mov eax, edx
shr eax, 8
movzx ecx, al
movzx eax, byte [rcx + r9 + 0x1e6c80]
or r8d, eax
shl r8d, 8
movzx eax, dl
movzx eax, byte [rax + r9 + 0x1e6c80]
or r8d, eax
mov r9d, dword [rsp + 0x20]
xor r9d, r8d
mov dword [rdi + r10*4], r9d
mov eax, r9d
shr eax, 0x10
movzx eax, al
mov edx, dword [r15 + rax*4]
mov eax, r9d
shr eax, 8
movzx eax, al
mov ecx, dword [r15 + rax*4]
movzx eax, r9b
mov r8d, dword [r15 + rax*4]
rol r8d, 8
rol ecx, 0x10
xor r8d, ecx
ror edx, 8
xor r8d, edx
shr r9d, 0x18
movzx eax, r9b
xor r8d, dword [r15 + rax*4]
mov dword [rdi + r10*4], r8d
inc r10
mov rdi, qword [rsp + 0x40]
cmp r10, r11
je 0x180038fff
lea r9, [0x180000000]
jmp 0x180038f40
mov rsi, qword [rsp + 0x58]
mov edx, 0x10
mov r14, qword [rsp + 0xd0]
mov rcx, r14
call fcn.180036440
mov edx, 0x10
mov r15, qword [rsp + 0xd8]
mov rcx, r15
call fcn.180036440
add r12, r12
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [r14]
lea rdx, [rsi + rbx]
mov eax, dword [rdx + r12*8]
bswap eax
mov dword [rcx + rbx], eax
mov rcx, qword [r15]
mov eax, dword [rdx]
bswap eax
mov dword [rcx + rbx], eax
add rbx, 4
cmp rbx, 0x10
jne 0x180039040
lea rdx, [r13 + 0x18]
mov r14, qword [rsp + 0xc0]
mov rcx, r14
call fcn.180039a60
lea rdx, [r13 + 0x18]
mov rbx, qword [rsp + 0xc8]
mov rcx, rbx
call fcn.180039a60
mov rcx, qword [r14]
mov r8, qword [r14 + 8]
sub r8, rcx
sar r8, 2
test r8, r8
je 0x1800390af
lea r8, [r8*4]
mov rdx, rsi
call fcn.1801a4560
mov rcx, qword [rbx]
mov r8, qword [rbx + 8]
sub r8, rcx
sar r8, 2
test r8, r8
je 0x1800390d3
lea r8, [r8*4]
mov rdx, rdi
call fcn.1801a4560
nop
test rdi, rdi
je 0x1800390f3
mov rdx, qword [rsp + 0x50]
sub rdx, rdi
sar rdx, 2
mov r8d, 4
mov rcx, rdi
call fcn.180033660
nop
test rsi, rsi
je 0x180039113
mov rdx, qword [rsp + 0x68]
sub rdx, rsi
sar rdx, 2
mov r8d, 4
mov rcx, rsi
call fcn.180033660
nop
jmp 0x180039130
lea r8, str.gold
lea rdx, [0x1801e6fb8]
lea rcx, str.Invalid_AES_key_size
call fcn.180044fb0
nop
mov rbx, qword [rsp + 0xb0]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret