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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x57c
mov dword [esp + 0x24], edx
mov dword [esp], str.WINECONFIGDIR
call dword [sym.imp.ucrtbase.dll__wgetenv]
mov edi, eax
call dword [sym.imp.kernel32.dll_GetLogicalDrives]
test edi, edi
je 0x4013b8
mov dword [esp], edi
mov esi, eax
call sub.kernel32.dll_wine_get_unix_file_name
mov edi, eax
test eax, eax
je 0x4013b8
lea ebp, [esp + 0x160]
mov dword [esp], 0x104
mov dword [esp + 4], ebp
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
test eax, eax
jne 0x4013c3
add esp, 0x57c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x368]
xor ecx, ecx
mov dword [esp + 4], 0x40502c
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp], ebp
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
sub esp, 0x10
test eax, eax
je 0x4013b8
mov dword [esp + 4], ebp
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
push edx
push edx
test eax, eax
je 0x4013b8
lea eax, [esp + 0x5c]
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 0x4013b8
mov dword [esp + 8], 0x104
mov dword [esp + 4], ebp
mov dword [esp], ebp
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, [esp + 0x368]
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 0x4013b8
mov dword [esp + 0x2c], eax
mov eax, dword [sym.imp.ucrtbase.dll_strlen]
mov dword [esp], edi
mov dword [esp + 0x30], eax
call eax
mov edx, dword [esp + 0x2c]
mov ecx, ebp
imul eax, eax, 0x1a
mov dword [esp + 0x28], eax
jmp 0x40149f
add ecx, 2
cmp word [ecx], 0
jne 0x40149c
lea eax, [esp + 0x5c]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], ecx
mov dword [esp], eax
mov eax, dword [esp + 0x30]
call eax
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
mov dword [esp], ecx
call eax
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x34], eax
mov edx, dword fs:[0x18]
sub ecx, ebp
mov eax, ecx
mov ecx, dword [esp + 0x28]
sar eax, 1
lea eax, [ecx + eax*4 + 0x299]
mov ecx, dword [esp + 0x2c]
add eax, ecx
mov ecx, dword [esp + 0x34]
add eax, ecx
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], 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 [esp], eax
mov dword [esp + 0x2c], eax
call fcn.00401290
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x3c]
add eax, ecx
test esi, 0x2000000
mov ecx, 0x19
mov dword [esp + 0x28], eax
je 0x401552
sub ecx, 1
jb 0x401579
mov eax, 1
shl eax, cl
test eax, esi
jne 0x401542
mov eax, dword [esp + 0x28]
add ecx, 0x61
mov dword [esp + 4], str.mount__z__c_n
mov dword [esp + 8], ecx
mov dword [esp + 0x34], edx
mov dword [esp], eax
call fcn.00401290
mov edx, dword [esp + 0x34]
add dword [esp + 0x28], eax
mov dword [esp + 0x34], ebx
xor ecx, ecx
mov ebx, edx
mov eax, 1
shl eax, cl
test eax, esi
je 0x4015bb
lea eax, [ecx + 0x61]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 4], str.mount__c__s_dosdevices__c:_n
mov dword [esp + 0x38], ecx
mov dword [esp], eax
call fcn.00401290
mov ecx, dword [esp + 0x38]
add dword [esp + 0x28], eax
add ecx, 1
cmp ecx, 0x1a
jne 0x401581
mov esi, dword [esp + 0x28]
mov dword [esp + 4], str._c:_ncd
movzx eax, word [esp + 0x160]
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00401290
mov edx, dword [esp + 0x38]
add esi, eax
mov eax, ebp
jmp 0x4015f8
add eax, 2
cmp word [eax], 0
jne 0x4015f5
sub eax, ebp
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x28], edx
sar eax, 1
mov dword [esp + 0x1c], ecx
xor ebp, ebp
shl eax, 2
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x164]
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.00401290
mov dword [esp + 4], str._s__s_n
add esi, eax
mov eax, dword [esp + 0x24]
mov dword [esp], esi
mov dword [esp + 0xc], eax
lea eax, [esp + 0x5c]
mov dword [esp + 8], eax
call fcn.00401290
mov dword [esp + 4], str.exit_n
add esi, eax
mov dword [esp], esi
call fcn.00401290
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov dword [esp], esi
call edi
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x44]
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edx
mov dword [esp + 0x24], edx
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
mov edx, dword [esp + 0x24]
jne 0x40172a
mov dword [esp], edx
mov esi, 0xc0000034
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
lea eax, [esp + 0x368]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
push edx
mov ecx, dword [esp + 0x2c]
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.00401340
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp], esi
call edi
cmp eax, dword [esp + 0x44]
mov edx, dword [esp + 0x24]
jne 0x4016cb
lea eax, [esp + 0x368]
mov esi, str.dosbox
mov dword [esp], eax
call sub.kernel32.dll_wine_get_unix_file_name
mov ecx, str._userconf
movd xmm0, esi
xor esi, esi
mov dword [esp + 0x54], eax
lea eax, [esp + 0x48]
movd xmm1, ecx
mov dword [esp + 4], 1
punpckldq xmm0, xmm1
mov dword [esp], eax
movq qword [esp + 0x48], xmm0
mov dword [esp + 0x58], esi
mov dword [esp + 0x50], str._conf
call sub.ntdll.dll___wine_unix_spawnvp
push edi
mov esi, eax
push edi
mov edx, dword [esp + 0x24]
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_CloseHandle]
push ebp
lea eax, [esp + 0x368]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
xor edx, edx
push eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
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 0x401721
jmp 0x401711