Function at 0x4013a9
Capabilities:
Manipulate boot configuration

Disassembly:
push 0
push ebx
mov edx, 0xb
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x4013af
mov edx, dword [0x41205c]
push edx
push edx
push 5
call fcn.00403f9d
lea eax, [esp + 0xc]
push eax
call fcn.0040d740
push dword [esp + 8]
mov edx, 0x410422
pop ecx
call fcn.004030a0
je 0x401414
push 0xfffd
push 1
mov eax, 0x41015e
push eax
mov eax, 0x41058c
push eax
mov eax, 0x410068
push eax
push 0
call fcn.00401a42
jmp 0x4017f0
push 1
push 1
call fcn.00404005
cmp eax, dword [esp]
jne 0x401438
mov edx, str.BIOS
lea ecx, [esp + 0x18]
call fcn.00403008
jmp 0x401474
push 2
call fcn.00404005
cmp eax, dword [esp]
jne 0x401457
mov edx, str.UEFI
lea ecx, [esp + 0x18]
call fcn.00403008
jmp 0x401474
push 3
call fcn.00404005
cmp eax, dword [esp]
jne 0x401474
mov edx, 0x410574
lea ecx, [esp + 0x18]
call fcn.00403008
pop eax
mov edx, dword [0x41205c]
push edx
push edx
push 0xa
mov edx, dword [0x41205c]
push edx
push edx
push 4
call fcn.00403f9d
mov edx, dword [0x41076c]
add dword [esp], edx
call fcn.0040bc00
lea eax, [esp + 4]
push eax
call fcn.0040d740
mov edx, dword [0x41205c]
push edx
push edx
push 2
push dword [esp + 0x14]
call fcn.0040bc00
lea eax, [esp + 0x10]
push eax
call fcn.0040d740
mov edx, dword [0x41205c]
push edx
push edx
push 6
call fcn.00403f9d
lea eax, [esp + 0x14]
push eax
call fcn.0040d740
mov dword [esp + 0x20], 1
mov edx, dword [esp]
push dword [0x41205c]
push edx
call fcn.0040d7c0
mov edx, str.__l
push edx
call fcn.0040d7c0
mov edx, dword [esp + 0x14]
push edx
call fcn.0040d7c0
mov edx, str.__s
push edx
call fcn.0040d7c0
mov edx, dword [esp + 0x10]
push edx
call fcn.0040d7c0
mov edx, str.__f
push edx
call fcn.0040d7c0
mov edx, dword [esp + 0x18]
push edx
call fcn.0040d7c0
lea eax, [esp + 0x1c]
push eax
call fcn.0040d740
push 0x8e
mov eax, 0x410028
push eax
push dword [esp + 0x20]
mov eax, str.bcdboot
push eax
call fcn.0040346b
mov dword [esp + 0x24], eax
cmp dword [esp + 0x24], 0
je 0x4015c9
push dword [esp + 0x24]
call fcn.004039d0
mov dword [esp + 0x28], eax
push dword [esp + 0x24]
call fcn.004039da
and eax, eax
je 0x4015b1
push dword [esp + 0x24]
call fcn.00403a21
and eax, eax
je 0x4015af
mov edx, dword [0x41205c]
push edx
push edx
push dword [esp + 0x2c]
call fcn.00403a60
lea eax, [esp + 0x20]
push eax
call fcn.0040d740
jmp 0x40157a
push dword [esp + 0x24]
call fcn.00403a94
mov dword [esp + 0x20], eax
push dword [esp + 0x24]
call fcn.00403ab4
jmp 0x4015d1
mov dword [esp + 0x20], 1
mov ebx, dword [esp + 0x20]
and ebx, ebx
jne 0x4017c6
push 7
call fcn.00404005
mov ebx, eax
and ebx, 1
and ebx, ebx
je 0x401799
push dword [esp + 0x14]
mov edx, str.BIOS
pop ecx
call fcn.004030a0
je 0x401663
push dword [0x41205c]
push 3
mov eax, 0x410028
push eax
push dword [0x41205c]
mov edx, 0x410114
push edx
call fcn.0040d7c0
mov edx, dword [esp + 0x1c]
push edx
call fcn.0040d7c0
mov edx, str.BootBCD__set_Default_bootmenupolicy_legacy
push edx
call fcn.0040d7c0
add dword [0x41205c], 2
mov eax, str.bcdedit.exe
push eax
mov edx, dword [0x41076c]
add dword [esp + 4], edx
call fcn.0040346b
pop dword [0x41205c]
jmp 0x401799
push dword [esp + 0x14]
mov edx, str.UEFI
pop ecx
call fcn.004030a0
je 0x4016d2
push dword [0x41205c]
push 3
mov eax, 0x410028
push eax
push dword [0x41205c]
mov edx, 0x410114
push edx
call fcn.0040d7c0
mov edx, dword [esp + 0x1c]
push edx
call fcn.0040d7c0
mov edx, str.efimicrosoft_bootBCD__set_Default_bootmenupolicy_legacy
push edx
call fcn.0040d7c0
add dword [0x41205c], 2
mov eax, str.bcdedit.exe
push eax
mov edx, dword [0x41076c]
add dword [esp + 4], edx
call fcn.0040346b
pop dword [0x41205c]
jmp 0x401799
push dword [esp + 0x14]
mov edx, 0x410574
pop ecx
call fcn.004030a0
je 0x401799
push dword [0x41205c]
push 3
mov eax, 0x410028
push eax
push dword [0x41205c]
mov edx, 0x410114
push edx
call fcn.0040d7c0
mov edx, dword [esp + 0x1c]
push edx
call fcn.0040d7c0
mov edx, str.BootBCD__set_Default_bootmenupolicy_legacy
push edx
call fcn.0040d7c0
add dword [0x41205c], 2
mov eax, str.bcdedit.exe
push eax
mov edx, dword [0x41076c]
add dword [esp + 4], edx
call fcn.0040346b
pop dword [0x41205c]
push dword [0x41205c]
push 3
mov eax, 0x410028
push eax
push dword [0x41205c]
mov edx, 0x410114
push edx
call fcn.0040d7c0
mov edx, dword [esp + 0x1c]
push edx
call fcn.0040d7c0
mov edx, str.efimicrosoft_bootBCD__set_Default_bootmenupolicy_legacy
push edx
call fcn.0040d7c0
add dword [0x41205c], 2
mov eax, str.bcdedit.exe
push eax
mov edx, dword [0x41076c]
add dword [esp + 4], edx
call fcn.0040346b
pop dword [0x41205c]
push 0xfff8
push 1
mov eax, str.BCD____
push eax
mov eax, str.BCD
push eax
mov eax, 0x410068
push eax
push 0
call fcn.00401a42
jmp 0x4010e6
push 0xfff7
push 1
mov eax, str.BCD___r_n__
push eax
mov eax, 0x410436
push eax
mov eax, 0x410068
push eax
push 0
call fcn.00401a42
jmp 0x4017f0
push dword [esp + 0x1c]
call fcn.0040d820
push dword [esp + 0x10]
call fcn.0040d820
push dword [esp + 4]
call fcn.0040d820
push dword [esp + 0xc]
call fcn.0040d820
push dword [esp]
call fcn.0040d820
push dword [esp + 0x18]
call fcn.0040d820
push dword [esp + 0x14]
call fcn.0040d820
push dword [esp + 8]
call fcn.0040d820
add esp, 0x2c
pop ebx
ret