Function at 0x407870
Capabilities:
Get uefi variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47aac3
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x4a62e4]
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 edi, ecx
mov dword [ebp - 0x60], edi
xor eax, eax
mov dword [ebp - 0x18], 0
mov ebx, 2
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push str.Kernel32.dll
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
mov dword [ebp - 0x64], esi
test esi, esi
je 0x4079d5
push str.GetFirmwareType
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4079d5
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0
push ecx
call eax
call fcn.0042fcb0
mov ecx, eax
push 1
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x4079bf
push 0x44
push str.d:_buildlib_commonwin11_update_assistant_srccheckwin11_check.cpp
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], al
call fcn.0040e510
push 3
push 0x482dd8
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
call fcn.0040e510
mov byte [ebp - 4], bl
call fcn.0042fcb0
mov edi, eax
lea ecx, [ebp - 0xfc]
push 0x5b
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00405aa0
mov esi, eax
push 0x482ddc
push esi
mov byte [ebp - 4], 3
call fcn.00403950
add esp, 8
mov ecx, esi
push dword [ebp - 0x5c]
call fcn.00406c20
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0xfc]
call fcn.00406fb0
lea ecx, [ebp - 0x40]
call fcn.00406570
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0
call fcn.00406570
mov esi, dword [ebp - 0x64]
mov edi, dword [ebp - 0x60]
mov eax, dword [ebp - 0x5c]
cmp eax, 3
ja case.default.0x4079c7
jmp dword [eax*4 + 0x407a90]
mov ebx, 2
jmp case.default.0x4079c7
push 0
push 0
push str.00000000_0000_0000_0000_000000000000
push 0x482a94
call dword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 1
jne case.0x4079c7.2
push 6
xor ebx, ebx
push str.Legacy
jmp 0x407a0b
push 4
push str.UEFI
mov ebx, 1
lea ecx, [ebp - 0x28]
call fcn.0040e600
test esi, esi
je 0x407a1e
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 0x18
lea eax, [ebp - 0x28]
mov ecx, esp
push eax
call fcn.00405810
push ebx
push 7
mov ecx, edi
call fcn.0040c040
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x407a6c
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407a62
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407a8a
push edx
push ecx
call fcn.00442ea6
add esp, 8
mov al, 1
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.00443153
mov esp, ebp
pop ebp
ret
call fcn.00453ee9
nop
into
jns 4225747
add ah, dh
jns 0x407ad7
add bh, bh
jns 0x407adb
add dh, cl
jns 0x407adf
add byte [ebp - 0x75], dl
in al, dx
add byte [eax], al
rcl byte [eax], 0x89
inc ebp
invalid