Function at 0x140004920
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x10]
sub rsp, 0x110
test edx, edx
jne 0x140004a03
mov rbx, qword [0x140007dc8]
test rbx, rbx
je 0x1400049f3
mov rcx, qword [rbx]
test rcx, rcx
je 0x14000497a
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x14000497a
mov eax, edx
add rax, rcx
jne 0x14000496c
mov dword [rbx + 0x20], 6
jmp 0x14000497a
xor r8d, r8d
xor edx, edx
call rax
mov rbx, qword [0x140007dc8]
test rbx, rbx
je 0x1400049f3
xor edi, edi
mov dword [rbx + 0x20], edi
cmp dword [rbx + 0x18], edi
je 0x1400049b4
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400049b4
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x1400049b4
mov eax, edx
add rax, rcx
jne 0x1400049ad
mov dword [rbx + 0x20], 6
jmp 0x1400049b4
xor r8d, r8d
xor edx, edx
call rax
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x1400049df
cmp dword [rbx + 0x1c], edi
je 0x1400049df
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400049df
xor edx, edx
mov r8d, 0x8000
call qword [rax + 0x20]
mov qword [rbx], rdi
mov qword [rbx + 8], rdi
mov dword [rbx + 0x1c], edi
mov rcx, qword [rbx + 0x10]
mov rdi, qword [rcx + 0x38]
test rdi, rdi
je 0x1400049f3
call rdi
mov rcx, rbx
call rdi
mov eax, 1
add rsp, 0x110
pop rdi
pop rbx
pop rbp
ret
cmp edx, 2
jne 0x140004a5d
mov rdx, qword [0x140007dc8]
test rdx, rdx
je 0x140004a39
mov rcx, qword [rdx]
test rcx, rcx
je 0x140004a39
movsxd rax, dword [rcx + 0x3c]
mov r8d, dword [rax + rcx + 0x28]
test r8d, r8d
je 0x140004a39
mov eax, r8d
add rax, rcx
jne 0x140004a48
mov dword [rdx + 0x20], 6
xor edi, edi
mov eax, edi
add rsp, 0x110
pop rdi
pop rbx
pop rbp
ret
xor r8d, r8d
mov edx, 2
add rsp, 0x110
pop rdi
pop rbx
pop rbp
jmp rax
cmp edx, 3
jne 0x140004aa1
mov rdx, qword [0x140007dc8]
test rdx, rdx
je 0x140004a39
mov rcx, qword [rdx]
test rcx, rcx
je 0x140004a39
movsxd rax, dword [rcx + 0x3c]
mov r8d, dword [rax + rcx + 0x28]
test r8d, r8d
je 0x140004a39
mov eax, r8d
add rax, rcx
je 0x140004a32
xor r8d, r8d
mov edx, 3
add rsp, 0x110
pop rdi
pop rbx
pop rbp
jmp rax
mov eax, 0x8000
mov qword [rsp + 0x130], rsi
mov qword [rsp + 0x40], rax
mov dword [rbp + 0x38], 0x2e00
mov dword [rbp + 0x48], 0x2c00
mov dword [rsp + 0x48], 0x1000
mov qword [rsp + 0x140], r14
call fcn.1400064b0
call fcn.140004d90
mov rax, qword [rsp + 0x40]
lea rcx, [0x140000000]
add rax, rcx
mov dword [rsp + 0x20], 0xefb823d6
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x24], 0xc3ce2662
mov dword [rsp + 0x28], 0x12554ce2
mov dword [rsp + 0x2c], 0xe773e87d
mov dword [rsp + 0x30], 0x6b779c83
mov dword [rsp + 0x34], 0x573ba9b1
mov dword [rsp + 0x38], 0xeadb5fb2
mov dword [rsp + 0x3c], 0xa28eb60d
call fcn.140001300
mov r14, qword [rsp + 0x40]
mov esi, dword [rbp + 0x38]
mov rbx, r14
mov dword [rbp], 0x2d314218
mov dword [rbp + 4], 0xb6daeffc
mov dword [rbp + 8], 0xdf149b9
mov dword [rbp + 0xc], 0xbd7e7e03
test rsi, rsi
je 0x140004bbd
lea rdi, [rbp]
sub rdi, r14
dec rsi
shr rsi, 4
inc rsi
nop dword [rax + rax]
movups xmm0, xmmword [rbx]
lea rdx, [rsp + 0x50]
mov rcx, rbx
call fcn.140001f00
mov ecx, 0x10
nop word [rax + rax]
movzx eax, byte [rdi + rbx]
xor byte [rbx], al
inc rbx
sub rcx, 1
jne 0x140004ba0
sub rdi, 0x10
movups xmmword [rbp], xmm0
sub rsi, 1
jne 0x140004b80
mov ecx, dword [rbp + 0x48]
call fcn.140004de0
mov edx, dword [rbp + 0x38]
lea r8, [r14 + 0x10]
mov ecx, dword [rbp + 0x48]
xor edi, edi
sub edx, 0x20
mov rbx, rax
mov r9d, edi
test rdx, rdx
je 0x140004cb6
cmp rdx, 0x40
jb 0x140004c8d
lea rcx, [rdx - 1]
add rcx, rax
lea rax, [r8 - 1]
add rax, rdx
cmp rbx, rax
ja 0x140004c09
cmp rcx, r8
jae 0x140004c8d
mov rcx, rdx
and rcx, 0xffffffffffffffc0
movdqa xmm2, xmmword [0x140001240]
lea rax, [rbx + 0x10]
movdqa xmm3, xmmword [0x140001260]
mov r10, r8
sub r10, rbx
nop word [rax + rax]
movdqu xmm0, xmmword [rax + r10 - 0x10]
add r9, 0x40
movdqu xmm1, xmmword [rax + r10]
lea rax, [rax + 0x40]
psubb xmm0, xmm2
psubb xmm1, xmm2
xorps xmm0, xmm3
xorps xmm1, xmm3
movdqu xmmword [rax - 0x50], xmm0
movdqu xmm0, xmmword [rax + r10 - 0x30]
movdqu xmmword [rax - 0x40], xmm1
psubb xmm0, xmm2
xorps xmm0, xmm3
movdqu xmm1, xmmword [rax + r10 - 0x20]
movdqu xmmword [rax - 0x30], xmm0
psubb xmm1, xmm2
xorps xmm1, xmm3
movdqu xmmword [rax - 0x20], xmm1
cmp r9, rcx
jb 0x140004c30
cmp r9, rdx
jae 0x140004cb6
sub r8, rbx
lea rcx, [r9 + rbx]
sub rdx, r9
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
lea rcx, [rcx + 1]
sub al, 2
xor al, 0xab
mov byte [rcx - 1], al
sub rdx, 1
jne 0x140004ca0
mov r8d, dword [rbp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x40]
call fcn.140004db0
call fcn.140003630
mov r14, rax
test rax, rax
je 0x140004d16
mov rax, qword [rax + 0x30]
mov edx, 0x28
mov ecx, pe_nt_image_headers64
call rax
mov rsi, rax
test rax, rax
je 0x140004d16
xor r8d, r8d
mov qword [rax + 0x10], r14
mov rdx, rbx
mov qword [rax + 0x18], rdi
mov rcx, rax
mov dword [rax + 0x20], edi
call fcn.140002750
test eax, eax
jne 0x140004d19
mov rbx, qword [r14 + 0x38]
mov rcx, rsi
call rbx
mov rcx, r14
call rbx
mov rsi, rdi
mov rax, qword [rsi]
mov r14, qword [rsp + 0x140]
mov qword [0x140007dc8], rsi
mov qword [section.X123456], rax
mov qword [0x140001008], rdi
test rsi, rsi
je 0x140004d6e
mov rcx, qword [rsi]
test rcx, rcx
je 0x140004d6e
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x140004d6e
mov eax, edx
add rax, rcx
jne 0x140004d62
mov dword [rsi + 0x20], 6
jmp 0x140004d6e
xor r8d, r8d
mov edx, 1
call rax
mov edi, eax
mov rsi, qword [rsp + 0x130]
mov eax, edi
add rsp, 0x110
pop rdi
pop rbx
pop rbp
ret