Function at 0x140002dd0
Capabilities:
Copy file
Get file size
Read file on windows
Write file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov r13, rdx
mov r12, qword [0x140027008]
xor r8d, r8d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140002e15
mov al, 1
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
xor esi, esi
mov dword [rsp + 0xb0], esi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea rdx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x1400030db
mov qword [rsp + 0xa0], rsi
xor dil, dil
call fcn.1400016c0
mov rbx, rax
test rax, rax
je 0x140002ea2
lea rdx, str.WTSQueryUserToken
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140002ea2
lea rdx, [rsp + 0xa0]
mov ecx, dword [rsp + 0xb0]
call qword [0x1400183c0]
test eax, eax
je 0x140002ea2
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
movzx edi, dil
mov r15d, 1
test eax, eax
cmovne edi, r15d
jmp 0x140002ea8
mov r15d, 1
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x140002ec3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0xa0], rsi
test rbx, rbx
je 0x140002ed1
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test dil, dil
je 0x1400030db
mov byte [rsp + 0xb0], sil
mov r14b, 1
mov byte [rsp + 0xa0], r14b
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, r15d
mov edx, 0x80000000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
je 0x1400030a9
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r15d, eax
cmp eax, 0xffffffff
je 0x1400030a9
xor r12d, r12d
mov qword [rsp + 0x48], r12
mov ecx, r15d
call fcn.140005a34
mov rbx, rax
mov qword [rsp + 0x48], rax
mov dword [rsp + 0xb8], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0xb8]
mov r8d, r15d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140002f90
mov rcx, rbx
call fcn.1400059f0
jmp 0x1400030a9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
xor r14b, r14b
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140002ff0
mov rcx, rbx
call fcn.1400059f0
movzx eax, sil
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x140003014
mov rcx, rbx
call fcn.1400059f0
jmp 0x1400030a9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14000302b
mov rcx, rbx
call fcn.1400059f0
jmp 0x1400030a9
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x14000304b
mov rcx, rbx
call fcn.1400059f0
jmp 0x1400030a9
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
mov r8d, r15d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140003077
mov rcx, rbx
call fcn.1400059f0
jmp 0x1400030a9
mov sil, 1
mov rcx, rbx
call fcn.1400059f0
jmp 0x1400030a9
lea rcx, [rdi - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400030bc
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14b, r14b
je 0x1400030c7
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
movzx eax, sil
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
xor al, al
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret