Function at 0x140003410
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rdi
sub rsp, 0x38
test edx, edx
jne 0x1400034e6
mov rbx, qword [0x1400065e8]
test rbx, rbx
je 0x1400034da
mov rcx, qword [rbx]
test rcx, rcx
je 0x140003461
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x140003461
mov eax, edx
add rax, rcx
jne 0x140003453
mov dword [rbx + 0x20], 6
jmp 0x140003461
xor r8d, r8d
xor edx, edx
call rax
mov rbx, qword [0x1400065e8]
test rbx, rbx
je 0x1400034da
xor edi, edi
mov dword [rbx + 0x20], edi
cmp dword [rbx + 0x18], edi
je 0x14000349b
mov rcx, qword [rbx]
test rcx, rcx
je 0x14000349b
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x14000349b
mov eax, edx
add rax, rcx
jne 0x140003494
mov dword [rbx + 0x20], 6
jmp 0x14000349b
xor r8d, r8d
xor edx, edx
call rax
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x1400034c6
cmp dword [rbx + 0x1c], edi
je 0x1400034c6
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400034c6
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 0x1400034da
call rdi
mov rcx, rbx
call rdi
mov eax, 1
add rsp, 0x38
pop rdi
pop rbx
ret
cmp edx, 2
jne 0x140003538
mov rdx, qword [0x1400065e8]
test rdx, rdx
je 0x14000351c
mov rcx, qword [rdx]
test rcx, rcx
je 0x14000351c
movsxd rax, dword [rcx + 0x3c]
mov r8d, dword [rax + rcx + 0x28]
test r8d, r8d
je 0x14000351c
mov eax, r8d
add rax, rcx
jne 0x140003527
mov dword [rdx + 0x20], 6
xor edi, edi
mov eax, edi
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 0x140003578
mov rdx, qword [0x1400065e8]
test rdx, rdx
je 0x14000351c
mov rcx, qword [rdx]
test rcx, rcx
je 0x14000351c
movsxd rax, dword [rcx + 0x3c]
mov r8d, dword [rax + rcx + 0x28]
test r8d, r8d
je 0x14000351c
mov eax, r8d
add rax, rcx
je 0x140003515
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 qword [rsp + 0x60], rsi
mov dword [rsp + 0x20], 0x1000
mov qword [rsp + 0x30], r14
call fcn.140004e30
call fcn.140003710
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.140003760
mov r10d, dword [rsp + 0x68]
add rbx, 0x10
mov ecx, dword [rsp + 0x58]
sub r10d, 0x20
mov r14, rax
test r10, r10
je 0x14000362d
mov r9, rax
mov r8, rbx
sub r9, rbx
neg r8
nop word [rax + rax]
movzx ecx, byte [rbx]
lea edx, [rbx + r8]
movzx eax, cl
lea rbx, [rbx + 1]
xor al, 0xab
sub cl, 2
test dl, 1
movzx eax, al
movzx ecx, cl
cmovne ecx, eax
lea rax, [r8 + rbx]
mov byte [rbx + r9 - 1], cl
cmp rax, r10
jb 0x140003600
mov r8d, dword [rsp + 0x68]
xor edx, edx
mov rcx, qword [rsp + 0x28]
call fcn.140003730
call fcn.1400021c0
mov rbp, rax
test rax, rax
jne 0x14000364f
xor edi, edi
jmp 0x140003694
mov rax, qword [rax + 0x30]
mov edx, 0x28
mov ecx, pe_nt_image_headers64
call rax
xor edi, edi
mov rsi, rax
test rax, rax
je 0x140003694
xor r8d, r8d
mov qword [rax + 0x10], rbp
mov rdx, r14
mov qword [rax + 0x18], rdi
mov rcx, rax
mov dword [rax + 0x20], edi
call fcn.1400012e0
test eax, eax
jne 0x140003697
mov rbx, qword [rbp + 0x38]
mov rcx, rsi
call rbx
mov rcx, rbp
call rbx
mov rsi, rdi
mov rax, qword [rsi]
mov r14, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x50]
mov qword [0x1400065e8], rsi
mov qword [section.MAIN], rax
mov qword [0x140001008], rdi
test rsi, rsi
je 0x1400036fa
mov rcx, qword [rsi]
test rcx, rcx
je 0x1400036fa
movsxd rax, dword [rcx + 0x3c]
mov edx, dword [rax + rcx + 0x28]
test edx, edx
je 0x1400036fa
mov eax, edx
add rax, rcx
jne 0x1400036ee
mov dword [rsi + 0x20], 6
mov eax, edi
mov rsi, qword [rsp + 0x60]
add rsp, 0x38
pop rdi
pop rbx
ret
xor r8d, r8d
mov edx, 1
call rax
mov edi, eax
mov rsi, qword [rsp + 0x60]
mov eax, edi
add rsp, 0x38
pop rdi
pop rbx
ret