Function at 0x402980
Capabilities:
Access peb ldr_data
Check if file exists
Copy file
Create directory
Create process on windows
Get file attributes
Get ntdll base address
Manipulate boot configuration
Set file attributes
Write and execute a file
Write file on windows

Disassembly:
call fcn.00403530
cmp al, 5
mov byte [0x40e0a8], al
jne 0x402993
jmp 0x402ec0
cmp al, 6
jne 0x40299c
jmp 0x402d90
jmp 0x402c10
push 0xffffffffffffffff
push 0x408c20
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
call fcn.00403220
lea ecx, [esp + 0xc]
mov bl, al
call fcn.00408300
movsx eax, bl
push eax
lea ecx, [esp + 0x10]
push str._c:Ghost
push ecx
mov dword [esp + 0x30], 0
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x18]
add esp, 0xc
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
call esi
mov ecx, dword [esp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
or al, 2
push eax
push ecx
call edi
lea edx, [esp + 0xc]
push str._boot.ini
lea eax, [esp + 0x14]
push edx
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push eax
push str.C:_boot.ini
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
push str.C:_boot.ini
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [esp + 0xc]
push ecx
call esi
mov edx, dword [esp + 0xc]
and al, 0xfe
push eax
push edx
call edi
push str.C:grldr
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esp + 0xc]
push eax
call esi
mov ecx, dword [esp + 0xc]
or al, 2
push eax
push ecx
call edi
call fcn.004029b0
push str.C:_boot.ini
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator_1
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x14]
push edx
call fcn.00404fc0
push 0x40e180
push str.C:grldr
push str.operating_systems
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], 1
call fcn.00405160
push 2
push str.timeout
push str.boot_loader
lea ecx, [esp + 0x20]
call fcn.004050d0
push 0
call fcn.00403360
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], 0
call fcn.00404fb0
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret
push 0xffffffffffffffff
push 0x408c40
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
call fcn.00403220
lea ecx, [esp + 8]
mov bl, al
call fcn.00408300
movsx eax, bl
push eax
lea ecx, [esp + 0xc]
push str._c:Ghost
push ecx
mov dword [esp + 0x28], 0
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x14]
add esp, 0xc
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, dword [esp + 8]
or al, 2
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push 2
push 2
push 0
push 1
push 0xc0000000
push str.C:menu.lst
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402e3f
lea ecx, [esp + 8]
mov dword [esp + 0x1c], eax
call sub.MFC42.DLL_CString::CString
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
lea ecx, [esp + 0xc]
call fcn.00408300
push 5
push 0
lea edx, [esp + 0x14]
push 2
push edx
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::Format_1
mov eax, dword [esp + 0x1c]
add esp, 0x10
lea ecx, [esp + 0x10]
mov eax, dword [eax - 8]
push 0
push ecx
push eax
push 0xa
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0xc]
mov byte [esp + 0x1c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov dword [esp + 0x1c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x14]
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret
push 0xffffffffffffffff
push 0x408c68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
call fcn.00403220
lea ecx, [esp + 0x10]
mov bl, al
call fcn.00408300
movsx eax, bl
push eax
lea ecx, [esp + 0x14]
push str._c:Ghost
push ecx
mov dword [esp + 0x30], 0
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
add esp, 0xc
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
call ebp
mov ecx, dword [esp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
or al, 2
push eax
push ecx
call ebx
lea ecx, [esp + 0x18]
call fcn.00408300
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push edx
push str._export__sBCDBack
push eax
mov byte [esp + 0x30], 1
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0
push 0
push ecx
push str.BCDEDIT.EXE
push 0x40eb2c
push 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x320
call edi
push 0
push 0
push str._create_cc7f891e_b014_45a3_a394_df75d832e97b__d__
push str.BCDEDIT.EXE
push 0x40eb2c
push 0
call esi
push 0x320
call edi
lea ecx, [esp + 0x14]
call fcn.00408300
movsx edx, byte [0x40e0a9]
push edx
lea eax, [esp + 0x18]
push str._set_cc7f891e_b014_45a3_a394_df75d832e97b_device_partition_c:
push eax
mov byte [esp + 0x30], 2
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x20]
add esp, 0xc
push 0
push 0
push ecx
push str.BCDEDIT.EXE
push 0x40eb2c
push 0
call esi
push 0x320
call edi
push 0
push 0
push str._set_cc7f891e_b014_45a3_a394_df75d832e97b_path_grldr.mbr
push str.BCDEDIT.EXE
push 0x40eb2c
push 0
call esi
push 0x320
call edi
push 0
push 0
push str._displayorder_cc7f891e_b014_45a3_a394_df75d832e97b__addlast
push str.BCDEDIT.EXE
push 0x40eb2c
push 0
call esi
push 0x320
call edi
push 0
push 0
push str._timeout_5
push str.BCDEDIT.EXE
push 0x40eb2c
push 0
call esi
push 0x320
call edi
movsx edx, byte [0x40e0a9]
push edx
lea eax, [esp + 0x14]
push str._c:grldr
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push ecx
call ebp
mov edx, dword [esp + 0x10]
or al, 2
push eax
push edx
call ebx
movsx eax, byte [0x40e0a9]
push eax
lea ecx, [esp + 0x14]
push str._c:grldr.mbr
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
add esp, 0xc
push edx
call ebp
or al, 2
push eax
mov eax, dword [esp + 0x14]
push eax
call ebx
push 0
call fcn.00403360
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x24], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret