Function at 0x401380
Capabilities:
Delete file
Get common file path
Get disk information
Get process heap flags
Terminate process
Write file on windows

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x574
mov dword [ebp - 0x544], edx
mov dword [esp], str.WINECONFIGDIR
call dword [sym.imp.ucrtbase.dll__wgetenv]
mov esi, eax
call dword [sym.imp.kernel32.dll_GetLogicalDrives]
mov dword [ebp - 0x540], eax
test esi, esi
je 0x4013ea
mov dword [esp], esi
call sub.kernel32.dll_wine_get_unix_file_name
mov esi, eax
test eax, eax
je 0x4013ea
lea edi, [ebp - 0x420]
mov dword [esp], 0x104
mov dword [esp + 4], edi
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
test eax, eax
jne 0x4013f6
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
lea eax, [ebp - 0x218]
xor ecx, ecx
mov dword [esp + 4], 0x40502c
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
sub esp, 0x10
test eax, eax
je 0x4013ea
mov dword [esp + 4], edi
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
push edx
push edx
test eax, eax
je 0x4013ea
lea eax, [ebp - 0x524]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetShortPathNameA]
sub esp, 0xc
test eax, eax
je 0x4013ea
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_GetShortPathNameW]
xor eax, eax
sub esp, 0xc
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
lea eax, [ebp - 0x218]
mov dword [esp + 0x10], 2
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x4013ea
mov dword [ebp - 0x54c], eax
mov eax, dword [sym.imp.ucrtbase.dll_strlen]
mov dword [esp], esi
mov dword [ebp - 0x550], eax
call eax
mov edx, dword [ebp - 0x54c]
mov ecx, edi
imul eax, eax, 0x1a
mov dword [ebp - 0x548], eax
jmp 0x4014da
add ecx, 2
cmp word [ecx], 0
jne 0x4014d7
lea eax, [ebp - 0x524]
mov dword [ebp - 0x55c], edx
mov dword [ebp - 0x558], ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x550]
call eax
mov ecx, dword [ebp - 0x544]
mov dword [ebp - 0x54c], eax
mov dword [esp], ecx
mov eax, dword [ebp - 0x550]
call eax
mov ecx, dword [ebp - 0x558]
mov dword [ebp - 0x554], eax
mov edx, dword fs:[0x18]
sub ecx, edi
mov eax, ecx
mov ecx, dword [ebp - 0x548]
sar eax, 1
lea eax, [ecx + eax*4 + 0x299]
mov ecx, dword [ebp - 0x54c]
add eax, ecx
mov ecx, dword [ebp - 0x554]
add eax, ecx
xor ecx, ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov dword [esp + 4], str._autoexec__n
mov dword [ebp - 0x54c], eax
mov dword [esp], eax
call fcn.004012b0
mov ecx, dword [ebp - 0x54c]
mov edx, dword [ebp - 0x55c]
add eax, ecx
mov ecx, 0x19
test dword [ebp - 0x540], 0x2000000
mov dword [ebp - 0x548], eax
je 0x4015b5
sub ecx, 1
jb 0x4015e4
mov eax, 1
shl eax, cl
test dword [ebp - 0x540], eax
jne 0x4015a1
add ecx, 0x61
mov dword [ebp - 0x554], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str.mount__z__c_n
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call fcn.004012b0
mov edx, dword [ebp - 0x554]
add dword [ebp - 0x548], eax
mov dword [ebp - 0x554], ebx
xor ecx, ecx
mov ebx, edx
mov eax, 1
shl eax, cl
test dword [ebp - 0x540], eax
je 0x401634
mov dword [ebp - 0x558], ecx
lea eax, [ecx + 0x61]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], eax
mov dword [esp + 8], eax
mov dword [esp + 4], str.mount__c__s_dosdevices__c:_n
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call fcn.004012b0
mov ecx, dword [ebp - 0x558]
add dword [ebp - 0x548], eax
add ecx, 1
cmp ecx, 0x1a
jne 0x4015ee
movzx eax, word [ebp - 0x420]
mov dword [ebp - 0x540], ebx
mov ebx, dword [ebp - 0x554]
mov dword [esp + 4], str._c:_ncd
mov dword [esp + 8], eax
mov esi, dword [ebp - 0x548]
mov dword [esp], esi
call fcn.004012b0
mov edx, dword [ebp - 0x540]
add esi, eax
mov eax, edi
jmp 0x401678
add eax, 2
cmp word [eax], 0
jne 0x401675
sub eax, edi
mov dword [ebp - 0x540], edx
xor ecx, ecx
xor edi, edi
sar eax, 1
mov dword [esp + 0x1c], ecx
shl eax, 2
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x41c]
mov dword [esp + 0x10], esi
mov dword [esp + 4], edi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], eax
mov dword [esp], 0xfdf2
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
lea esi, [esi + eax - 1]
sub esp, 0x20
mov dword [esp], esi
mov dword [esp + 4], str._nconfig__securemode_n
call fcn.004012b0
add esi, eax
mov eax, dword [ebp - 0x544]
mov dword [esp + 4], str._s__s_n
mov dword [esp], esi
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x524]
mov dword [esp + 8], eax
call fcn.004012b0
mov dword [esp + 4], str.exit_n
add eax, esi
mov dword [esp], eax
call fcn.004012b0
mov edi, dword [ebp - 0x54c]
mov dword [esp], edi
mov esi, dword [ebp - 0x550]
call esi
lea ecx, [ebp - 0x53c]
xor edx, edx
mov dword [esp + 4], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x540]
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_WriteFile]
mov edx, dword [ebp - 0x540]
sub esp, 0x14
test eax, eax
jne 0x4017b6
mov dword [esp], edx
mov esi, 0xc0000034
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
lea eax, [ebp - 0x218]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
push edx
mov ecx, dword [ebp - 0x54c]
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
xor ecx, ecx
mov dword [esp + 4], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov dword [esp + 4], ebx
mov dword [esp], str.winevdm:__s_is_a_DOS_application__you_need_to_install_DOSBox._n
call fcn.00401360
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp], edi
call esi
cmp eax, dword [ebp - 0x53c]
mov edx, dword [ebp - 0x540]
jne 0x401756
lea eax, [ebp - 0x218]
mov edi, str.dosbox
xor esi, esi
mov dword [esp], eax
call sub.kernel32.dll_wine_get_unix_file_name
mov ecx, str._userconf
movd xmm0, edi
mov dword [ebp - 0x528], esi
movd xmm1, ecx
mov dword [ebp - 0x52c], eax
lea eax, [ebp - 0x538]
punpckldq xmm0, xmm1
mov dword [ebp - 0x530], str._conf
movq qword [ebp - 0x538], xmm0
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [sym.imp.ntdll.dll___wine_unix_spawnvp]
push edi
mov esi, eax
push edi
mov edx, dword [ebp - 0x540]
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
lea eax, [ebp - 0x218]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
xor edx, edx
push eax
mov ecx, dword [ebp - 0x54c]
mov eax, dword fs:[0x18]
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
test esi, esi
jns 0x4017ad
jmp 0x40179d