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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x140010008]
xor rax, rsp
mov qword [rbp + 0x380], rax
xor r13d, r13d
mov rdi, rdx
mov dword [rsp + 0x50], 0x3020100
mov dword [rsp + 0x54], 0x7060504
mov dword [rsp + 0x58], 0xb0a0908
mov dword [rsp + 0x5c], 0xfde0d0c
mov dword [rsp + 0x44], r13d
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x60], 0x13122110
mov dword [rsp + 0x64], 0x17161514
mov dword [rsp + 0x68], 0x1b1a1918
mov dword [rsp + 0x6c], 0x2f2e2d3c
cmp ecx, 3
jne 0x140001332
mov rcx, qword [rdi + 8]
lea r8d, [r13 + 2]
lea rdx, [0x14000dd30]
call fcn.1400017f0
test eax, eax
jne 0x1400011f1
mov rcx, qword [rdi + 0x10]
mov qword [rsp + 0x30], r13
lea r8d, [r13 + 1]
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14000133a
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
movsxd r12, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea edx, [r13 + 8]
mov rcx, rax
mov r8, r12
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400011d8
lea r9, [rsp + 0x44]
mov r8d, r12d
mov rdx, rax
mov rcx, rsi
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000133a
mov r8d, dword [rsp + 0x44]
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x50]
call fcn.140001370
test eax, eax
je 0x14000133a
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8d, 0x401
call fcn.140002f50
mov r9, qword [rdi + 0x10]
lea r8, str._s.aes
lea rcx, [rsp + 0x70]
mov edx, 0x400
call fcn.1400018a8
mov qword [rsp + 0x30], r13
lea rcx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x14000133a
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
lea r9, [rsp + 0x40]
mov rcx, rax
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x14000133a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Encrypt_3.1__:_NOK__d_n
mov edx, eax
call fcn.14000195c
jmp 0x14000133a
mov rcx, qword [rdi + 8]
lea rdx, [0x14000dd58]
mov r8d, 2
call fcn.1400017f0
test eax, eax
jne 0x140001332
mov rcx, qword [rdi + 0x10]
mov qword [rsp + 0x30], r13
lea r8d, [rax + 1]
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14000133a
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
movsxd r12, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r12
mov rcx, rax
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x14000133a
lea r9, [rsp + 0x44]
mov r8d, r12d
mov rdx, rax
mov rcx, rsi
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000133a
mov r8d, dword [rsp + 0x44]
lea r9, [rsp + 0x40]
lea rcx, [rsp + 0x50]
mov rdx, rbx
call fcn.140001540
test eax, eax
je 0x14000133a
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8d, 0x401
call fcn.140002f50
mov r9, qword [rdi + 0x10]
lea r8, str._s.decrypt
lea rcx, [rsp + 0x70]
mov edx, 0x400
call fcn.1400018a8
mov qword [rsp + 0x30], r13
lea rcx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x14000133a
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x40]
mov rdx, rbx
mov rcx, rax
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x14000133a
mov rcx, qword [rdi]
call fcn.140001680
xor eax, eax
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.1400017c0
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rbp
ret