Function at 0x4a7e60
Capabilities:
Get common file path
Get disk information
Get file size
Manipulate console buffer
Read .ini file
Set uefi variable
Terminate thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4aa5fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1ef8
call fcn.00412a50
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetDefaultCommConfigA]
push ebp
mov ebp, dword [sym.imp.MSIMG32.dll_AlphaBlend]
push esi
xor eax, eax
mov dword [esp + 0xc], eax
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x10]
cmp eax, 0x2d1ff
jge 0x4a7ebb
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_CharToOemBuffW]
mov eax, dword [esp + 0x10]
cmp dword [0x8363fc], 0x6fb
jne 0x4a7f2e
push esi
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call ebp
push 0x30
lea eax, [esp + 0x4c]
push 0
push eax
mov dword [esp + 0x50], 0
call fcn.0040b020
add esp, 0xc
push edi
lea ecx, [esp + 0x48]
push ecx
push 0
call ebx
push 0
lea edx, [esp + 0x30c]
push edx
push 0x40405c
call dword [sym.imp.KERNEL32.dll_GetProfileSectionA]
push 0
push 0
push 0x40409c
push 0x4040d4
call dword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableW]
mov eax, dword [esp + 0x10]
cmp eax, 0x1e9c85dc
jle 0x4a7f49
cmp dword [esp + 0x10], 0xc0e420
je 0x4a7f49
cmp dword [esp + 0x50], 0x9266bc0
jne 0x4a7f5b
inc eax
mov dword [esp + 0x10], eax
cmp eax, 0x7d62d
jl 0x4a7ea4
jmp 0x4a7f79
cmp dword [0x8363fc], 0x28
jne 0x4a7f79
push 0x404114
push 0x404120
push 0x40412c
call dword [sym.imp.KERNEL32.dll_WriteProfileStringA]
cmp dword [0x8363fc], 0xcf8
jne 0x4a7ff7
push 0x40414c
push 0
call fcn.00407eb5
xor esi, esi
push esi
push esi
call fcn.00413ec0
push 0x4041a4
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], esi
mov byte [esp + 0x2c], 0
call fcn.00407cf0
add esp, 0x14
push eax
push 0x4041a4
lea ecx, [esp + 0x20]
call fcn.00406110
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x7c]
push ecx
mov dword [esp + 0x1f1c], esi
call fcn.00405840
cmp dword [esp + 0x2c], 0x10
jb 0x4a7ff1
mov edx, dword [esp + 0x18]
push edx
call fcn.00407f7d
add esp, 4
push esi
call fcn.00408309
mov edi, dword [sym.imp.KERNEL32.dll_GetConsoleAliasW]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileSize]
xor esi, esi
cmp esi, 0x408
jne 0x4a801e
mov eax, 0x5d1
add dword [0x8363fc], eax
cmp dword [0x8363fc], 0xca3
jne 0x4a804f
push 0
push 0
push 0
push 0
call edi
xor eax, eax
lea edx, [esp + 0x14]
push edx
push eax
push eax
push 0x4041ac
push eax
mov dword [esp + 0x24], eax
call ebx
push 0
push 0
call ebp
inc esi
cmp esi, 0x1518d4
jl 0x4a800b
mov ecx, dword [0x8363fc]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x836364], eax
mov eax, dword [0x8363fc]
xor esi, esi
test eax, eax
je 0x4a8112
mov edi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessShutdownParameters]
cmp eax, 0xfe
jne 0x4a80d5
push 0
lea edx, [esp + 0x30c]
push edx
call edi
push 0
call ebx
push 0
push 0
call ebp
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x48]
push ecx
push 0x4041e8
call dword [sym.imp.KERNEL32.dll_BuildCommDCBAndTimeoutsW]
call fcn.004a7910
mov eax, dword [0x8363fc]
cmp eax, 0x29
jne 0x4a8109
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetProcessShutdownParameters]
mov eax, dword [0x8363fc]
inc esi
cmp esi, eax
jb 0x4a808d
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edi, 0x9682ab
lea ecx, [ecx]
cmp eax, 3
jne 0x4a8138
push 0
push 0
push 0
push 0
push 0
push 0
call esi
mov eax, dword [0x8363fc]
dec edi
jne 0x4a8120
mov esi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLargestConsoleWindowSize]
mov ebp, 0x25887
mov ebx, 0xabebc05c
mov dword [0x83636c], ebx
cmp eax, 0x222
jne 0x4a8173
push 0
lea edx, [esp + 0xf0c]
push edx
call esi
push 0
call edi
mov eax, dword [0x8363fc]
dec ebp
jne 0x4a8151
mov byte [0x4b26b0], 0
call fcn.004a7860
call fcn.004a7c30
mov ebp, dword [sym.imp.KERNEL32.dll_OpenWaitableTimerW]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFlags]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFlags]
xor esi, esi
cmp dword [0x8363fc], 0xba
jne 0x4a81b2
push 0x404200
push 0
push 0
call ebp
push 0
call edi
push 0
call ebx
cmp esi, 0x2f64
jne 0x4a81cd
mov eax, 0
add dword [0x836364], eax
inc esi
cmp esi, 0x1605a
jl 0x4a819b
mov ecx, 0x6d
mov word [0x836406], cx
mov ecx, 0x6c
mov word [0x836414], cx
mov eax, 0x69
xor ecx, ecx
push 0x836400
mov dword [0x836410], 0x6c0064
mov dword [0x83640c], 0x2e0032
mov word [0x836404], ax
mov dword [0x836400], 0x73006d
mov word [0x836416], cx
mov dword [0x836408], 0x330067
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov eax, 0x73
mov ecx, 0x6d
mov word [0x836402], ax
mov word [0x836406], cx
xor ecx, ecx
cmp dword [0x8363fc], 0xc30
mov edx, 0x33
mov eax, 0x67
mov word [0x83640a], dx
mov word [0x836416], cx
mov word [0x836408], ax
mov ecx, 0x69
mov edx, 0x6d
mov eax, 0x6c
mov dword [0x836410], 0x6c0064
mov word [0x836404], cx
mov word [0x836400], dx
mov word [0x836414], ax
mov dword [0x83640c], 0x2e0032
jne 0x4a83a1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleCP]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea eax, [esp + 0x1c8]
push eax
push 0x40423c
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0
lea edx, [esp + 0x70c]
push edx
push 0x404250
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0
call esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateActCtxW]
push 0
lea eax, [esp + 0x14]
push eax
push 0
lea ecx, [esp + 0x314]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
push 0
lea edx, [esp + 0xf0c]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x4c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetNamedPipeHandleStateA]
push 0
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
push 0x404284
call esi
push 0
lea ecx, [esp + 0x170c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VerLanguageNameW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessAffinityMask]
lea edx, [esp + 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_SetTimeZoneInformation]
push 0
call dword [sym.imp.KERNEL32.dll_ZombifyActCtx]
push 0x4042b0
call dword [sym.imp.KERNEL32.dll_DeleteVolumeMountPointW]
mov ecx, dword [esp + 0x1f0c]
pop edi
xor eax, eax
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret