Function at 0x40420a
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get file attributes
Query environment variable
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4dc
mov eax, dword [0x4500e4]
xor eax, esp
mov dword [esp + 0x4d8], eax
push ebx
push esi
mov esi, dword [ebp + 0x10]
lea eax, [esp + 0x2d4]
push edi
push 0x104
push eax
xor ebx, ebx
push str._TEMP_
mov dword [esp + 0x7c], ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x404267
push ecx
lea edx, [esp + 0x2dc]
lea ecx, [esp + 0x14]
call fcn.0040d3a8
pop ecx
lea ecx, [esp + 0x10]
call fcn.0040868f
push 7
pop edi
push esi
lea ecx, [esp + 0x5c]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], edi
call fcn.00404f18
lea ecx, [esp + 0x58]
call fcn.00401c63
mov ecx, dword [esp + 0x6c]
mov bl, al
cmp ecx, 8
jb 0x4042d1
mov eax, dword [esp + 0x58]
lea ecx, [ecx*2 + 2]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], eax
cmp ecx, 0x1000
jb 0x4042c8
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x58]
push eax
call fcn.0040129b
mov eax, dword [esp + 0x5c]
pop ecx
pop ecx
mov ecx, dword [esp + 0x50]
push ecx
push eax
call fcn.00420b09
pop ecx
pop ecx
test bl, bl
jne 0x40434e
xor ebx, ebx
mov dword [esp + 0x6c], edi
push esi
lea ecx, [esp + 0x5c]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x6c], ebx
call fcn.00404f18
push ecx
push str._restoreAccessToTempLocations
lea ecx, [esp + 0x60]
call fcn.00404ce0
mov ecx, dword [esp + 0x6c]
mov edi, eax
cmp ecx, 8
jb 0x404344
mov eax, dword [esp + 0x58]
lea ecx, [ecx*2 + 2]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
cmp ecx, 0x1000
jb 0x40433b
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0040129b
mov eax, dword [esp + 0x58]
pop ecx
pop ecx
mov ecx, dword [esp + 0x54]
push ecx
push eax
call fcn.00420b09
pop ecx
pop ecx
cmp edi, 0xffffffff
je 0x404367
call fcn.00402db0
xor eax, eax
mov ecx, dword [esp + 0x4e4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00420acb
mov esp, ebp
pop ebp
ret 0x10
push 7
pop edi
push esi
lea ecx, [esp + 0x5c]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], edi
call fcn.00404f18
lea ecx, [esp + 0x58]
call fcn.004030e8
mov eax, dword [esp + 0x6c]
cmp eax, 8
jb 0x4043ce
mov ecx, dword [esp + 0x58]
lea eax, [eax*2 + 2]
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], ecx
cmp eax, 0x1000
jb 0x4043c5
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0040129b
mov eax, dword [esp + 0x5c]
pop ecx
pop ecx
mov ecx, dword [esp + 0x50]
push eax
push ecx
call fcn.00420b09
pop ecx
pop ecx
push esi
lea ecx, [esp + 0x5c]
mov byte [esp + 0x13], bl
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], edi
call fcn.00404f18
lea edx, [esp + 0xf]
lea ecx, [esp + 0x58]
call fcn.00403132
mov ecx, dword [esp + 0x6c]
mov edi, eax
cmp ecx, 8
jb 0x40443d
mov eax, dword [esp + 0x58]
lea ecx, [ecx*2 + 2]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
cmp ecx, 0x1000
jb 0x404434
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0040129b
mov eax, dword [esp + 0x58]
pop ecx
pop ecx
mov ecx, dword [esp + 0x54]
push ecx
push eax
call fcn.00420b09
pop ecx
pop ecx
test edi, edi
je 0x40434e
cmp edi, 0x4de
je 0x40445a
cmp byte [esp + 0xf], bl
je 0x40445a
mov eax, edi
jmp 0x404350
push esi
lea ecx, [esp + 0x5c]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], 7
call fcn.00404f18
push ecx
push str._noprefetch
lea ecx, [esp + 0x60]
call fcn.00404ce0
mov ecx, dword [esp + 0x6c]
mov esi, eax
cmp ecx, 8
jb 0x4044cb
mov eax, dword [esp + 0x58]
lea ecx, [ecx*2 + 2]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
cmp ecx, 0x1000
jb 0x4044c2
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0040129b
mov eax, dword [esp + 0x58]
pop ecx
pop ecx
mov ecx, dword [esp + 0x54]
push ecx
push eax
call fcn.00420b09
pop ecx
pop ecx
xor ebx, ebx
inc ebx
cmp esi, 0xffffffff
jne 0x40454b
lea ecx, [esp + 0x54]
call fcn.0040174a
cmp eax, 0x454c30
je 0x4044ee
mov ecx, dword [eax]
and dword [eax], 0
push ecx
call fcn.004049dc
cmp dword [0x454c30], 0
lea ecx, [esp + 0x54]
setne bl
call fcn.004018ad
test bl, bl
je 0x404548
push 8
call fcn.00420ad9
mov esi, eax
pop ecx
push 0x28
and dword [esi], 0
and dword [esi + 4], 0
call fcn.00420ad9
xor ebx, ebx
pop ecx
inc ebx
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov byte [eax + 0xc], bl
mov byte [eax + 0xd], bl
push esi
mov dword [esi], eax
call fcn.00404996
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ecx, eax
call fcn.00403d6d
jmp 0x40454b
xor ebx, ebx
inc ebx
call fcn.00403fbf
lea eax, [esp + 0x78]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edi, [esp + 0x78]
lea edi, [edi + eax*2]
or eax, 0xffffffff
mov dword [esp + 0x54], eax
lea eax, [esp + 0x78]
push eax
mov dword [esp + 0x54], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4045c2
push 0
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4045c2
lea ecx, [esp + 0x50]
call fcn.00408df6
xor eax, eax
push eax
push 0x4000000
push ebx
push eax
push eax
push 0x80000000
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, dword [esp + 0x50]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x78]
mov byte [esp + 0xf], 0
xor esi, esi
cmp edi, eax
je 0x4047cd
lea ecx, [esp + 0x50]
call fcn.00408df6
push esi
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, dword [esp + 0x50]
test eax, eax
je 0x4047cd
push 0x449bc8
push 0xb
push edi
call fcn.00425b63
add esp, 0xc
push 0x43e658
push 0xc
call fcn.004211a8
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x40462a
mov dword [esi], 0x449610
and dword [esi + 4], 0
and dword [esi + 8], 0
jmp 0x40462c
xor esi, esi
mov dword [esp + 0x70], esi
test esi, esi
je 0x404836
mov eax, dword [esi]
and dword [esp + 0x4c], 0
push ecx
push dword [esp + 0x54]
mov edi, dword [eax + 8]
lea ecx, [esp + 0x18]
lea eax, [esp + 0x80]
push eax
call fcn.00406026
push eax
lea ecx, [esp + 0x5c]
call fcn.00404a3f
lea eax, [esp + 0x28]
mov ecx, edi
push eax
lea eax, [esp + 0x5c]
push eax
push str.setup.dll.z
push str.SZIP
push 0
call dword [0x43d22c]
mov ecx, esi
call edi
lea ecx, [esp + 0x58]
mov esi, eax
call fcn.0040812b
lea ecx, [esp + 0x10]
call fcn.0040812b
lea ecx, [esp + 0x28]
call fcn.00404a0c
test esi, esi
jne 0x4047c0
call fcn.00408a4a
test al, al
je 0x4046c7
mov edx, dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
lea ecx, [esp + 0x10]
call fcn.0040b996
lea eax, [esp + 0x10]
jmp 0x4046dd
mov edx, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [esp + 0x28]
push 2
pop ebx
call fcn.0040b996
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x5c]
call fcn.00404a3f
test bl, 2
je 0x4046f5
lea ecx, [esp + 0x28]
call fcn.00404e47
test bl, 1
je 0x404703
lea ecx, [esp + 0x10]
call fcn.00404e47
cmp dword [esp + 0x68], 0
je 0x404724
cmp dword [esp + 0x6c], 8
lea eax, [esp + 0x58]
jb 0x404719
mov eax, dword [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x404734
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x4047b7
push 8
push 0
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x4047af
push str.LogMessage
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.RunInstance
push edi
mov dword [0x452308], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 4
mov ebx, eax
call fcn.00420ad9
mov dword [esp + 0x78], eax
pop ecx
mov dword [eax], 0x4494c0
test ebx, ebx
je 0x40478e
push eax
mov ecx, ebx
call dword [0x43d22c]
call ebx
jmp 0x404794
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
mov esi, eax
push edi
setne byte [esp + 0x13]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x74]
call fcn.00404875
jmp 0x4047b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea ecx, [esp + 0x58]
call fcn.00404e47
mov edi, dword [esp + 0x50]
lea ecx, [esp + 0x70]
call fcn.00404892
cmp dword [0x454c30], 0
je 0x4047ff
push 0
call fcn.004049dc
mov ebx, dword [0x454c34]
and dword [0x454c34], 0
test ebx, ebx
je 0x4047ff
mov ecx, ebx
call fcn.00404dd8
push 8
push ebx
call fcn.00420b09
pop ecx
pop ecx
cmp byte [esp + 0xf], 0
jne 0x40483b
test esi, esi
jne 0x404812
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, esi
call fcn.00403ef5
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
mov word [edi], ax
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x40485e
push 0xe
pop esi
jmp 0x4047c4
push ecx
push edi
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x1c]
call fcn.00406026
mov ecx, eax
call fcn.00403ac5
lea ecx, [esp + 0x10]
call fcn.0040812b
mov eax, dword [esp + 0x54]
cmp eax, 0xffffffff
je 0x40486e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x404350