Function at 0x402840
Capabilities:
Manipulate boot configuration
Read file on windows
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x408e36
push eax
mov eax, 0x100c
mov dword fs:[0], esp
call fcn.00408870
push ebp
push 0x40e418
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 8]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push eax
mov dword [esp + 0x1034], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4028c0
lea ecx, [esp + 8]
mov dword [esp + 0x1018], eax
call sub.MFC42.DLL_CString::CString
pop ebp
mov ecx, dword [esp + 0x100c]
mov dword fs:[0], ecx
add esp, 0x1018
ret
push edi
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push eax
push ecx
lea edx, [esp + 0x1c]
push 0x1000
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
pop edi
jne 0x402914
lea ecx, [esp + 8]
mov dword [esp + 0x1018], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop ebp
mov ecx, dword [esp + 0x100c]
mov dword fs:[0], ecx
add esp, 0x1018
ret
lea eax, [esp + 0x10]
push esi
push eax
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 8]
mov byte [esp + 0x101c], 1
call sub.MFC42.DLL_CString::MakeLower
mov ecx, dword [esp + 8]
push str.c:ieldr
mov esi, dword [ecx - 8]
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
je 0x402963
cmp eax, esi
jge 0x402963
cmp byte [esp + eax + 0x14], 0xd
je 0x402963
mov byte [esp + eax + 0x14], 0x20
inc eax
cmp eax, esi
jl 0x402952
push str.c:mxldr
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
je 0x40298b
cmp eax, esi
jge 0x40298b
cmp byte [esp + eax + 0x14], 0xd
je 0x40298b
mov byte [esp + eax + 0x14], 0x20
inc eax
cmp eax, esi
jl 0x40297a
push str.c:ghldr
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
je 0x4029b3
cmp eax, esi
jge 0x4029b3
cmp byte [esp + eax + 0x14], 0xd
je 0x4029b3
mov byte [esp + eax + 0x14], 0x20
inc eax
cmp eax, esi
jl 0x4029a2
push str.c:dhldr
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
je 0x4029db
cmp eax, esi
jge 0x4029db
cmp byte [esp + eax + 0x14], 0xd
je 0x4029db
mov byte [esp + eax + 0x14], 0x20
inc eax
cmp eax, esi
jl 0x4029ca
push str.c:_arldr
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
je 0x402a03
cmp eax, esi
jge 0x402a03
cmp byte [esp + eax + 0x14], 0xd
je 0x402a03
mov byte [esp + eax + 0x14], 0x20
inc eax
cmp eax, esi
jl 0x4029f2
push str.c:ggldr.mbr
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
je 0x402a2b
cmp eax, esi
jge 0x402a2b
cmp byte [esp + eax + 0x14], 0xd
je 0x402a2b
mov byte [esp + eax + 0x14], 0x20
inc eax
cmp eax, esi
jl 0x402a1a
push 0
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x10]
push 0
push edx
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 8]
mov byte [esp + 0x101c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x101c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x1014]
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x1018
ret