Function at 0x4015c0
Capabilities:
Allocate or change rwx memory
Enumerate threads
Execute command
Execute shellcode via indirect call
Get file size
Hijack thread execution
Read file on windows
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404a76
mov eax, dword fs:[0]
push eax
sub esp, 0x4b8
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
mov dword [ebp - 0x158], 0
movups xmmword [ebp - 0x168], xmm0
mov dword [ebp - 0x154], 0xf
mov byte [ebp - 0x168], 0
mov dword [ebp - 4], 0
movups xmmword [ebp - 0x150], xmm0
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x13c], 0xf
mov byte [ebp - 0x150], 0
push str.Process_Name:
mov byte [ebp - 4], 1
call fcn.00401040
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
add esp, 4
mov eax, dword [esi]
push 0xa
mov ecx, dword [eax + 4]
add ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_char___thiscall_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const]
movzx eax, al
lea edx, [ebp - 0x168]
push eax
mov ecx, esi
call fcn.00402a60
add esp, 4
mov dword [ebp - 0x12c], 0
xorps xmm0, xmm0
lea edx, [ebp - 0x168]
lea ecx, [ebp - 0x134]
movq qword [ebp - 0x134], xmm0
call fcn.00401340
mov byte [ebp - 4], 2
mov eax, 0x92492493
mov ecx, dword [ebp - 0x130]
mov edi, dword [ebp - 0x134]
sub ecx, edi
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x4016e4
push str.Failed_to_find_process_n
call fcn.00401010
push str.pause
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
add esp, 8
mov edi, 1
jmp 0x401ca1
cmp eax, 1
jne 0x4016f6
mov edi, dword [edi]
mov dword [ebp - 0x4a8], edi
jmp 0x40180b
xor esi, esi
test eax, eax
je 0x401769
xor ecx, ecx
mov dword [ebp - 0x4a0], ecx
nop dword [eax]
nop dword [eax + eax]
cmp dword [ebp - 0x154], 0xf
lea eax, [ebp - 0x168]
cmova eax, dword [ebp - 0x168]
push eax
push dword [edi + ecx]
push esi
push str.__d_____d__s_n
call fcn.00401040
mov ecx, dword [ebp - 0x130]
mov eax, 0x92492493
mov edi, dword [ebp - 0x134]
inc esi
add dword [ebp - 0x4a0], 0x1c
sub ecx, edi
imul ecx
add esp, 0x10
add edx, ecx
mov ecx, dword [ebp - 0x4a0]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x401710
push str.Choose:
call fcn.00401040
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [ebp - 0x468]
add esp, 4
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::operator___int__]
mov ecx, dword [ebp - 0x130]
mov eax, 0x92492493
mov esi, dword [ebp - 0x134]
sub ecx, esi
imul ecx
add edx, ecx
mov ecx, dword [ebp - 0x468]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jb 0x4017e4
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
push 0x402300
call fcn.004020e0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
push str.pause
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
add esp, 4
mov edi, 1
jmp 0x401ca1
lea eax, [ecx*8]
sub eax, ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
push 0xa
push 0x7fffffff
push 0xffffffffffffffff
mov eax, dword [esi + eax*4]
mov dword [ebp - 0x4a8], eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::ignore_long_long___int64___int_]
push str.Dll_Name:
call fcn.00401040
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
add esp, 4
mov eax, dword [esi]
push 0xa
mov ecx, dword [eax + 4]
add ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_char___thiscall_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const]
movzx eax, al
lea edx, [ebp - 0x150]
push eax
mov ecx, esi
call fcn.00402a60
add esp, 4
lea eax, [ebp - 0x150]
cmp dword [ebp - 0x13c], 0xf
lea ecx, [ebp - 0x4c4]
cmova eax, dword [ebp - 0x150]
push eax
call fcn.00401eb0
cmp dword [ebp - 0x4b0], 0xf
lea ecx, [ebp - 0x198]
lea eax, [ebp - 0x4c4]
cmova eax, dword [ebp - 0x4c4]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
mov ecx, dword [ebp - 0x4b0]
add esp, 8
mov esi, eax
cmp ecx, 0xf
jbe 0x4018c4
mov edx, dword [ebp - 0x4c4]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4018ba
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4018ba
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00403b8c
add esp, 8
test esi, esi
je 0x4018cf
push str.Failed_to_find_dll
jmp 0x401901
cmp dword [ebp - 0x13c], 0xf
lea ecx, [ebp - 0x128]
push 0
push ecx
lea eax, [ebp - 0x150]
cmova eax, dword [ebp - 0x150]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x40191e
push str.Failed_to_get_full_path
call fcn.00401040
push str.pause
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
add esp, 8
mov edi, 1
jmp 0x401ca1
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 4
push 0x3000
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
push 0
push esi
push eax
push edi
mov dword [ebp - 0x4ac], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x4ac]
push dword [ebp - 0x4a8]
push 0
mov esi, dword [eax + 0x3c]
add esi, eax
push 0x1fffff
mov dword [ebp - 0x4a4], esi
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 0x40
push 0x3000
push dword [esi + 0x50]
mov edi, eax
push 0
push edi
mov dword [ebp - 0x4a0], edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
push dword [esi + 0x54]
mov dword [ebp - 0x468], eax
push dword [ebp - 0x4ac]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
xor eax, eax
xor edi, edi
cmp ax, word [esi + 6]
jae 0x401a0e
add esi, 0x10c
mov eax, dword [esi]
add eax, dword [ebp - 0x4ac]
push 0
push dword [esi - 4]
push eax
mov eax, dword [esi - 8]
add eax, dword [ebp - 0x468]
push eax
push dword [ebp - 0x4a0]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [ebp - 0x4a4]
lea esi, [esi + 0x28]
inc edi
movzx eax, word [eax + 6]
cmp edi, eax
jl 0x4019d2
mov esi, dword [ebp - 0x4a4]
mov edi, dword [ebp - 0x4a0]
push 0x40
push 0x3000
push 0x1000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ecx, dword [ebp - 0x468]
mov edx, eax
mov eax, dword [ebp - 0x4ac]
mov dword [ebp - 0x480], ecx
push 0
push 0x18
mov eax, dword [eax + 0x3c]
add eax, ecx
mov dword [ebp - 0x4a4], edx
mov dword [ebp - 0x47c], eax
mov eax, dword [esi + 0xa0]
add eax, ecx
mov dword [ebp - 0x478], eax
mov eax, dword [esi + 0x80]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
add eax, ecx
mov dword [ebp - 0x474], eax
mov eax, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x470], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x46c], eax
lea eax, [ebp - 0x480]
push eax
push edx
push edi
call esi
push 0
mov eax, fcn.00401330
sub eax, 0x401200
push eax
mov eax, dword [ebp - 0x4a4]
push 0x401200
add eax, 0x18
push eax
push edi
call esi
push 0
push 4
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
lea eax, [ebp - 0x49c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Thread32First]
lea eax, [ebp - 0x135]
mov dword [ebp - 0x49c], 0x1c
push eax
push 0
push 1
push 0x14
mov dword [ebp - 0x464], 0x10007
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
lea eax, [ebp - 0x49c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
je 0x401b30
nop word [eax + eax]
mov eax, dword [ebp - 0x4a8]
cmp dword [ebp - 0x490], eax
je 0x401b30
lea eax, [ebp - 0x49c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x401b10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x494]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
mov dword [ebp - 0x4a8], esi
test esi, esi
jne 0x401b5e
lea edi, [eax + 1]
jmp 0x401ca1
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
lea eax, [ebp - 0x464]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
push 0x40
push 0x3000
push 0x1000
push 0
push edi
mov word [ebp - 0x24], ?good@ios_base@std@@QBE_NXZ
mov byte [ebp - 0x1e], 0xe8
mov word [ebp - 0x19], 0xe961
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, dword [ebp - 0x4a0]
mov edi, eax
mov eax, dword [ebp - 0x4a4]
mov dword [ebp - 0x22], eax
sub eax, edi
add eax, 0xd
mov dword [ebp - 0x1d], eax
mov eax, dword [ebp - 0x3ac]
sub eax, edi
push 0
sub eax, 0x11
push 0x11
mov dword [ebp - 0x17], eax
lea eax, [ebp - 0x24]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 0x464]
mov dword [ebp - 0x3ac], edi
push eax
push dword [ebp - 0x4a8]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [ebp - 0x4a8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x4a4]
mov edx, str.Address_of_Loader:
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x402550
push eax
push 0x4011e0
call fcn.00402330
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::ios_base_____cdecl___class_std::ios_base___]
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___void_const__]
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 ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Address_of_Image:
push 0x402550
push dword [ebp - 0x468]
push 0x4011e0
call fcn.00402330
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::ios_base_____cdecl___class_std::ios_base___]
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___void_const__]
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 ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::basic_istream_char__struct_std::char_traits_char__::get_void_]
push 0x8000
push 0
push dword [ebp - 0x4a4]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call esi
push 0x8000
push 0
push edi
push dword [ebp - 0x4a0]
call esi
xor edi, edi
mov ecx, dword [ebp - 0x134]
test ecx, ecx
je 0x401d31
mov edx, dword [ebp - 0x130]
push ecx
call fcn.00402580
mov ecx, dword [ebp - 0x12c]
mov eax, 0x92492493
mov esi, dword [ebp - 0x134]
add esp, 4
sub ecx, esi
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, esi
shl ecx, 2
cmp ecx, 0x1000
jb 0x401d09
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401dae
push ecx
push esi
call fcn.00403b8c
add esp, 8
mov dword [ebp - 0x134], 0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x12c], 0
mov ecx, dword [ebp - 0x13c]
cmp ecx, 0xf
jbe 0x401d67
mov edx, dword [ebp - 0x150]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401d5d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401dae
push ecx
push edx
call fcn.00403b8c
add esp, 8
mov ecx, dword [ebp - 0x154]
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x13c], 0xf
mov byte [ebp - 0x150], 0
cmp ecx, 0xf
jbe 0x401dbe
mov edx, dword [ebp - 0x168]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401db4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401db4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00403b8c
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00403b4e
mov esp, ebp
pop ebp
ret