Function at 0x1400046f0
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov r14, rdx
mov rsi, rcx
mov rbp, qword [0x14003da78]
mov rax, qword [rbp]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rcx, rdx
call sub.api_ms_win_crt_stdio_l1_1_0.dll__fileno
lea rdx, [rsp + 0x28]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__fstat64]
cmp eax, 0xffffffff
je 0x140004737
test eax, eax
je 0x140004796
movzx eax, byte [0x14005b818]
test al, al
je 0x140004946
mov rsi, qword [rsi + 0x28]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov r9d, dword [rax]
lea rcx, [0x14005c900]
lea rdx, str.LoadSourceFile:_unable_to_stat_destination_file:__S__err:__d
mov r8, rsi
call fcn.140016400
mov edi, 6
mov rax, qword [rsp + 0x60]
xor rax, rsp
mov rcx, qword [rbp]
cmp rcx, rax
jne 0x140004941
mov eax, edi
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r15, qword [rsp + 0x40]
cmp dword [rsi + 0x3c], r15d
jne 0x14000482e
mov r12d, r15d
mov rcx, r12
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [rsi + 0x58], rax
test rax, rax
je 0x140004861
xor edi, edi
mov ebx, 0
test r15d, r15d
je 0x140004905
mov r13, rax
movabs r15, 0x7fffffffffffffff
nop word [rax + rax]
cmp r12, r15
mov rbx, r15
cmovb rbx, r12
mov edx, 1
mov rcx, r13
mov r8, rbx
mov r9, r14
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
cmp rax, rbx
jne 0x14000486b
add r13, rbx
sub r12, rbx
jne 0x1400047e0
mov ecx, dword [rsi + 0x3c]
mov ebx, 0
test rcx, rcx
je 0x140004905
mov rax, qword [rsi + 0x58]
cmp ecx, 1
jne 0x140004896
mov ebx, 0xffffffff
jmp 0x1400048e5
movzx eax, byte [0x14005b818]
test al, al
je 0x140004990
mov r9d, dword [rsi + 0x3c]
lea rcx, [0x14005c900]
lea rdx, str.LoadSourceFile:_destination_file_size__d_does_not_match_expected_size__d
mov r8d, r15d
call fcn.140016400
mov edi, 2
jmp 0x14000476e
mov edi, 0xd
jmp 0x14000476e
movzx eax, byte [0x14005b818]
test al, al
je 0x140004a24
mov r8, qword [rsi + 0x28]
lea rcx, [0x14005c900]
lea rdx, str.LoadSourceFile:_error_reading_destination_file:__S
call fcn.140016400
jmp 0x140004769
mov edx, ecx
and edx, 0xfffffffe
mov ebx, 0xffffffff
lea r8, [0x14005b060]
nop word [rax + rax]
mov r9d, ebx
shl r9d, 8
shr ebx, 0x18
movzx r10d, byte [rax]
xor r10d, ebx
xor r9d, dword [r8 + r10*4]
mov ebx, r9d
shl ebx, 8
shr r9d, 0x18
movzx r10d, byte [rax + 1]
xor r10d, r9d
xor ebx, dword [r8 + r10*4]
add rax, 2
add rdx, 0xfffffffffffffffe
jne 0x1400048b0
test cl, 1
je 0x140004903
mov ecx, ebx
shl ecx, 8
shr ebx, 0x18
movzx eax, byte [rax]
xor eax, ebx
lea rdx, [0x14005b060]
xor ecx, dword [rdx + rax*4]
mov ebx, ecx
not ebx
cmp ebx, dword [rsi + 0x40]
je 0x14000476e
movzx eax, byte [0x14005b818]
test al, al
je 0x1400049da
mov r9d, dword [rsi + 0x40]
lea rcx, [0x14005c900]
lea rdx, str.LoadSourceFile:_destination_file_crc__d_does_not_match_expected_crc__d
mov r8d, ebx
call fcn.140016400
mov edi, 4
jmp 0x14000476e
call fcn.140018700
lea rcx, [0x14005b818]
call fcn.1400174a0
test eax, eax
je 0x140004746
lea rdi, [0x14005c900]
mov rcx, rdi
call fcn.140016350
lea rcx, [0x14000ad20]
lea r8, [0x14005b770]
mov rdx, rdi
call fcn.1400182f0
lea rcx, [0x14005b818]
call fcn.14001757b
jmp 0x140004746
lea rcx, [0x14005b818]
call fcn.1400174a0
test eax, eax
je 0x14000483d
lea rdi, [0x14005c900]
mov rcx, rdi
call fcn.140016350
lea rcx, [0x14000ad20]
lea r8, [0x14005b770]
mov rdx, rdi
call fcn.1400182f0
lea rcx, [0x14005b818]
call fcn.14001757b
jmp 0x14000483d
lea rcx, [0x14005b818]
call fcn.1400174a0
test eax, eax
je 0x14000491d
lea rdi, [0x14005c900]
mov rcx, rdi
call fcn.140016350
lea rcx, [0x14000ad20]
lea r8, [0x14005b770]
mov rdx, rdi
call fcn.1400182f0
lea rcx, [0x14005b818]
call fcn.14001757b
jmp 0x14000491d
lea rcx, [0x14005b818]
call fcn.1400174a0
test eax, eax
je 0x14000487a
lea rdi, [0x14005c900]
mov rcx, rdi
call fcn.140016350
lea rcx, [0x14000ad20]
lea r8, [0x14005b770]
mov rdx, rdi
call fcn.1400182f0
lea rcx, [0x14005b818]
call fcn.14001757b
jmp 0x14000487a