Function at 0x40d010
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
sub esp, 0x414
mov eax, dword [0x46be4c]
xor eax, esp
mov dword [esp + 0x410], eax
cmp dword [esp + 0x420], 0
push ebx
mov ebx, dword [sym.imp.USER32.dll_MessageBoxA]
push ebp
mov ebp, dword [esp + 0x420]
push esi
mov esi, dword [esp + 0x428]
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
je 0x40d06c
push esi
lea eax, [esp + 0x14]
push str.MonitorName:__s_
push eax
call edi
add esp, 0xc
push 0
push str.DeleteLanguageMonitor
lea ecx, [esp + 0x18]
push ecx
push 0
call ebx
call fcn.004048c0
cmp eax, 0xa
jne 0x40d08d
push str.SPOOLER
call fcn.00404f90
push str.SPOOLER
call fcn.0040c410
add esp, 8
push esi
push 0
push 0
call sub.WINSPOOL.DRV_DeleteMonitorA
test eax, eax
jne 0x40d0a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
jmp 0x40d307
cmp dword [esp + 0x430], 0
je 0x40d0d2
push esi
lea edx, [esp + 0x14]
push str.WinAPI_DeleteMonitor__OK_n_Monitor_Point:__d_
push edx
call edi
add esp, 0xc
push 0
push str.DeleteLanguageMonitor
lea eax, [esp + 0x18]
push eax
push 0
call ebx
push 0x104
lea ecx, [esp + 0x21c]
push 0
push ecx
call fcn.004413c0
add esp, 0xc
push 0x104
lea edx, [esp + 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esp + eax + 0x217], 0x5c
push ebp
je 0x40d12c
lea ecx, [esp + 0x21c]
push ecx
push 0x45ce28
lea edx, [esp + 0x328]
push edx
jmp 0x40d141
lea eax, [esp + 0x21c]
push eax
push 0x45ccb8
lea ecx, [esp + 0x328]
push ecx
call edi
add esp, 0x10
cmp dword [esp + 0x430], 0
je 0x40d177
lea edx, [esp + 0x31c]
push edx
lea eax, [esp + 0x14]
push str.Delete_File:__s_
push eax
call edi
add esp, 0xc
push 0
push str.DeleteLanguageMonitor
lea ecx, [esp + 0x18]
push ecx
push 0
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
lea edx, [esp + 0x334]
push edx
call esi
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40d2d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40d2d3
cmp eax, 3
je 0x40d2d3
push 0x104
lea eax, [esp + 0x118]
push 0
push eax
call fcn.004413c0
add esp, 0xc
push 0x104
lea ecx, [esp + 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edx, [esp + 0x114]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push str.WININIT.INI
lea eax, [esp + 0x118]
push 0x104
push eax
call fcn.00442464
add esp, 0xc
cmp dword [esp + 0x430], 0
je 0x40d23f
lea ecx, [esp + 0x114]
push ecx
lea edx, [esp + 0x14]
push str.INITIAL_File:__s_
push edx
call edi
add esp, 0xc
push 0
push str.DeleteLanguageMonitor
lea eax, [esp + 0x18]
push eax
push 0
call ebx
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea ecx, [esp + 0x12c]
push ecx
call esi
cmp eax, 0xffffffff
jne 0x40d278
cmp dword [esp + 0x430], 0
je 0x40d2d3
push 0
push str.DeleteLanguageMonitor
push str.Wininit.ini_OPEN_ERROR
jmp 0x40d2cf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x114]
push edx
lea eax, [esp + 0x320]
push eax
push str.NULL
push str.rename
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x40d2d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x430], 0
je 0x40d2d3
push eax
lea ecx, [esp + 0x14]
push str.WritePrivateProfileString_Error:_d
push ecx
call edi
add esp, 0xc
push 0
push str.DeleteLanguageMonitor
lea edx, [esp + 0x18]
push edx
push 0
call ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x31c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, eax
test esi, esi
jne 0x40d305
cmp dword [esp + 0x430], eax
je 0x40d305
push eax
push str.DeleteLanguageMonitor
push str.WinAPI_DeleteFile__ERROR
push eax
call ebx
mov eax, esi
mov ecx, dword [esp + 0x420]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044027a
add esp, 0x414
ret