Function at 0x40e9f7
Capabilities:
Set uefi variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [esi + 0x398], ebx
mov dword [esi + 0x17c], ebx
call fcn.004295cd
cdq
push 0xa
pop ecx
idiv ecx
mov edi, edx
call fcn.004295cd
cdq
push 0xa
pop ecx
idiv ecx
cmp edi, edx
setl al
cmp al, bl
je 0x40ea48
movzx eax, al
mov dword [ebp - 0xc], eax
fild dword [ebp - 0xc]
call fcn.004397d0
fstp dword [ebp - 0xc]
fld dword [ebp - 0xc]
jmp 0x40ea55
fldz
call fcn.004396a0
fstp dword [ebp - 0xc]
fld dword [ebp - 0xc]
call fcn.004398c0
cmp eax, ebx
je 0x40ea63
call fcn.00409c7c
lea eax, [esi + 0x180]
call fcn.004031e5
lea eax, [esi + 0x19c]
call fcn.004031e5
lea eax, [esi + 0x1b8]
call fcn.004031e5
lea eax, [esi + 0x1d8]
mov dword [esi + 0x1d4], ebx
mov dword [esi + 0x1f4], ebx
call fcn.004031e5
lea eax, [esi + 0x1f8]
call fcn.004031e5
lea eax, [ebp - 5]
mov byte [ebp - 5], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40eaaf
sub eax, edx
je 0x40eabf
call fcn.00426054
lea eax, [esi + 0x214]
call fcn.004084ec
call fcn.004295cd
cdq
push 0xa
pop ecx
idiv ecx
mov edi, edx
call fcn.004295cd
cdq
push 0xa
pop ecx
idiv ecx
cmp edi, edx
setl al
cmp al, bl
je 0x40eb01
movzx eax, al
mov dword [ebp - 0xc], eax
fild dword [ebp - 0xc]
call fcn.004397d0
fstp dword [ebp - 0xc]
fld dword [ebp - 0xc]
jmp 0x40eb0e
fldz
call fcn.004396a0
fstp dword [ebp - 0xc]
fld dword [ebp - 0xc]
call fcn.004398c0
dec eax
jne 0x40eb20
call fcn.00409a52
call fcn.00409cbf
lea eax, [esi + 0x22c]
call fcn.004084ec
lea eax, [esi + 0x244]
call fcn.004031e5
lea eax, [esi + 0x260]
call fcn.004031e5
lea eax, [esi + 0x288]
mov dword [esi + 0x280], ebx
mov dword [esi + 0x284], ebx
call fcn.004031e5
lea eax, [esi + 0x2a4]
call fcn.004031e5
lea edi, [esi + 0x2c0]
mov ebx, dword [edi + 0x10]
lea esi, [ebp - 0x10]
call fcn.00419c39
mov ebx, dword [edi + 0xc]
lea esi, [ebp - 0x18]
call fcn.00419c39
push dword [ebp - 0xc]
lea eax, [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push eax
push edi
call fcn.0041874c
call fcn.004295cd
cdq
push 0x14
pop ecx
idiv ecx
mov esi, edx
inc esi
call fcn.004295cd
cdq
idiv esi
cmp edx, esi
jle 0x40ebb4
xor eax, eax
inc eax
jmp 0x40ebbb
mov eax, esi
cdq
idiv esi
mov eax, edx
dec eax
jne 0x40ebc8
call fcn.00426054
call fcn.00409d45
mov esi, dword [ebp + 8]
lea eax, [esi + 0x2d8]
call fcn.0041810a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
push ebx
mov edi, eax
call fcn.0042a8e7
mov dword [ebp - 0xc], edi
fild dword [ebp - 0xc]
pop ecx
mov dword [ebp + 8], eax
test edi, edi
jge 0x40ebfa
fadd qword [0x44b078]
call fcn.004396a0
fild dword [ebp + 8]
mov eax, dword [ebp + 8]
test eax, eax
jge 0x40ec0f
fadd qword [0x44b078]
fcompp
fnstsw ax
test ah, 5
jp 0x40ec23
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegNotifyChangeKeyValue]
lea eax, [esi + 0x30c]
mov dword [esi + 0x308], ebx
call fcn.004031e5
lea eax, [esi + 0x328]
call fcn.004031e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ebx
shr edi, 0x18
call fcn.0042a8e7
imul eax, eax, 0x63
pop ecx
cmp edi, eax
jbe 0x40ec6c
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableA]
call fcn.00409db6
call fcn.00409e44
lea eax, [esi + 0x344]
call fcn.004031e5
lea eax, [esi + 0x360]
call fcn.004031e5
lea eax, [esi + 0x37c]
call fcn.004031e5
pop edi
mov dword [esi + 0x3a0], ebx
mov dword [esi + 0x39c], 1
pop esi
xor eax, eax
pop ebx
leave
ret 4