Function at 0x409289
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Get file attributes
Set file attributes

Disassembly:
push 0x2d8
mov eax, 0x4d1696
call fcn.0044dabe
mov ebx, ecx
mov dword [ebp - 0x2e4], ebx
call fcn.0040901e
test al, al
jne 0x4092b0
xor al, al
jmp 0x409669
mov eax, ebx
call fcn.0041e4e3
test al, al
jne 0x4092ec
mov eax, ebx
call fcn.0041e6d2
test al, al
jne 0x4092d6
push str.Failed_to_create_the_working_folder.
xor ecx, ecx
inc ecx
call fcn.0042181f
pop ecx
jmp 0x4092a9
push ebx
call fcn.0041ea25
pop ecx
test al, al
jne 0x409658
push str.Failed_to_set_ownership_of_the_working_folder.
jmp 0x4092cb
push ebx
call fcn.0041f2bf
pop ecx
test al, al
jne 0x4092fe
inc al
jmp 0x409669
call fcn.0041e883
mov esi, eax
xor edi, edi
mov dword [ebp - 0x2e0], esi
cmp esi, edi
jne 0x409318
push str.GetLauncherToken___failed.
jmp 0x4092cb
mov ecx, dword [esi]
push ebx
call fcn.0041ed5e
pop ecx
test al, al
jne 0x409651
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp byte [ebp + 8], 0
je 0x40966f
cmp dword [ebx + 0x14], 8
jb 0x40934a
mov eax, dword [ebx]
mov dword [ebp - 0x2d8], eax
jmp 0x409350
mov dword [ebp - 0x2d8], ebx
xor eax, eax
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], edi
mov word [ebp - 0x30], ax
push dword [ebp - 0x2d8]
lea eax, [ebp - 0x84]
push eax
mov dword [ebp - 4], edi
call fcn.00404c84
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x84]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call fcn.00405528
push 1
xor edi, edi
lea esi, [ebp - 0x84]
mov byte [ebp - 4], 0
call fcn.00401198
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x4093cb
or dword [ebp - 4], 0xffffffff
push 1
lea esi, [ebp - 0x30]
call fcn.00401198
mov eax, ebx
call fcn.0041e6d2
test al, al
jne 0x40963c
push str.Failed_to_recreate_the_working_folder.
jmp 0x4092cb
mov eax, dword [ebp - 0x30]
push 8
pop ebx
cmp dword [ebp - 0x1c], ebx
jae 0x4093d9
lea eax, [ebp - 0x30]
lea eax, [eax + ecx*2]
cmp word [eax - 2], 0x5c
je 0x4093fa
mov esi, 0x4e0ca0
push esi
call fcn.00447827
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x30]
call fcn.0040594f
xor ecx, ecx
cmp dword [ebp - 0x20], ecx
jbe 0x40942b
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x1c], ebx
jae 0x40940c
lea eax, [ebp - 0x30]
cmp word [eax + ecx*2], 0x2f
jne 0x409425
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x1c], ebx
jae 0x40941e
lea eax, [ebp - 0x30]
push 0x5c
pop edx
mov word [eax + ecx*2], dx
inc ecx
cmp ecx, dword [ebp - 0x20]
jb 0x409401
lea eax, [ebp - 0x30]
push eax
lea esi, [ebp - 0x68]
call fcn.00401874
mov esi, 0x4e5458
push esi
mov byte [ebp - 4], 2
call fcn.00447827
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x68]
call fcn.0040594f
push 0x250
lea eax, [ebp - 0x2d4]
push 0
push eax
call fcn.00447b70
mov eax, dword [ebp - 0x68]
add esp, 0xc
cmp dword [ebp - 0x54], ebx
jae 0x409473
lea eax, [ebp - 0x68]
lea ecx, [ebp - 0x2d4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x2dc], eax
cmp eax, 0xffffffff
jne 0x4094b4
push 1
xor edi, edi
lea esi, [ebp - 0x68]
mov byte [ebp - 4], 0
call fcn.00401198
or dword [ebp - 4], 0xffffffff
push 1
lea esi, [ebp - 0x30]
call fcn.00401198
push str.Failed_to_delete_the_old_working_folder.
jmp 0x4092cb
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x30]
push eax
lea esi, [ebp - 0x4c]
call fcn.00401874
lea eax, [ebp - 0x2a8]
push eax
mov byte [ebp - 4], 3
call fcn.00447827
pop ecx
lea ecx, [ebp - 0x2a8]
mov edi, eax
push ecx
mov eax, esi
call fcn.0040594f
test byte [ebp - 0x2d4], 0x10
je 0x40952b
lea eax, [ebp - 0x2a8]
push 0x4def40
push eax
call fcn.00448a0a
pop ecx
pop ecx
test eax, eax
je 0x409593
lea eax, [ebp - 0x2a8]
push 0x4e0ca8
push eax
call fcn.00448a0a
pop ecx
pop ecx
test eax, eax
je 0x409593
mov eax, esi
call fcn.0041f34a
jmp 0x409593
mov eax, dword [ebp - 0x4c]
push 8
pop edi
cmp dword [ebp - 0x38], edi
jae 0x409539
lea eax, [ebp - 0x4c]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call esi
test eax, eax
jne 0x409593
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x409593
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], edi
jae 0x40955c
lea eax, [ebp - 0x4c]
push eax
call ebx
mov ecx, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], edi
jae 0x40956a
lea ecx, [ebp - 0x4c]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x409627
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], edi
jae 0x409588
lea eax, [ebp - 0x4c]
push eax
call esi
test eax, eax
je 0x409627
push 1
xor edi, edi
lea esi, [ebp - 0x4c]
mov byte [ebp - 4], 2
call fcn.00401198
lea eax, [ebp - 0x2d4]
push eax
push dword [ebp - 0x2dc]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4094ba
push dword [ebp - 0x2dc]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [ebp - 0x2d8]
mov esi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push edi
call esi
test eax, eax
jne 0x4095fe
push edi
call ebx
and eax, 0xfffffffe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40948c
push edi
call esi
test eax, eax
je 0x40948c
push 1
xor edi, edi
lea esi, [ebp - 0x68]
mov byte [ebp - 4], 0
call fcn.00401198
or dword [ebp - 4], 0xffffffff
push 1
lea esi, [ebp - 0x30]
call fcn.00401198
mov ebx, dword [ebp - 0x2e4]
jmp 0x4093b2
push 1
xor edi, edi
lea esi, [ebp - 0x4c]
mov byte [ebp - 4], 2
call fcn.00401198
jmp 0x40948c
push ebx
call fcn.0041ea25
pop ecx
test al, al
je 0x4092e5
mov esi, dword [ebp - 0x2e0]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 1
push ebx
call fcn.004090d0
push ebx
call fcn.00408dcb
add esp, 0xc
call fcn.0044db41
ret
push str.Wrong_owner_of_the_working_folder.
jmp 0x4092cb