Function at 0x405ca0
Capabilities:
Check if file exists
Manipulate boot configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49ba40
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x4c6374]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x10], 0
je 0x40637d
cmp dword [esi + 0x14], 8
jb 0x405ce4
mov eax, dword [esi]
jmp 0x405ce6
mov eax, esi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call edi
test eax, eax
je 0x40637d
push str.USM8PE8L_.ISO
mov edx, esi
lea ecx, [ebp - 0xc4]
call fcn.0040c1a0
add esp, 4
cmp dword [eax + 0x10], 0
jne 0x405d16
xor bl, bl
jmp 0x405d26
cmp dword [eax + 0x14], 8
jb 0x405d1e
mov eax, dword [eax]
push eax
call edi
test eax, eax
setne bl
mov eax, dword [ebp - 0xb0]
cmp eax, 8
jb 0x405d44
inc eax
lea ecx, [ebp - 0xc4]
push eax
push dword [ebp - 0xc4]
call fcn.0040f5b0
test bl, bl
jne 0x405f09
push 0x98
lea eax, [ebp - 0xa8]
push 0
push eax
call fcn.004793f0
add esp, 4
lea ecx, [ebp - 0xa8]
call fcn.00408c30
push str.USM8PE8L_.ISO
mov edx, esi
mov dword [ebp - 4], 5
lea ecx, [ebp - 0xc4]
call fcn.0040c1a0
add esp, 4
mov esi, eax
mov edx, str.IsFileOrDirExist_Error:
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xa8]
call fcn.0040b820
mov edx, esi
mov ecx, eax
call fcn.0040be40
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0xb0]
cmp eax, 8
jb 0x405dca
inc eax
lea ecx, [ebp - 0xc4]
push eax
push dword [ebp - 0xc4]
call fcn.0040f5b0
push 0x17
push str.CBackRestore::FileCheck
lea ecx, [ebp - 0xdc]
mov dword [ebp - 0xc8], 0xf
mov dword [ebp - 0xcc], 0
mov byte [ebp - 0xdc], 0
call fcn.0040f450
mov byte [ebp - 4], 7
lea ecx, [ebp - 0xf4]
push 0xd
push str.BaRestore.cpp
mov dword [ebp - 0xe0], 0xf
mov dword [ebp - 0xe4], 0
mov byte [ebp - 0xf4], 0
call fcn.0040f450
lea eax, [ebp - 0xc4]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0xa8]
call fcn.00408b50
push eax
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 9
push eax
push 0x89
lea eax, [ebp - 0xf4]
push eax
push ecx
call fcn.0041f440
mov ecx, eax
call fcn.0041f910
mov eax, dword [ebp - 0xb0]
cmp eax, 8
jb 0x405e81
inc eax
lea ecx, [ebp - 0xc4]
push eax
push dword [ebp - 0xc4]
call fcn.0040f5b0
xor eax, eax
mov dword [ebp - 0xb0], 7
mov word [ebp - 0xc4], ax
mov eax, dword [ebp - 0xe0]
mov dword [ebp - 0xb4], 0
cmp eax, 0x10
jb 0x405ebc
inc eax
lea ecx, [ebp - 0xf4]
push eax
push dword [ebp - 0xf4]
call fcn.0040f330
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0xe0], 0xf
mov dword [ebp - 0xe4], 0
mov byte [ebp - 0xf4], 0
cmp eax, 0x10
jb 0x405ef5
inc eax
lea ecx, [ebp - 0xdc]
push eax
push dword [ebp - 0xdc]
call fcn.0040f330
lea ecx, [ebp - 0x58]
call fcn.00408b70
mov dword [ebp - 4], 0xa
jmp 0x406501
push str._scldr
lea edx, [esi + 0x30]
lea ecx, [ebp - 0xc4]
call fcn.0040c1a0
add esp, 4
cmp dword [eax + 0x10], 0
jne 0x405f2e
mov byte [ebp - 0xa9], 0
jmp 0x405f42
cmp dword [eax + 0x14], 8
jb 0x405f36
mov eax, dword [eax]
push eax
call edi
test eax, eax
setne byte [ebp - 0xa9]
mov eax, dword [ebp - 0xb0]
cmp eax, 8
jb 0x405f60
inc eax
lea ecx, [ebp - 0xc4]
push eax
push dword [ebp - 0xc4]
call fcn.0040f5b0
cmp byte [ebp - 0xa9], 0
jne 0x4060ae
push 0x98
lea eax, [ebp - 0xa8]
push 0
push eax
call fcn.004793f0
add esp, 4
lea ecx, [ebp - 0xa8]
call fcn.00408c30
push str._scldr
lea edx, [esi + 0x30]
mov dword [ebp - 4], 0xb
lea ecx, [ebp - 0xc4]
call fcn.0040c1a0
add esp, 4
mov esi, eax
mov edx, str.IsFileOrDirExist_Error:
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0xa8]
call fcn.0040b820
mov edx, esi
mov ecx, eax
call fcn.0040be40
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 0xb
call fcn.0040f680
push str.CBackRestore::FileCheck
lea ecx, [ebp - 0xc4]
call fcn.0040f550
push str.BaRestore.cpp
lea ecx, [ebp - 0xdc]
mov byte [ebp - 4], 0xd
call fcn.0040f550
lea eax, [ebp - 0xf4]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0xa8]
call fcn.00408b50
push eax
lea eax, [ebp - 0xc4]
mov byte [ebp - 4], 0xf
push eax
push 0x8e
lea eax, [ebp - 0xdc]
push eax
push ecx
call fcn.0041f440
mov ecx, eax
call fcn.0041f910
lea ecx, [ebp - 0xf4]
call fcn.0040f680
mov eax, dword [ebp - 0xc8]
cmp eax, 0x10
jb 0x406061
inc eax
lea ecx, [ebp - 0xdc]
push eax
push dword [ebp - 0xdc]
call fcn.0040f330
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0xc8], 0xf
mov dword [ebp - 0xcc], 0
mov byte [ebp - 0xdc], 0
cmp eax, 0x10
jb 0x40609a
inc eax
lea ecx, [ebp - 0xc4]
push eax
push dword [ebp - 0xc4]
call fcn.0040f330
lea ecx, [ebp - 0x58]
call fcn.00408b70
mov dword [ebp - 4], 0x10
jmp 0x406501
push str._scldr.mbr
lea edx, [esi + 0x30]
lea ecx, [ebp - 0xc4]
call fcn.0040c1a0
add esp, 4
cmp dword [eax + 0x10], 0
jne 0x4060d3
mov byte [ebp - 0xa9], 0
jmp 0x4060e7
cmp dword [eax + 0x14], 8
jb 0x4060db
mov eax, dword [eax]
push eax
call edi
test eax, eax
setne byte [ebp - 0xa9]
lea ecx, [ebp - 0xc4]
call fcn.0040f680
cmp byte [ebp - 0xa9], 0
jne 0x4061ff
push 0x98
lea eax, [ebp - 0xa8]
push 0
push eax
call fcn.004793f0
add esp, 4
lea ecx, [ebp - 0xa8]
call fcn.00408c30
push str._scldr.mbr
lea edx, [esi + 0x30]
mov dword [ebp - 4], 0x11
lea ecx, [ebp - 0xc4]
call fcn.0040c1a0
add esp, 4
mov esi, eax
mov edx, str.IsFileOrDirExist_Error:
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0xa8]
call fcn.0040b820
mov edx, esi
mov ecx, eax
call fcn.0040be40
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 0x11
call fcn.0040f680
push str.CBackRestore::FileCheck
lea ecx, [ebp - 0xdc]
call fcn.0040f550
push str.BaRestore.cpp
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 0x13
call fcn.0040f550
lea eax, [ebp - 0xf4]
mov byte [ebp - 4], 0x14
push eax
lea ecx, [ebp - 0xa8]
call fcn.00408b50
push eax
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 0x15
push eax
push 0x93
lea eax, [ebp - 0xc4]
push eax
push ecx
call fcn.0041f440
mov ecx, eax
call fcn.0041f910
lea ecx, [ebp - 0xf4]
call fcn.0040f680
lea ecx, [ebp - 0xc4]
call fcn.0040ef30
lea ecx, [ebp - 0xdc]
call fcn.0040ef30
lea ecx, [ebp - 0x58]
call fcn.00408b70
mov dword [ebp - 4], 0x16
jmp 0x406501
push str._bcdedit.exe
lea edx, [esi + 0x30]
lea ecx, [ebp - 0xc4]
call fcn.0040c1a0
add esp, 4
cmp dword [eax + 0x10], 0
jne 0x406224
mov byte [ebp - 0xa9], 0
jmp 0x406238
cmp dword [eax + 0x14], 8
jb 0x40622c
mov eax, dword [eax]
push eax
call edi
test eax, eax
setne byte [ebp - 0xa9]
lea ecx, [ebp - 0xc4]
call fcn.0040f680
cmp byte [ebp - 0xa9], 0
jne 0x40634c
push 0x98
lea eax, [ebp - 0xa8]
push 0
push eax
call fcn.004793f0
add esp, 4
lea ecx, [ebp - 0xa8]
call fcn.00408c30
push str._bcdedit.exe
lea edx, [esi + 0x30]
mov dword [ebp - 4], 0x17
lea ecx, [ebp - 0xc4]
call fcn.0040c1a0
add esp, 4
mov esi, eax
mov edx, str.IsFileOrDirExist_Error:
mov byte [ebp - 4], 0x18
lea ecx, [ebp - 0xa8]
call fcn.0040b820
mov edx, esi
mov ecx, eax
call fcn.0040be40
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 0x17
call fcn.0040f680
push str.CBackRestore::FileCheck
lea ecx, [ebp - 0xdc]
call fcn.0040f550
push str.BaRestore.cpp
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 0x19
call fcn.0040f550
lea eax, [ebp - 0xf4]
mov byte [ebp - 4], 0x1a
push eax
lea ecx, [ebp - 0xa8]
call fcn.00408b50
push eax
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 0x1b
push eax
push 0x98
lea eax, [ebp - 0xc4]
push eax
push ecx
call fcn.0041f440
mov ecx, eax
call fcn.0041f910
lea ecx, [ebp - 0xf4]
call fcn.0040f680
lea ecx, [ebp - 0xc4]
call fcn.0040ef30
lea ecx, [ebp - 0xdc]
call fcn.0040ef30
lea ecx, [ebp - 0xa8]
call fcn.004059f0
jmp 0x406514
push str._bcdedit.exe
lea edx, [esi + 0x30]
lea ecx, [ebp - 0xdc]
call fcn.0040c1a0
add esp, 4
lea ecx, [esi + 0x48]
push eax
call fcn.00408a40
lea ecx, [ebp - 0xdc]
call fcn.0040f680
mov al, 1
jmp 0x406516
push 0x98
lea eax, [ebp - 0xa8]
push 0
push eax
call fcn.004793f0
add esp, 4
lea ecx, [ebp - 0xa8]
call fcn.00408c30
mov edx, str.Error:
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xa8]
call fcn.0040b820
mov edx, esi
mov ecx, eax
call fcn.0040be40
mov edx, str._is_not_exist
mov ecx, eax
call fcn.0040b820
push 0x17
push str.CBackRestore::FileCheck
lea ecx, [ebp - 0xdc]
mov dword [ebp - 0xc8], 0xf
mov dword [ebp - 0xcc], 0
mov byte [ebp - 0xdc], 0
call fcn.0040f450
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xf4]
push 0xd
push str.BaRestore.cpp
mov dword [ebp - 0xe0], 0xf
mov dword [ebp - 0xe4], 0
mov byte [ebp - 0xf4], 0
call fcn.0040f450
lea eax, [ebp - 0xc4]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0xa8]
call fcn.00408b50
push eax
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 3
push eax
push 0x7f
lea eax, [ebp - 0xf4]
push eax
push ecx
call fcn.0041f440
mov ecx, eax
call fcn.0041f910
mov eax, dword [ebp - 0xb0]
cmp eax, 8
jb 0x40647e
inc eax
lea ecx, [ebp - 0xc4]
push eax
push dword [ebp - 0xc4]
call fcn.0040f5b0
xor eax, eax
mov dword [ebp - 0xb0], 7
mov word [ebp - 0xc4], ax
mov eax, dword [ebp - 0xe0]
mov dword [ebp - 0xb4], 0
cmp eax, 0x10
jb 0x4064b9
inc eax
lea ecx, [ebp - 0xf4]
push eax
push dword [ebp - 0xf4]
call fcn.0040f330
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0xe0], 0xf
mov dword [ebp - 0xe4], 0
mov byte [ebp - 0xf4], 0
cmp eax, 0x10
jb 0x4064f2
inc eax
lea ecx, [ebp - 0xdc]
push eax
push dword [ebp - 0xdc]
call fcn.0040f330
lea ecx, [ebp - 0x58]
call fcn.00408b70
mov dword [ebp - 4], 4
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], vtable.std::ios_base.0
push eax
call fcn.0042f0f8
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00475cda
mov esp, ebp
pop ebp
ret