Function at 0x4a7b50
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 0x4aa497
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x21c0
call fcn.00412a30
push ebx
mov ebx, dword [sym.imp.MSIMG32.dll_AlphaBlend]
push ebp
mov ebp, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push esi
xor eax, eax
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x14]
cmp eax, 0x2d1ff
jge 0x4a7bab
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_CharToOemBuffW]
mov eax, dword [esp + 0x14]
cmp dword [0x836404], 0x6fb
jne 0x4a7c2f
push 0
call ebp
push esi
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call ebx
push 0x30
lea eax, [esp + 0xf4]
push 0
push eax
mov dword [esp + 0xf8], 0
call fcn.0040b390
add esp, 0xc
push edi
lea ecx, [esp + 0xf0]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetDefaultCommConfigA]
push 0
lea edx, [esp + 0x1d4]
push edx
push 0x404068
call dword [sym.imp.KERNEL32.dll_GetProfileSectionA]
push 0
push 0
push 0x4040ac
push 0x4040e8
call dword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableW]
mov eax, dword [esp + 0x14]
cmp eax, 0x1e9c85dc
jle 0x4a7c4d
cmp dword [esp + 0x14], 0xc0e420
je 0x4a7c4d
cmp dword [esp + 0xf8], 0x9266bc0
jne 0x4a7c5f
inc eax
mov dword [esp + 0x14], eax
cmp eax, 0x7d62d
jl 0x4a7b94
jmp 0x4a7c7d
cmp dword [0x836404], 0x28
jne 0x4a7c7d
push 0x4040fc
push 0x404114
push 0x40412c
call dword [sym.imp.KERNEL32.dll_WriteProfileStringA]
cmp dword [0x836404], 0xcf8
jne 0x4a7e57
push 0x4041a8
push 0
call fcn.00407f65
xor ebx, ebx
push ebx
push ebx
call fcn.00413eb0
push 0x4041b4
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
call fcn.00407da0
add esp, 0x14
push eax
push 0x4041b4
lea ecx, [esp + 0x28]
call fcn.004060d0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x21e4], ebx
call fcn.00405830
cmp dword [esp + 0x34], 0x10
jb 0x4a7cf8
mov edx, dword [esp + 0x20]
push edx
call fcn.0040802d
add esp, 4
call fcn.004075a1
push ebx
call fcn.00407f4e
add esp, 4
push ebx
push ebx
call fcn.00408038
push ebx
call fcn.00407d0b
add esp, 0xc
push ebx
push ebx
push ebx
push ebx
call fcn.004077d1
mov ecx, dword [esp + 0x58]
mov edx, dword [ecx + 4]
lea eax, [esp + 0xb0]
add esp, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + edx + 0x48], 0x40438c
mov dword [esp + 0x21dc], 1
test byte [esp + 0x98], 1
lea eax, [esp + 0x58]
mov dword [esp + 0x18], eax
mov dword [esp + 0x58], 0x40434c
je 0x4a7d70
mov ecx, dword [esp + 0x68]
mov eax, dword [ecx]
push eax
call fcn.0040802d
add esp, 4
mov edx, dword [esp + 0x68]
mov dword [edx], ebx
mov eax, dword [esp + 0x78]
mov dword [eax], ebx
mov ecx, dword [esp + 0x88]
mov dword [ecx], ebx
mov edx, dword [esp + 0x6c]
mov dword [edx], ebx
mov eax, dword [esp + 0x7c]
mov dword [eax], ebx
mov ecx, dword [esp + 0x8c]
mov dword [ecx], ebx
and dword [esp + 0x98], 0xfffffffe
mov dword [esp + 0x94], ebx
mov dword [esp + 0x58], 0x404304
mov byte [esp + 0x21dc], 2
mov eax, dword [esp + 0x90]
mov ebp, eax
cmp eax, ebx
je 0x4a7e11
mov edi, dword [eax]
cmp edi, ebx
je 0x4a7e08
push ebx
lea ecx, [esp + 0x18]
call fcn.00406e9d
mov eax, dword [edi + 4]
cmp eax, ebx
jbe 0x4a7de6
cmp eax, 0xffffffff
jae 0x4a7de6
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
not esi
lea ecx, [esp + 0x14]
and esi, edi
call fcn.00406ec5
cmp esi, ebx
je 0x4a7e08
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
push ebp
call fcn.0040802d
add esp, 4
lea ecx, [esp + 0x5c]
mov byte [esp + 0x21dc], 1
call fcn.00406ef6
mov dword [esp + 0x21dc], 0xffffffff
mov ecx, dword [esp + 0x48]
mov edx, dword [ecx + 4]
lea eax, [esp + 0xa0]
mov dword [esp + edx + 0x48], 0x404344
push eax
mov dword [esp + 0xa4], 0x4042f4
call fcn.004069cc
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_GetConsoleAliasW]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileSize]
xor esi, esi
cmp esi, 0x408
jne 0x4a7e7e
mov eax, 0x5d1
add dword [0x836404], eax
cmp dword [0x836404], 0xca3
jne 0x4a7eaf
push 0
push 0
push 0
push 0
call edi
xor ecx, ecx
lea eax, [esp + 0x18]
push eax
push ecx
push ecx
push 0x4041c8
push ecx
mov dword [esp + 0x28], ecx
call ebx
push 0
push 0
call ebp
inc esi
cmp esi, 0x1518d4
jl 0x4a7e6b
mov edx, dword [0x836404]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x83636c], eax
mov eax, dword [0x836404]
xor esi, esi
test eax, eax
je 0x4a7f7d
mov edi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessId]
mov ebp, dword [sym.imp.KERNEL32.dll_SetLastError]
cmp eax, 0xfe
jne 0x4a7f40
push 0
lea eax, [esp + 0x1d4]
push eax
call edi
push 0
call ebx
push 0
call ebp
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessShutdownParameters]
lea ecx, [esp + 0x20]
xor eax, eax
push ecx
lea edx, [esp + 0xf0]
push edx
push 0x4041e0
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_BuildCommDCBAndTimeoutsA]
call fcn.004a7600
mov eax, dword [0x836404]
cmp eax, 0x29
jne 0x4a7f74
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 [0x836404]
inc esi
cmp esi, eax
jb 0x4a7eed
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edi, 0x9682ab
cmp eax, 3
jne 0x4a7fa0
push 0
push 0
push 0
push 0
push 0
push 0
call esi
mov eax, dword [0x836404]
dec edi
jne 0x4a7f88
mov esi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLargestConsoleWindowSize]
mov ebp, 0x25887
mov ebx, 0xabebc05c
lea esp, [esp]
mov dword [0x836374], ebx
cmp eax, 0x222
jne 0x4a7fe2
push 0
lea eax, [esp + 0x11d4]
push eax
call esi
push 0
call edi
mov eax, dword [0x836404]
dec ebp
jne 0x4a7fc0
mov byte [0x4b26b8], 0
call fcn.004a7550
call fcn.004a7920
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalFix]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFlags]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFlags]
xor esi, esi
lea ebx, [ebx]
cmp dword [0x836404], 0xba
jne 0x4a8035
lea ecx, [esp + 0xec]
push ecx
call ebp
push 0x4041f4
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerW]
push 0
call edi
push 0
call ebx
cmp esi, 0x2f64
jne 0x4a8050
mov eax, 0
add dword [0x83636c], eax
inc esi
cmp esi, 0x1605a
jl 0x4a8010
mov eax, 0x6d
mov word [0x83640e], ax
mov eax, 0x6c
mov word [0x83641c], ax
mov edx, 0x69
xor eax, eax
push 0x836408
mov dword [0x836418], 0x6c0064
mov dword [0x836414], 0x2e0032
mov word [0x83640c], dx
mov dword [0x836408], 0x73006d
mov word [0x83641e], ax
mov dword [0x836410], 0x330067
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, 0x73
mov eax, 0x6d
mov word [0x83640a], dx
mov word [0x83640e], ax
xor eax, eax
cmp dword [0x836404], 0xc30
mov ecx, 0x33
mov edx, 0x67
mov word [0x836412], cx
mov word [0x83641e], ax
mov word [0x836410], dx
mov eax, 0x69
mov ecx, 0x6d
mov edx, 0x6c
mov dword [0x836418], 0x6c0064
mov word [0x83640c], ax
mov word [0x836408], cx
mov word [0x83641c], dx
mov dword [0x836414], 0x2e0032
jne 0x4a8224
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 edx, [esp + 0x1d0]
push edx
push 0x404230
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0
lea ecx, [esp + 0x9d4]
push ecx
push 0x404240
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0
call esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateActCtxW]
push 0
lea edx, [esp + 0x20]
push edx
push 0
lea eax, [esp + 0x5dc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
push 0
lea ecx, [esp + 0x11d4]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x58]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetNamedPipeHandleStateA]
push 0
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
push 0x404270
call esi
push 0
lea eax, [esp + 0x19d4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VerLanguageNameW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessAffinityMask]
lea ecx, [esp + 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_DeactivateActCtx]
push 0x404290
call dword [sym.imp.KERNEL32.dll_DeleteVolumeMountPointW]
mov ecx, dword [esp + 0x21d4]
pop edi
xor eax, eax
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret