Function at 0x140003580
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rdi
sub rsp, 0x38
test edx, edx
jne 0x140003656
mov rdi, qword [0x140006810]
test rdi, rdi
je 0x14000364a
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400035d1
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x1400035d1
mov eax, edx
add rax, rcx
jne 0x1400035c3
mov dword [rdi + 0x20], 6
jmp 0x1400035d1
xor r8d, r8d
xor edx, edx
call rax
mov rdi, qword [0x140006810]
test rdi, rdi
je 0x14000364a
xor ebx, ebx
mov dword [rdi + 0x20], ebx
cmp dword [rdi + 0x18], ebx
je 0x14000360b
mov rcx, qword [rdi]
test rcx, rcx
je 0x14000360b
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x14000360b
mov eax, edx
add rax, rcx
jne 0x140003604
mov dword [rdi + 0x20], 6
jmp 0x14000360b
xor r8d, r8d
xor edx, edx
call rax
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x140003636
cmp dword [rdi + 0x1c], ebx
je 0x140003636
mov rcx, qword [rdi]
test rcx, rcx
je 0x140003636
xor edx, edx
mov r8d, 0x8000
call qword [rax + 0x20]
mov qword [rdi], rbx
mov qword [rdi + 8], rbx
mov dword [rdi + 0x1c], ebx
mov rcx, qword [rdi + 0x10]
mov rbx, qword [rcx + 0x38]
test rbx, rbx
je 0x14000364a
call rbx
mov rcx, rdi
call rbx
mov eax, 1
add rsp, 0x38
pop rdi
pop rbx
ret
cmp edx, 2
jne 0x1400036a8
mov rdx, qword [0x140006810]
test rdx, rdx
je 0x14000368c
mov rcx, qword [rdx]
test rcx, rcx
je 0x14000368c
movsxd rax, dword [rcx + 0x3c]
mov r8d, dword [rax + rcx + 0x28]
test r8d, r8d
je 0x14000368c
mov eax, r8d
add rax, rcx
jne 0x140003697
mov dword [rdx + 0x20], 6
xor ebx, ebx
mov eax, ebx
add rsp, 0x38
pop rdi
pop rbx
ret
xor r8d, r8d
mov edx, 2
add rsp, 0x38
pop rdi
pop rbx
jmp rax
cmp edx, 3
jne 0x1400036e8
mov rdx, qword [0x140006810]
test rdx, rdx
je 0x14000368c
mov rcx, qword [rdx]
test rcx, rcx
je 0x14000368c
movsxd rax, dword [rcx + 0x3c]
mov r8d, dword [rax + rcx + 0x28]
test r8d, r8d
je 0x14000368c
mov eax, r8d
add rax, rcx
je 0x140003685
xor r8d, r8d
mov edx, 3
add rsp, 0x38
pop rdi
pop rbx
jmp rax
mov eax, 0x7000
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x68], 0x2e00
mov dword [rsp + 0x58], 0x2c00
mov dword [rsp + 0x20], 0x1000
mov qword [rsp + 0x30], rsi
call fcn.140005010
call fcn.1400038f0
mov rax, qword [rsp + 0x28]
lea rcx, [0x140000000]
add rax, rcx
mov qword [rsp + 0x28], rax
mov rbx, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x58]
call fcn.140003940
mov edx, dword [rsp + 0x68]
lea r8, [rbx + 0x10]
mov ecx, dword [rsp + 0x58]
xor ebx, ebx
sub edx, 0x20
mov rdi, rax
mov r9d, ebx
test rdx, rdx
je 0x140003814
cmp rdx, 0x40
jb 0x1400037f2
lea rcx, [rdx - 1]
add rcx, rax
lea rax, [r8 - 1]
add rax, rdx
cmp rdi, rax
ja 0x140003782
cmp rcx, r8
jae 0x1400037f2
mov rcx, rdx
and rcx, 0xffffffffffffffc0
movdqa xmm2, xmmword [0x140001040]
lea rax, [rdi + 0x10]
mov r10, r8
sub r10, rdi
nop dword [rax + rax]
movdqu xmm0, xmmword [r10 + rax - 0x10]
lea rax, [rax + 0x40]
add r9, 0x40
movdqa xmm1, xmm2
xorps xmm0, xmm2
movdqu xmmword [rax - 0x50], xmm0
movdqu xmm0, xmmword [r10 + rax - 0x40]
xorps xmm1, xmm0
movdqu xmm0, xmmword [r10 + rax - 0x30]
movdqu xmmword [rax - 0x40], xmm1
xorps xmm0, xmm2
movdqu xmm1, xmmword [r10 + rax - 0x20]
movdqu xmmword [rax - 0x30], xmm0
xorps xmm1, xmm2
movdqu xmmword [rax - 0x20], xmm1
cmp r9, rcx
jb 0x1400037a0
cmp r9, rdx
jae 0x140003814
sub r8, rdi
lea rcx, [r9 + rdi]
sub rdx, r9
nop dword [rax]
movzx eax, byte [r8 + rcx]
lea rcx, [rcx + 1]
xor al, 0xab
mov byte [rcx - 1], al
sub rdx, 1
jne 0x140003800
mov r8d, dword [rsp + 0x68]
xor edx, edx
mov rcx, qword [rsp + 0x28]
call fcn.140003910
call fcn.1400021d0
mov rbp, rax
test rax, rax
je 0x140003875
mov rax, qword [rax + 0x30]
mov edx, 0x28
mov ecx, pe_nt_image_headers64
call rax
mov rsi, rax
test rax, rax
je 0x140003875
xor r8d, r8d
mov qword [rax + 0x10], rbp
mov rdx, rdi
mov qword [rax + 0x18], rbx
mov rcx, rax
mov dword [rax + 0x20], ebx
call fcn.1400012f0
test eax, eax
jne 0x140003878
mov rdi, qword [rbp + 0x38]
mov rcx, rsi
call rdi
mov rcx, rbp
call rdi
mov rsi, rbx
mov rax, qword [rsi]
mov rbp, qword [rsp + 0x50]
mov qword [0x140006810], rsi
mov qword [section.X123456], rax
mov qword [0x140001008], rbx
test rsi, rsi
je 0x1400038d6
mov rcx, qword [rsi]
test rcx, rcx
je 0x1400038d6
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x1400038d6
mov eax, edx
add rax, rcx
jne 0x1400038ca
mov dword [rsi + 0x20], 6
mov eax, ebx
mov rsi, qword [rsp + 0x30]
add rsp, 0x38
pop rdi
pop rbx
ret
xor r8d, r8d
mov edx, 1
call rax
mov ebx, eax
mov rsi, qword [rsp + 0x30]
mov eax, ebx
add rsp, 0x38
pop rdi
pop rbx
ret