Function at 0x404f20
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e3cd
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x46d040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
mov byte [ebp - 0x28], 0xc7
mov byte [ebp - 0x27], 0x81
mov byte [ebp - 0x26], 0xf8
mov byte [ebp - 0x25], 0
mov byte [ebp - 0x24], 0
mov byte [ebp - 0x23], 0
mov ecx, dword [ebp - 0x4c]
and ecx, 0xff
mov byte [ebp - 0x22], cl
mov edx, dword [ebp - 0x4c]
shr edx, 8
and edx, 0xff
mov byte [ebp - 0x21], dl
mov eax, dword [ebp - 0x4c]
shr eax, 0x10
and eax, 0xff
mov byte [ebp - 0x20], al
mov ecx, dword [ebp - 0x4c]
shr ecx, 0x18
and ecx, 0xff
mov byte [ebp - 0x1f], cl
mov byte [ebp - 0x1e], 0xf3
mov byte [ebp - 0x1d], 0xf
mov byte [ebp - 0x1c], 0x10
mov byte [ebp - 0x1b], 0x91
mov byte [ebp - 0x1a], 0xf8
mov byte [ebp - 0x19], 0
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0xe9
mov byte [ebp - 0x15], 0
mov byte [ebp - 0x14], 0
mov byte [ebp - 0x13], 0
mov byte [ebp - 0x12], 0
mov edx, dword [ebp + 0xc]
add edx, 0x9a147a
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x48], 0x17
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x4052d7
cmp dword [0x508c28], 0
jne 0x40505c
mov ecx, dword [ebp - 0x48]
add ecx, 0xd
mov dword [0x508d64], ecx
push 0x40
push 0x3000
mov edx, dword [0x508d64]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [0x508c28], eax
cmp dword [0x508c28], 0
jne 0x40505c
push 0x46057c
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push ecx
call fcn.004118c0
add esp, 8
mov dword [ebp - 0x60], eax
push 0x411d00
mov ecx, dword [ebp - 0x60]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
nop
jmp 0x40534b
mov edx, dword [0x508c28]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x50]
add eax, 8
mov dword [ebp - 0xb0], eax
mov ecx, dword [ebp - 0x50]
add ecx, 5
mov edx, dword [ebp - 0x5c]
sub edx, ecx
mov dword [ebp - 0x44], edx
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x55]
mov dword [ebp - 0x64], ecx
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0xb8], edx
mov eax, dword [0x508d64]
mov dword [ebp - 0x6c], eax
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
mov dword [eax], 0
mov ecx, dword [ebp - 0x54]
mov dword [ecx + 4], 0
mov edx, dword [ebp - 0x54]
mov dword [edx + 8], 0
mov eax, dword [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004131b0
nop
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x74], edx
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 0x48]
push ecx
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x78]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x5c]
lea eax, [edx + ecx + 5]
mov ecx, dword [ebp - 0xb0]
sub ecx, eax
mov dword [ebp - 0x40], ecx
lea edx, [ebp - 0x3c]
mov dword [ebp - 0xac], edx
mov eax, dword [ebp - 0xac]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x48]
mov dword [ebp - 0xa0], ecx
mov edx, dword [ebp - 0xa0]
mov byte [edx], 0xe9
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
mov dword [ebp - 0xb4], ecx
mov edx, dword [ebp - 0xb4]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x7c]
add eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x40]
mov dword [eax + 1], ecx
mov edx, dword [0x508d64]
mov dword [ebp - 0x90], edx
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x88], ecx
mov edx, dword [ebp - 0x88]
mov dword [ebp - 0x8c], edx
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x94], eax
mov ecx, dword [0x508c28]
mov dword [ebp - 0x98], ecx
mov edx, dword [ebp - 0x90]
push edx
mov eax, dword [ebp - 0x94]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00403970
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x40522f
push str.Failed_to_write_trampoline_to_allocated_memory.
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push ecx
call fcn.004118c0
add esp, 8
mov dword [ebp - 0x9c], eax
push 0x411d00
mov ecx, dword [ebp - 0x9c]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 0x8000
push 0
mov edx, dword [0x508c28]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [0x508c28], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004101d0
nop
jmp 0x40534b
mov byte [ebp - 0x30], 0xe9
xor ecx, ecx
mov dword [ebp - 0x2f], ecx
mov edx, 1
shl edx, 0
mov eax, dword [ebp - 0x44]
mov dword [ebp + edx - 0x30], eax
push 5
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x50]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00403970
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x4052c5
push str.Failed_to_write_jump_to_trampoline_in_the_original_code.
mov edx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push edx
call fcn.004118c0
add esp, 8
mov dword [ebp - 0xa4], eax
push 0x411d00
mov ecx, dword [ebp - 0xa4]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 0x8000
push 0
mov eax, dword [0x508c28]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [0x508c28], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004101d0
nop
jmp 0x40534b
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.004101d0
nop
jmp 0x40534b
push 8
push 0x5082e0
mov edx, dword [ebp - 0x50]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00403970
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x405321
push str.Failed_to_restore_original_bytes.
mov edx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push edx
call fcn.004118c0
add esp, 8
mov dword [ebp - 0xa8], eax
push 0x411d00
mov ecx, dword [ebp - 0xa8]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
nop
cmp dword [0x508c28], 0
je 0x40534b
push 0x8000
push 0
mov eax, dword [0x508c28]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [0x508c28], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045caa8
mov esp, ebp
pop ebp
ret