Function at 0x140001df0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x2b0]
sub rsp, 0x3b0
mov rax, qword [0x14003b080]
xor rax, rsp
mov qword [rbp + 0x2a0], rax
mov rbx, rdx
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rdi, rax
mov r8d, 0x104
lea rdx, [rbp + 0x80]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rbp + 0x80]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea r8, [rbp + 0x80]
lea rdx, str._sStub.exe
lea rcx, [rbp + 0x190]
call fcn.140004550
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x70]
call fcn.140029780
lea rcx, [rsp + 0x70]
call fcn.1400031c0
nop
lea rcx, [rsp + 0x70]
call fcn.140003560
mov rcx, qword [rax]
movsxd rdx, dword [rcx + 4]
test byte [rdx + rax + 0x10], 6
jne 0x140002080
lea rcx, [rsp + 0x78]
call fcn.140003d10
mov r15d, 2
test rax, rax
jne 0x140001eee
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
mov eax, 6
cmp qword [rbp + rcx - 0x48], 0
cmovne eax, r15d
or eax, dword [rbp + rcx - 0x80]
and eax, 0x17
mov dword [rbp + rcx - 0x80], eax
mov edx, dword [rbp + rcx - 0x7c]
and edx, eax
jne 0x140002176
lea r8, [0x140036030]
mov rdx, qword [rbx + 8]
lea rcx, [rsp + 0x68]
call fcn.1400106f0
test eax, eax
je 0x140001f21
mov edx, 4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.Error:_Could_not_open_input_file.
jmp 0x140002095
mov r8d, r15d
xor edx, edx
mov rcx, qword [rsp + 0x68]
call fcn.14000dbdc
mov rcx, qword [rsp + 0x68]
call fcn.14000d090
movsxd r14, eax
mov rcx, qword [rsp + 0x68]
call fcn.14001018c
mov rcx, r14
call fcn.1400112fc
mov rsi, rax
mov r9, qword [rsp + 0x68]
mov r8, r14
mov edx, 1
mov rcx, rax
call fcn.140010e18
mov rcx, qword [rsp + 0x68]
call fcn.14000d83c
test rsi, rsi
jne 0x140001f8e
lea edx, [rsi + 4]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.Error:_Could_not_read_input_file.
jmp 0x140002095
xor edx, edx
lea rcx, str.Stub.exe
call qword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
mov rbx, rax
test rax, rax
jne 0x140001fbd
lea edx, [rax + 4]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.Error:_Could_not_open_file_for_writing
jmp 0x140002095
xor r9d, r9d
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], rsi
mov r8d, 0x84
lea rdx, [0x1400360b0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UpdateResourceW]
test eax, eax
jne 0x140001ffc
lea edx, [rax + 4]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.Error:_Could_not_add_resource
jmp 0x140002095
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
mov rcx, rdi
test eax, eax
jne 0x140002020
lea edx, [rax + 4]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.Error:_Could_not_write_changes_to_file
jmp 0x140002095
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.Success
call fcn.1400045b0
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
mov dl, 0xa
call fcn.1400043c0
movzx edx, al
mov rcx, rbx
call fcn.140004f70
mov rcx, rbx
call fcn.1400041b0
mov edx, 7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rcx, str.pause
call fcn.14000fd68
mov rcx, rsi
call fcn.140006110
jmp 0x1400020dc
mov edx, 4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.Error:_Could_not_write_the_stub_to_disk
call fcn.1400045b0
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
mov rbx, rax
mov dl, 0xa
add rcx, rax
call fcn.1400043c0
movzx edx, al
mov rcx, rbx
call fcn.140004f70
mov rcx, rbx
call fcn.1400041b0
mov edx, 7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rcx, str.pause
call fcn.14000fd68
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x6c], edx
lea rcx, [rsp + 0x78]
call fcn.140002f00
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rsp + rcx + 0x6c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x18], rax
lea rcx, [rbp + 0x18]
call fcn.140005874
nop
xor eax, eax
mov rcx, qword [rbp + 0x2a0]
xor rcx, rsp
call fcn.1400060f0
lea r11, [rsp + 0x3b0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
test dl, 4
je 0x140002184
lea rbx, str.ios_base::badbit_set
jmp 0x140002199
test r15b, dl
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.1400013d0
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140001c90
lea rdx, [0x14003a340]
lea rcx, [rsp + 0x40]
call fcn.140007e9c
int3