Function at 0x402810
Capabilities:
Check if file exists
Copy file
Create directory
Create process on windows
Get file attributes
Manipulate boot configuration
Print debug messages
Set file attributes
Write and execute a file
Write file on windows

Disassembly:
call fcn.00403390
cmp al, 5
mov byte [0x40e040], al
jne 0x402823
jmp 0x402d80
cmp al, 6
jne 0x40282c
jmp 0x402c50
jmp 0x402aa0
push 0xffffffffffffffff
push 0x408e58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00403170
lea ecx, [esp + 0xc]
mov bl, al
call fcn.00408566
movsx eax, bl
push eax
lea ecx, [esp + 0x10]
push 0x40e478
push ecx
mov dword [esp + 0x34], 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 0x40e46c
lea eax, [esp + 0x18]
push edx
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push eax
push 0x40e418
call ebx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
push 0
push 0x40e458
push 0x40e418
call ebx
push 0x40e418
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 0x40e44c
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.00402840
push 0x40e418
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator_1
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x18]
push edx
call fcn.00405060
mov ebx, 1
mov byte [esp + 0x28], bl
lea ecx, [esp + 0x10]
call fcn.00408566
push 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 2
call sub.MFC42.DLL_CString::LoadStringA
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push 0x40e44c
push str.operating_systems
call fcn.00405220
push 2
push 0x40e430
push 0x40e424
lea ecx, [esp + 0x24]
call fcn.00405190
push 0
call fcn.004032b0
add esp, 4
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], 0
call fcn.00405050
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x20]
pop edi
mov eax, ebx
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret
push 0xffffffffffffffff
push 0x408e80
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
call fcn.00403170
lea ecx, [esp + 8]
mov bl, al
call fcn.00408566
movsx eax, bl
push eax
lea ecx, [esp + 0xc]
push 0x40e478
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 0x40e484
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402cff
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.00408566
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 0x408eb0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
push esi
push edi
call fcn.00403170
lea ecx, [esp + 0x10]
mov bl, al
call fcn.00408566
movsx eax, bl
push eax
lea ecx, [esp + 0x14]
push 0x40e478
push ecx
mov dword [esp + 0x38], 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 + 0x14]
call fcn.00408566
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push str._export_C:OKGFileBCDBack
push eax
mov byte [esp + 0x38], 1
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0xc
push ecx
call edi
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0
push 0
push edx
push str.C:windows_system32BCDEDIT.EXE
push 0x40ed1c
push 0
call esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], eax
call fcn.00408566
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
push eax
push str._X___lu
push ecx
mov byte [esp + 0x38], 2
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x28]
add esp, 0xc
push edx
call edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x320
call edi
lea eax, [esp + 0x10]
push 0x40e5f0
lea ecx, [esp + 0x24]
push eax
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push eax
push 0x40e5dc
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString
push 0
push 0
push str._create_cc7f891e_b014_45a3_a394_df75d832e97b__d__
push str.C:windows_system32BCDEDIT.EXE
push str.open
push 0
call esi
push 0x320
call edi
lea ecx, [esp + 0x18]
call fcn.00408566
movsx edx, byte [0x40e041]
push edx
lea eax, [esp + 0x1c]
push str._set_cc7f891e_b014_45a3_a394_df75d832e97b_device_partition_c:
push eax
mov byte [esp + 0x38], 3
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x24]
add esp, 0xc
push 0
push 0
push ecx
push str.C:windows_system32BCDEDIT.EXE
push str.open
push 0
call esi
push 0x320
call edi
push 0
push 0
push str._set_cc7f891e_b014_45a3_a394_df75d832e97b_path__sbldr.mbr
push str.C:windows_system32BCDEDIT.EXE
push str.open
push 0
call esi
push 0x320
call edi
push 0
push 0
push str._displayorder_cc7f891e_b014_45a3_a394_df75d832e97b__addlast
push str.C:windows_system32BCDEDIT.EXE
push str.open
push 0
call esi
push 0x320
call edi
push 0
push 0
push str._timeout_5
push str.C:windows_system32BCDEDIT.EXE
push str.open
push 0
call esi
push 0x320
call edi
movsx edx, byte [0x40e041]
push edx
lea eax, [esp + 0x14]
push str._c:_sbldr
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 [0x40e041]
push eax
push str._c:_sbldr.mbr
lea ecx, [esp + 0x18]
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.004032b0
add esp, 4
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret