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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov r12, qword [0x140028008]
xor r13d, r13d
mov dword [rsp + 0xa0], r13d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea rdx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x1400031e9
mov qword [rsp + 0xb0], r13
xor bl, bl
call fcn.140001790
mov rdi, rax
test rax, rax
je 0x140002f4d
lea rdx, str.WTSQueryUserToken
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140002f4d
lea rdx, [rsp + 0xb0]
mov ecx, dword [rsp + 0xa0]
call qword [0x1400193d0]
test eax, eax
je 0x140002f4d
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
movzx ebx, bl
mov r15d, 1
test eax, eax
cmovne ebx, r15d
jmp 0x140002f53
mov r15d, 1
mov rcx, qword [rsp + 0xb0]
test rcx, rcx
je 0x140002f6e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0xb0], r13
test rdi, rdi
je 0x140002f7c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test bl, bl
je 0x1400031e9
xor sil, sil
mov byte [rsp + 0xa0], sil
mov r14b, 1
mov byte [rsp + 0xb0], r14b
mov qword [rsp + 0x30], r13
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 rbx, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
je 0x14000318c
test rax, rax
je 0x1400031a8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleW]
mov r13d, eax
test eax, eax
je 0x14000319a
mov r12d, r13d
add r12, r12
mov rcx, r12
call fcn.14000cd78
mov r15, rax
test rax, rax
je 0x14000319a
mov rdi, rax
xor eax, eax
mov rcx, r12
rep stosb byte [rdi], al
xor r9d, r9d
mov r8d, r13d
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleW]
mov rcx, r15
test eax, eax
jne 0x140003041
call fcn.14000cd64
jmp 0x14000319a
call fcn.1400059a0
mov rcx, r15
test eax, eax
jne 0x140003057
call fcn.14000cd64
jmp 0x14000319a
call fcn.14000cd64
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r15d, eax
cmp eax, 0xffffffff
je 0x14000319a
xor r12d, r12d
mov qword [rsp + 0x48], r12
mov ecx, r15d
call fcn.140005e54
mov rdi, 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, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400030c0
mov rcx, rdi
call fcn.140005e10
jmp 0x14000319a
mov rcx, rbx
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, qword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140003125
mov rcx, rdi
call fcn.140005e10
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, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140003184
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x140003184
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140003184
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
mov r8d, r15d
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140003184
mov sil, 1
mov rcx, rdi
call fcn.140005e10
mov rax, rbx
test rbx, rbx
je 0x1400031a3
cmp rax, 0xffffffffffffffff
je 0x1400031a3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14b, r14b
je 0x1400031ae
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