Function at 0x403a00
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e2cd
mov eax, dword fs:[0]
push eax
sub esp, 0xbc
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 - 0x50], eax
mov byte [ebp - 0x2c], 0xc7
mov byte [ebp - 0x2b], 0x84
mov byte [ebp - 0x2a], 0x24
mov byte [ebp - 0x29], 8
mov byte [ebp - 0x28], 1
mov byte [ebp - 0x27], 0
mov byte [ebp - 0x26], 0
mov ecx, dword [ebp - 0x50]
and ecx, 0xff
mov byte [ebp - 0x25], cl
mov edx, dword [ebp - 0x50]
shr edx, 8
and edx, 0xff
mov byte [ebp - 0x24], dl
mov eax, dword [ebp - 0x50]
shr eax, 0x10
and eax, 0xff
mov byte [ebp - 0x23], al
mov ecx, dword [ebp - 0x50]
shr ecx, 0x18
and ecx, 0xff
mov byte [ebp - 0x22], cl
mov byte [ebp - 0x21], 0xf3
mov byte [ebp - 0x20], 0xf
mov byte [ebp - 0x1f], 0x10
mov byte [ebp - 0x1e], 0x84
mov byte [ebp - 0x1d], 0x24
mov byte [ebp - 0x1c], 8
mov byte [ebp - 0x1b], 1
mov byte [ebp - 0x1a], 0
mov byte [ebp - 0x19], 0
mov byte [ebp - 0x18], 0xe9
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0
mov byte [ebp - 0x15], 0
mov byte [ebp - 0x14], 0
mov edx, dword [ebp + 0xc]
add edx, 0xfffe31
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x4c], 0x19
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x403e07
cmp dword [0x508c18], 0
jne 0x403b44
mov ecx, dword [ebp - 0x4c]
add ecx, 0xe
mov dword [0x508d58], ecx
push 0x40
push 0x3000
mov edx, dword [0x508d58]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [0x508c18], eax
cmp dword [0x508c18], 0
jne 0x403b44
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 - 0x64], eax
push 0x411d00
mov ecx, dword [ebp - 0x64]
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 0x403e50
mov edx, dword [0x508c18]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x54]
add eax, 9
mov dword [ebp - 0xb0], eax
mov ecx, dword [ebp - 0x54]
add ecx, 5
mov edx, dword [ebp - 0x60]
sub edx, ecx
mov dword [ebp - 0x44], edx
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
lea ecx, [ebp - 0x59]
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0xc8], edx
mov eax, dword [0x508d58]
mov dword [ebp - 0x70], eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x6c]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
mov dword [eax], 0
mov ecx, dword [ebp - 0x58]
mov dword [ecx + 4], 0
mov edx, dword [ebp - 0x58]
mov dword [edx + 8], 0
mov eax, dword [ebp - 0x70]
push eax
lea ecx, [ebp - 0x40]
call fcn.004131b0
nop
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x74], ecx
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x7c], eax
mov ecx, dword [ebp - 0x7c]
mov edx, dword [0x5082b8]
mov dword [ecx], edx
mov eax, dword [0x5082bc]
mov dword [ecx + 4], eax
mov dl, byte [0x5082c0]
mov byte [ecx + 8], dl
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
mov dword [ebp - 0xc0], ecx
mov edx, dword [ebp - 0xc0]
mov dword [ebp - 0xbc], edx
mov eax, dword [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0xbc]
add edx, 9
push edx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x60]
lea edx, [ecx + eax + 0xe]
mov eax, dword [ebp - 0xb0]
sub eax, edx
mov dword [ebp - 0x48], eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x90], ecx
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x4c]
lea edx, [eax + ecx + 9]
mov dword [ebp - 0xc4], edx
mov eax, dword [ebp - 0xc4]
mov byte [eax], 0xe9
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x84], ecx
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x88], edx
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x8c]
add ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x48]
mov dword [ecx + 0xa], edx
mov eax, dword [0x508d58]
mov dword [ebp - 0xa0], eax
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x94], ecx
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0x98], edx
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0x9c]
mov dword [ebp - 0xa4], ecx
mov edx, dword [0x508c18]
mov dword [ebp - 0xa8], edx
mov eax, dword [ebp - 0xa0]
push eax
mov ecx, dword [ebp - 0xa4]
push ecx
mov edx, dword [ebp - 0xa8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00403970
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x403d62
push str.Failed_to_write_trampoline_to_allocated_memory.
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 - 0xac], eax
push 0x411d00
mov ecx, dword [ebp - 0xac]
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 [0x508c18]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [0x508c18], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.004101d0
nop
jmp 0x403e50
mov byte [ebp - 0x34], 0xe9
xor edx, edx
mov dword [ebp - 0x33], edx
mov eax, 1
shl eax, 0
mov ecx, dword [ebp - 0x44]
mov dword [ebp + eax - 0x34], ecx
push 5
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00403970
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x403df5
push str.Failed_to_write_jump_to_trampoline.
mov eax, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push eax
call fcn.004118c0
add esp, 8
mov dword [ebp - 0xb4], eax
push 0x411d00
mov ecx, dword [ebp - 0xb4]
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 ecx, dword [0x508c18]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [0x508c18], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.004101d0
nop
jmp 0x403e50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.004101d0
nop
jmp 0x403e50
push 9
push 0x5082b8
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00403970
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x403e50
push str.Failed_to_restore_original_bytes.
mov eax, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push eax
call fcn.004118c0
add esp, 8
mov dword [ebp - 0xb8], eax
push 0x411d00
mov ecx, dword [ebp - 0xb8]
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
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