Function at 0x405ec0
Capabilities:
Get uefi variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x455120
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x477070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov eax, dword [edi + 4]
push str.Checking_is_switch_supported
push str.UefiManager
push 0x4656cc
mov ecx, dword [eax]
push eax
mov dword [ebp - 0x64], edi
call dword [ecx]
add esp, 0x10
mov dword [ebp - 4], 0
lea eax, [ebp - 0x21]
push 1
push eax
push dword [edi + 0x10]
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
test eax, eax
je 0x406137
push ecx
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], 0
xorps xmm0, xmm0
mov ecx, edi
push eax
mov ebx, 0x14
movq qword [ebp - 0x20], xmm0
call fcn.00405ce0
xor eax, eax
mov dword [ebp - 0x40], 7
mov dword [ebp - 0x44], 0
mov word [ebp - 0x54], ax
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], eax
mov word [ebp - 0x3c], ax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
sub eax, ecx
sar eax, 1
jne 0x405f8a
push str.invalid_vector_T__subscript
call fcn.004356e8
lea eax, [ebp - 0x5c]
push eax
movzx eax, word [ecx]
mov ecx, edi
push eax
call fcn.00405ab0
mov edx, dword [edi + 4]
lea ecx, [ebp - 0x5c]
call fcn.004085e0
test al, al
je 0x405fcf
lea ecx, [ebp - 0x5c]
call fcn.00406160
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x405fc8
mov eax, dword [ebp - 0x18]
sub eax, ecx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x20]
call fcn.00405180
mov al, 1
jmp 0x406139
mov esi, 1
mov eax, dword [ebp - 0x1c]
mov edx, 0x14
mov ecx, dword [ebp - 0x20]
sub eax, ecx
sar eax, 1
cmp esi, eax
jae 0x406054
cmp bx, dx
jne 0x406054
cmp eax, esi
ja 0x405ffa
push str.invalid_vector_T__subscript
call fcn.004356e8
movzx ecx, word [ecx + esi*2]
mov dword [ebp - 0x60], ecx
cmp eax, esi
ja 0x40600f
push str.invalid_vector_T__subscript
call fcn.004356e8
movzx eax, cx
lea ecx, [ebp - 0x5c]
push ecx
push eax
mov ecx, edi
call fcn.00405ab0
mov edx, dword [edi + 4]
lea ecx, [ebp - 0x5c]
call fcn.004085e0
test al, al
je 0x406051
mov ebx, dword [ebp - 0x60]
mov eax, dword [edi + 4]
movzx edx, bx
push edx
push str.This_is_windows_boot_manager_id:__04X
mov ecx, dword [eax]
push str.UefiManager
push 0x4656cc
push eax
call dword [ecx]
add esp, 0x14
movzx ebx, si
inc esi
jmp 0x405fd4
test bx, bx
je 0x406094
cmp bx, dx
jae 0x406094
mov eax, dword [edi + 4]
push str.Setting_windows_boot_manager_as_first
push str.UefiManager
push 0x4656cc
mov ecx, dword [eax]
push eax
call dword [ecx]
add esp, 0x10
movzx eax, bx
push eax
sub esp, 0xc
lea eax, [ebp - 0x20]
mov ecx, esp
push eax
call fcn.00406530
mov ecx, edi
call fcn.004062c0
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
cmp eax, 8
jb 0x4060ac
inc eax
lea ecx, [ebp - 0x3c]
push eax
push dword [ebp - 0x3c]
call fcn.00405180
mov ecx, dword [ebp - 0x20]
xor eax, eax
mov dword [ebp - 0x28], 7
mov word [ebp - 0x3c], ax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x2c], 0
cmp eax, 8
jb 0x4060d8
inc eax
lea ecx, [ebp - 0x54]
push eax
push dword [ebp - 0x54]
call fcn.00405180
mov ecx, dword [ebp - 0x20]
xor eax, eax
mov dword [ebp - 0x40], 7
mov dword [ebp - 0x44], 0
mov word [ebp - 0x54], ax
test ecx, ecx
je 0x405fc8
mov eax, dword [ebp - 0x18]
sub eax, ecx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x20]
call fcn.00405180
mov al, 1
jmp 0x406139
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 - 0x14]
xor ecx, ebp
call fcn.00436666
mov esp, ebp
pop ebp
ret