Function at 0x403aea
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 [0x45200c]
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 + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x403b47
push ecx
lea edx, [esp + 0x2dc]
lea ecx, [esp + 0x3c]
call fcn.0040d53b
pop ecx
lea ecx, [esp + 0x38]
call fcn.00407fca
push 7
pop edi
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], edi
call fcn.00404821
lea ecx, [esp + 0x20]
call fcn.00401403
mov ecx, dword [esp + 0x34]
mov bl, al
cmp ecx, 8
jb 0x403bb1
mov eax, dword [esp + 0x20]
lea ecx, [ecx*2 + 2]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
cmp ecx, 0x1000
jb 0x403ba8
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00407f7a
mov eax, dword [esp + 0x1c]
pop ecx
pop ecx
mov ecx, dword [esp + 0x10]
push ecx
push eax
call fcn.0041ec23
pop ecx
pop ecx
test bl, bl
jne 0x403c2e
xor ebx, ebx
mov dword [esp + 0x34], edi
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], ebx
call fcn.00404821
push ecx
push str._restoreAccessToTempLocations
lea ecx, [esp + 0x28]
call fcn.004045f5
mov ecx, dword [esp + 0x34]
mov edi, eax
cmp ecx, 8
jb 0x403c24
mov eax, dword [esp + 0x20]
lea ecx, [ecx*2 + 2]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
cmp ecx, 0x1000
jb 0x403c1b
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
call fcn.00407f7a
mov eax, dword [esp + 0x18]
pop ecx
pop ecx
mov ecx, dword [esp + 0x14]
push ecx
push eax
call fcn.0041ec23
pop ecx
pop ecx
cmp edi, 0xffffffff
je 0x403c47
call fcn.00402669
xor eax, eax
mov ecx, dword [esp + 0x4e4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041ebed
mov esp, ebp
pop ebp
ret 0x10
push 7
pop edi
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], edi
call fcn.00404821
lea ecx, [esp + 0x20]
call fcn.004029de
mov eax, dword [esp + 0x34]
cmp eax, 8
jb 0x403cae
mov ecx, dword [esp + 0x20]
lea eax, [eax*2 + 2]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
cmp eax, 0x1000
jb 0x403ca5
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
call fcn.00407f7a
mov eax, dword [esp + 0x1c]
pop ecx
pop ecx
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.0041ec23
pop ecx
pop ecx
push esi
lea ecx, [esp + 0x24]
mov byte [esp + 0x13], bl
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], edi
call fcn.00404821
lea edx, [esp + 0xf]
lea ecx, [esp + 0x20]
call fcn.00402a28
mov ecx, dword [esp + 0x34]
mov edi, eax
cmp ecx, 8
jb 0x403d1d
mov eax, dword [esp + 0x20]
lea ecx, [ecx*2 + 2]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
cmp ecx, 0x1000
jb 0x403d14
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
call fcn.00407f7a
mov eax, dword [esp + 0x18]
pop ecx
pop ecx
mov ecx, dword [esp + 0x14]
push ecx
push eax
call fcn.0041ec23
pop ecx
pop ecx
test edi, edi
je 0x403c2e
cmp edi, 0x4de
je 0x403d3a
cmp byte [esp + 0xf], bl
je 0x403d3a
mov eax, edi
jmp 0x403c30
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], 7
call fcn.00404821
push ecx
push str._noprefetch
lea ecx, [esp + 0x28]
call fcn.004045f5
mov ecx, dword [esp + 0x34]
mov esi, eax
cmp ecx, 8
jb 0x403dab
mov eax, dword [esp + 0x20]
lea ecx, [ecx*2 + 2]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
cmp ecx, 0x1000
jb 0x403da2
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
call fcn.00407f7a
mov eax, dword [esp + 0x18]
pop ecx
pop ecx
mov ecx, dword [esp + 0x14]
push ecx
push eax
call fcn.0041ec23
pop ecx
pop ecx
xor ebx, ebx
inc ebx
cmp esi, 0xffffffff
jne 0x403e2b
lea ecx, [esp + 0x14]
call fcn.0041d39a
cmp eax, 0x456c60
je 0x403dce
mov ecx, dword [eax]
and dword [eax], 0
push ecx
call fcn.004042da
cmp dword [0x456c60], 0
lea ecx, [esp + 0x14]
setne bl
call fcn.0040430a
test bl, bl
je 0x403e28
push 8
call fcn.0041ec31
mov esi, eax
pop ecx
push 0x28
and dword [esi], 0
and dword [esi + 4], 0
call fcn.0041ec31
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.00404294
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ecx, eax
call fcn.0040366c
jmp 0x403e2b
xor ebx, ebx
inc ebx
call fcn.00403877
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 + 0x14], eax
lea eax, [esp + 0x78]
push eax
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403ea2
push 0
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x403ea2
lea ecx, [esp + 0x10]
call fcn.0040879e
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 + 0x10]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x78]
mov byte [esp + 0xf], 0
xor esi, esi
cmp edi, eax
je 0x4040ad
lea ecx, [esp + 0x10]
call fcn.0040879e
push esi
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, dword [esp + 0x10]
test eax, eax
je 0x4040ad
push 0x44b650
push 0xb
push edi
call fcn.004262c7
add esp, 0xc
push 0x43f854
push 0xc
call fcn.0041f4c8
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x403f0a
mov dword [esi], 0x44b074
and dword [esi + 4], 0
and dword [esi + 8], 0
jmp 0x403f0c
xor esi, esi
mov dword [esp + 0x18], esi
test esi, esi
je 0x404116
mov eax, dword [esi]
and dword [esp + 0x74], 0
push ecx
push dword [esp + 0x14]
mov edi, dword [eax + 8]
lea ecx, [esp + 0x40]
lea eax, [esp + 0x80]
push eax
call fcn.0040589b
push eax
lea ecx, [esp + 0x24]
call fcn.0040435b
lea eax, [esp + 0x50]
mov ecx, edi
push eax
lea eax, [esp + 0x24]
push eax
push str.setup.dll.z
push str.SZIP
push 0
call dword [0x43f230]
mov ecx, esi
call edi
lea ecx, [esp + 0x20]
mov esi, eax
call fcn.0040794e
lea ecx, [esp + 0x38]
call fcn.0040794e
lea ecx, [esp + 0x50]
call fcn.00404328
test esi, esi
jne 0x4040a0
call fcn.004083b8
test al, al
je 0x403fa7
mov edx, dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
lea ecx, [esp + 0x38]
call fcn.0040b409
lea eax, [esp + 0x38]
jmp 0x403fbd
mov edx, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [esp + 0x50]
push 2
pop ebx
call fcn.0040b409
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x24]
call fcn.0040435b
test bl, 2
je 0x403fd5
lea ecx, [esp + 0x50]
call fcn.00404757
test bl, 1
je 0x403fe3
lea ecx, [esp + 0x38]
call fcn.00404757
cmp dword [esp + 0x30], 0
je 0x404004
cmp dword [esp + 0x34], 8
lea eax, [esp + 0x20]
jb 0x403ff9
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x404014
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x404097
push 8
push 0
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40408f
push str.LogMessage
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.RunInstance
push edi
mov dword [0x454328], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 4
mov ebx, eax
call fcn.0041ec31
mov dword [esp + 0x20], eax
pop ecx
mov dword [eax], 0x44af24
test ebx, ebx
je 0x40406e
push eax
mov ecx, ebx
call dword [0x43f230]
call ebx
jmp 0x404074
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 + 0x1c]
call fcn.00404155
jmp 0x404097
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea ecx, [esp + 0x20]
call fcn.00404757
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x18]
call fcn.00404172
cmp dword [0x456c60], 0
je 0x4040df
push 0
call fcn.004042da
mov ebx, dword [0x456c64]
and dword [0x456c64], 0
test ebx, ebx
je 0x4040df
mov ecx, ebx
call fcn.004046e8
push 8
push ebx
call fcn.0041ec23
pop ecx
pop ecx
cmp byte [esp + 0xf], 0
jne 0x40411b
test esi, esi
jne 0x4040f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, esi
call fcn.004037b5
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 0x40413e
push 0xe
pop esi
jmp 0x4040a4
push ecx
push edi
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x44]
call fcn.0040589b
mov ecx, eax
call fcn.004033d9
lea ecx, [esp + 0x38]
call fcn.0040794e
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x40414e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x403c30