Function at 0x1400027a0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x3f0]
sub rsp, 0x4f0
mov rax, qword [0x14009d020]
xor rax, rsp
mov qword [rbp + 0x3e0], rax
xor r14d, r14d
xor edx, edx
mov r8d, 0x398
lea rcx, [rbp - 0x40]
call fcn.140051420
lea rcx, [rbp - 0x40]
call fcn.1400159d0
nop
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
lea rcx, [rbp - 0x40]
call fcn.140015e30
mov ebx, r14d
mov edi, r14d
lea rdx, str.Manual_image_mapping_from_buffer_test
lea rcx, [0x14009ed60]
call fcn.140005240
mov rcx, rax
call fcn.140005510
lea rdx, str.Trying_to_map_C:windows_system32cmd.exe_into_current_process
lea rcx, [0x14009ed60]
call fcn.140005240
mov rcx, rax
call fcn.140005510
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x120089
lea r8d, [r14 + 7]
lea rcx, str.C:windows_system32cmd.exe
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400028bf
mov dword [rbp - 0x50], r14d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
movsxd rdi, eax
mov rdx, rdi
xor ecx, ecx
lea r9d, [r14 + 4]
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
mov qword [rsp + 0x20], r14
lea r9, [rbp - 0x50]
mov r8d, edi
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, rbx
lea rdx, str.MemoryImage_0x_p
lea rcx, [rbp + 0x360]
call qword [sym.imp.USER32.dll_wsprintfW]
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
lea rax, [rbp + 0x360]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], 0
jne 0x1400028f5
lea rdx, [rbp + 0x360]
lea rcx, [rsp + 0x50]
call fcn.1400057a0
nop
movsxd rax, edi
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], 0x4042
mov qword [rsp + 0x20], rax
mov r9, rbx
lea r8, [rsp + 0x50]
lea rdx, [rbp - 0x70]
lea rcx, [rbp + 0x2a0]
call fcn.14000cb30
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x140002982
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000297d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002ad5
call fcn.14004ed9c
movdqa xmm0, xmmword [0x14008ebb0]
movdqu xmmword [rsp + 0x60], xmm0
mov word [rsp + 0x50], r14w
lea rcx, [0x14009ed60]
cmp dword [rbp - 0x70], 0
jge 0x140002a60
lea rdx, str.Mapping_failed_with_error_0x
call fcn.140005240
mov rcx, qword [rax]
movsxd rdx, dword [rcx + 4]
mov ecx, dword [rdx + rax + 0x18]
and ecx, 0xfffff9ff
bts ecx, 0xb
mov dword [rdx + rax + 0x18], ecx
mov edx, dword [rbp - 0x70]
mov rcx, rax
call fcn.140002ae0
mov rcx, rax
lea rdx, [0x1400881b0]
call fcn.140005240
mov rdi, rax
mov edx, dword [rbp - 0x70]
lea rcx, [rsp + 0x70]
call fcn.140019a40
nop
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 8
jb 0x140002a05
mov rax, qword [rax]
mov rdx, rax
mov rcx, rdi
call fcn.140006d90
mov rcx, rax
call fcn.140005510
mov rcx, rax
call fcn.140005510
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x140002a6c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002a59
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002acf
call fcn.14004ed9c
jmp 0x140002a6c
lea rdx, str.Successfully_mapped__unmapping_n
call fcn.140005240
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rcx, [rbp + 0x2a0]
call fcn.14000e650
nop
cmp byte [rbp - 0x58], 0
je 0x140002a9a
lea rcx, [rbp - 0x68]
call fcn.140006170
nop
lea rcx, [rbp - 0x40]
call fcn.140015d20
mov rcx, qword [rbp + 0x3e0]
xor rcx, rsp
call fcn.14004eaf0
lea r11, [rsp + 0x4f0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
call fcn.14005a558
nop
call fcn.14005a558
int3