Function at 0x40b2e0
Capabilities:
Check for unexpected memory writes
Copy file
Create mailslot
Enumerate gui resources
Identify system language via api
Manipulate console buffer
Move file
Print debug messages
Read .ini file
Set uefi variable

Disassembly:
mov eax, 0x1850
call fcn.0040c780
cmp dword [0x4840a4], 0x177
jne 0x40b325
push 0
call fcn.0040c730
push 0
push 0
call fcn.0040c4e0
push 0
call fcn.0040c210
push 0
call fcn.0040c190
push 0
call fcn.0040bf90
push 0
call fcn.0040be50
add esp, 0x1c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetBinaryTypeA]
xor eax, eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesA]
mov dword [esp + 0x10], eax
jmp 0x40b350
cmp dword [0x4840a4], 0x47
jne 0x40b46a
lea eax, [esp + 0x28]
push eax
push 0
call esi
push 0
lea ecx, [esp + 0x1464]
push ecx
call edi
lea edx, [esp + 0x2c]
push edx
call ebx
push 0
call ebp
push 0
lea eax, [esp + 0x464]
push eax
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
xor edx, edx
xor ecx, ecx
lea eax, [esp + 0x24]
push eax
mov word [esp + 0x24], cx
mov word [esp + 0x26], dx
mov ecx, dword [esp + 0x24]
push ecx
push edx
push edx
push edx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
push 0
call dword [sym.imp.KERNEL32.dll_AddAtomA]
push 0
lea edx, [esp + 0x20]
push edx
push 0
lea eax, [esp + 0x6c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0
lea ecx, [esp + 0xc64]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_FindNextVolumeMountPointW]
xor eax, eax
xor edx, edx
lea ecx, [esp + 0x18]
push ecx
mov word [esp + 0x18], dx
mov word [esp + 0x1a], ax
mov edx, dword [esp + 0x18]
push edx
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetProcessShutdownParameters]
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetProcessAffinityMask]
push 0x4014b4
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerW]
call dword [sym.imp.KERNEL32.dll_AreFileApisANSI]
push 0
call dword [sym.imp.KERNEL32.dll_CancelDeviceWakeupRequest]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeA]
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov eax, dword [esp + 0x10]
cmp eax, 0x6a1
je 0x40b483
inc eax
cmp eax, 0x1137e56
mov dword [esp + 0x10], eax
jl 0x40b350
jmp 0x40b48d
mov eax, dword [0x430548]
mov dword [0x4840a4], eax
mov esi, dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_GetConsoleAliasesLengthA]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ebp, dword [sym.imp.MSIMG32.dll_AlphaBlend]
xor eax, eax
mov dword [esp + 0x10], eax
lea esp, [esp]
cmp eax, 0x4d13
jge 0x40b4c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_GetBoundsRect]
cmp dword [0x4840a4], 0x6b
jne 0x40b542
push 0
call edi
push 0
push 0
push 0
push 0
call ebx
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 ecx, [esp + 0x34]
push 0
push ecx
mov dword [esp + 0x38], 0
call fcn.0040c7b0
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
push 0
push 0x4014e0
call dword [sym.imp.KERNEL32.dll_CommConfigDialogW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetProfileSectionA]
push 0
push 0
push 0x401528
push 0x401548
call dword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableW]
mov eax, dword [esp + 0x10]
inc eax
xor ecx, ecx
cmp eax, 0x180c14c3
mov dword [0x483730], ecx
mov dword [esp + 0x10], eax
jl 0x40b4b0
mov edi, dword [sym.imp.KERNEL32.dll_TlsFree]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteAtom]
mov esi, dword [sym.imp.KERNEL32.dll_EnumDateFormatsA]
mov dword [esp + 0x14], ecx
lea ebx, [ebx]
cmp ecx, 0x40d
jne 0x40b592
push 0x4840a4
call fcn.0040af80
cmp dword [0x4840a4], 0x78
jne 0x40b714
push 0
call edi
xor ecx, ecx
xor eax, eax
lea edx, [esp + 0x18]
push edx
mov word [esp + 0x14], ax
mov word [esp + 0x16], cx
mov eax, dword [esp + 0x14]
push eax
push ecx
push 0x401590
push ecx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
push 0
call ebx
push 0
call ebp
push 0x401610
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0
push 0
lea ecx, [esp + 0xc68]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetWriteWatch]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MoveFileA]
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumSystemLocalesW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll__lopen]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll__lwrite]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAdjustment]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCommState]
push 0
push 0
push 0
call esi
mov edx, dword [esp + 0x18]
push 0
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateMailslotW]
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
push 0x401650
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GlobalGetAtomNameW]
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
push 0
lea ecx, [esp + 0x464]
push ecx
push 0x40167c
push 0x4016a4
push 0x4016cc
call dword [sym.imp.KERNEL32.dll_GetProfileStringW]
push 0
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateConsoleScreenBuffer]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push 0
push 0
push 0
call esi
mov ecx, dword [esp + 0x14]
inc ecx
cmp ecx, 0x40bd22
mov dword [esp + 0x14], ecx
jl 0x40b580
call fcn.0040b050
mov edi, dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
xor esi, esi
cmp dword [0x4840a4], 0x15
jne 0x40b741
push 0
push 0
call edi
cmp esi, 0x1550
jne 0x40b753
mov eax, dword [0x430008]
mov dword [0x4840a8], eax
inc esi
cmp esi, 0x56a5e7
jl 0x40b732
mov esi, dword [sym.imp.KERNEL32.dll_EnumCalendarInfoA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ebp, dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionNamesA]
mov dword [esp + 0x10], 0x719c87
lea esp, [esp]
cmp dword [0x4840a4], 0xfd
jne 0x40b794
push 0
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
cmp dword [0x4840a4], 0x23
jne 0x40b7ec
push 0
push 0
push 0
push 0
call esi
push 0
call ebx
push 0
push 0
call ebp
push 0
push 0
lea ecx, [esp + 0xc68]
push ecx
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea edx, [esp + 0x18]
push edx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
push 0
call dword [sym.imp.KERNEL32.dll_GlobalWire]
push 0
push 0
push 0
call edi
sub dword [esp + 0x10], 1
jne 0x40b780
xor esi, esi
cmp dword [0x4840a4], esi
jbe 0x40b80f
lea ecx, [ecx]
push esi
call fcn.0040ae60
inc esi
cmp esi, dword [0x4840a4]
jb 0x40b800
call fcn.0040af90
call fcn.0040b070
cmp dword [0x4840a4], 0x1d
jne 0x40b905
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
push 0
lea ecx, [esp + 0x20]
push ecx
push 0
lea edx, [esp + 0xc6c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push 0x401704
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumResourceTypesA]
push 0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll__lwrite]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasW]
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateActCtxA]
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
call dword [sym.imp.KERNEL32.dll_GetACP]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
lea ecx, [esp + 0x464]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
push 0
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ContinueDebugEvent]
push 0x401718
push 0
lea eax, [esp + 0x68]
push eax
call edi
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthW]
call fcn.0040af60
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1850
ret 0x10