Function at 0x1066e80
Capabilities:
Get uefi variable
Set uefi variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1048
mov eax, dword [0x10a4ce0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1040], 0
mov dword [ebp - 0x1044], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x1048], eax
mov dword [ebp - 0x1038], 0
mov byte [ebp - 0x1024], 0
push 0xfff
push 0
lea eax, [ebp - 0x1023]
push eax
call fcn.01027af0
add esp, 0xc
mov dword [ebp - 0x1028], 0
mov dword [ebp - 0x102c], 1
mov byte [ebp - 0x1031], 0
mov dword [ebp - 0x1030], 0
lea ecx, [ebp - 0x1044]
push ecx
push 0xf01ff
mov edx, dword [ebp - 0x1048]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push 1
push str.SeSystemEnvironmentPrivilege
mov eax, dword [ebp - 0x1044]
push eax
call fcn.01067780
add esp, 0xc
mov byte [ebp - 0x1039], al
movzx ecx, byte [ebp - 0x1039]
test ecx, ecx
je 0x10673af
push str.PatchFvListAfu
lea edx, [ebp - 0x24]
push edx
call fcn.01071ae4
add esp, 8
push 0x1000
lea eax, [ebp - 0x1024]
push eax
push str.932f0c58_1b0c_433b_9ce2_d305fea4e5ce
lea ecx, [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
mov dword [ebp - 0x1040], eax
cmp dword [ebp - 0x1040], 0
je 0x106707e
mov edx, dword [ebp - 0x1024]
mov dword [ebp - 0x1028], edx
lea eax, [ebp - 0x1020]
mov dword [ebp - 0x1038], eax
mov dword [ebp - 0x102c], 0
jmp 0x1066fb5
mov ecx, dword [ebp - 0x102c]
add ecx, 1
mov dword [ebp - 0x102c], ecx
mov edx, dword [ebp - 0x102c]
cmp edx, dword [ebp - 0x1028]
jae 0x106707e
movzx eax, byte [0x10ad080]
test eax, eax
jne 0x1067079
push 0x10b1b18
imul ecx, dword [ebp - 0x102c], 0x64
mov edx, dword [ebp - 0x1038]
lea eax, [edx + ecx + 0x14]
push eax
call fcn.0102b02c
add esp, 8
test eax, eax
je 0x106701d
push 0x10
push 0x10b1b58
imul ecx, dword [ebp - 0x102c], 0x64
add ecx, dword [ebp - 0x1038]
push ecx
call fcn.0108deb0
add esp, 0xc
movzx edx, al
test edx, edx
je 0x1067079
push str.ERROR:_FV_already_present_of_same_GUID__n
call fcn.01072843
add esp, 4
push 0x1095fec
push 0x10ad300
call fcn.010722bb
add esp, 8
mov dword [ebp - 0x1030], eax
cmp dword [ebp - 0x1030], 0
je 0x1067071
mov eax, dword [ebp - 0x1030]
push eax
call fcn.01029815
add esp, 4
mov dword [ebp - 0x1030], 0
push 0x10ad300
call fcn.010728f2
add esp, 4
or eax, 0xffffffff
jmp 0x10673af
jmp 0x1066fa6
push 0x1000
push 0
mov ecx, 1
imul edx, ecx, 0
lea eax, [ebp + edx - 0x1024]
push eax
call fcn.01027af0
add esp, 0xc
mov dword [ebp - 0x1028], 0
push str.WindPatchFvList
lea ecx, [ebp - 0x24]
push ecx
call fcn.01071ae4
add esp, 8
push 0x1000
lea edx, [ebp - 0x1024]
push edx
push str.932f0c58_1b0c_433b_9ce2_d305fea4e5ce
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
mov dword [ebp - 0x1040], eax
cmp dword [ebp - 0x1040], 0
je 0x106722e
mov ecx, dword [ebp - 0x1024]
mov dword [ebp - 0x1028], ecx
lea edx, [ebp - 0x1020]
mov dword [ebp - 0x1038], edx
mov dword [ebp - 0x102c], 0
jmp 0x1067119
mov eax, dword [ebp - 0x102c]
add eax, 1
mov dword [ebp - 0x102c], eax
mov ecx, dword [ebp - 0x102c]
cmp ecx, dword [ebp - 0x1028]
jae 0x106722e
movzx edx, byte [0x10ad080]
test edx, edx
jne 0x10671dd
push 0x10b1b18
imul eax, dword [ebp - 0x102c], 0x64
mov ecx, dword [ebp - 0x1038]
lea edx, [ecx + eax + 0x14]
push edx
call fcn.0102b02c
add esp, 8
test eax, eax
je 0x1067181
push 0x10
push 0x10b1b58
imul eax, dword [ebp - 0x102c], 0x64
add eax, dword [ebp - 0x1038]
push eax
call fcn.0108deb0
add esp, 0xc
movzx ecx, al
test ecx, ecx
je 0x10671dd
push str.ERROR:_FV_already_present_of_same_GUID__n
call fcn.01072843
add esp, 4
push 0x1095fec
push 0x10ad300
call fcn.010722bb
add esp, 8
mov dword [ebp - 0x1030], eax
cmp dword [ebp - 0x1030], 0
je 0x10671d5
mov edx, dword [ebp - 0x1030]
push edx
call fcn.01029815
add esp, 4
mov dword [ebp - 0x1030], 0
push 0x10ad300
call fcn.010728f2
add esp, 4
or eax, 0xffffffff
jmp 0x10673af
movzx eax, byte [0x10ad080]
cmp eax, 1
jne 0x1067229
push 0x10b1b18
imul ecx, dword [ebp - 0x102c], 0x64
mov edx, dword [ebp - 0x1038]
lea eax, [edx + ecx + 0x14]
push eax
call fcn.0102b02c
add esp, 8
test eax, eax
jne 0x1067229
mov byte [ebp - 0x1031], 1
mov ecx, dword [ebp - 0x1028]
push ecx
mov edx, dword [ebp - 0x1038]
push edx
call fcn.010673c0
add esp, 8
jmp 0x106710a
movzx eax, byte [ebp - 0x1031]
cmp eax, 1
jne 0x1067295
push 0x1000
push 0
mov ecx, 1
imul edx, ecx, 0
lea eax, [ebp + edx - 0x1024]
push eax
call fcn.01027af0
add esp, 0xc
mov dword [ebp - 0x1028], 0
push str.WindPatchFvList
lea ecx, [ebp - 0x24]
push ecx
call fcn.01071ae4
add esp, 8
push 0x1000
lea edx, [ebp - 0x1024]
push edx
push str.932f0c58_1b0c_433b_9ce2_d305fea4e5ce
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
mov dword [ebp - 0x1040], eax
mov ecx, dword [ebp - 0x1028]
add ecx, 1
mov dword [ebp - 0x1028], ecx
mov edx, dword [ebp - 0x1028]
mov dword [ebp - 0x1024], edx
cmp dword [ebp - 0x1028], 1
jne 0x10672d2
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x1020]
push edx
call fcn.0102e350
add esp, 0xc
jmp 0x10672f6
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x1028]
sub edx, 1
imul eax, edx, 0x64
lea ecx, [ebp + eax - 0x1020]
push ecx
call fcn.0102e350
add esp, 0xc
mov edx, dword [ebp - 0x1024]
mov dword [ebp - 0x1028], edx
lea eax, [ebp - 0x1020]
mov dword [ebp - 0x1038], eax
push 0x1000
lea ecx, [ebp - 0x1024]
push ecx
push str.932f0c58_1b0c_433b_9ce2_d305fea4e5ce
lea edx, [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableA]
mov dword [ebp - 0x1040], eax
cmp dword [ebp - 0x1040], 0
je 0x1067347
push str.INFO:_Variable_Set_for_FV__n
call fcn.01072843
add esp, 4
jmp 0x10673ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x522
jne 0x1067361
push str.ERROR:_Privilege_not_present_to_set_the_variable__n
call fcn.01072843
add esp, 4
push 0x1095fec
push 0x10ad300
call fcn.010722bb
add esp, 8
mov dword [ebp - 0x1030], eax
cmp dword [ebp - 0x1030], 0
je 0x10673a8
mov eax, dword [ebp - 0x1030]
push eax
call fcn.01029815
add esp, 4
mov dword [ebp - 0x1030], 0
push 0x10ad300
call fcn.010728f2
add esp, 4
or eax, 0xffffffff
jmp 0x10673af
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01026ff0
mov esp, ebp
pop ebp
ret