Function at 0x406ead
Capabilities:
Check if file exists
Create directory
Delete file
Get file size
Read file on windows

Disassembly:
push 0xe3c
mov eax, 0x42e3eb
call fcn.00409f31
mov dword [ebp - 0xe3c], ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x80
push 4
pop edi
push edi
push ebx
push 1
push 0x80000000
push eax
mov dword [ebp - 0xe40], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406ef5
push 3
pop eax
jmp 0x407215
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x1388
call fcn.0040a0bd
mov ebx, eax
pop ecx
test ebx, ebx
je 0x406eed
push 0x1388
push 0
push ebx
call fcn.00417110
and dword [ebp - 0xe48], 0
lea eax, [ebp - 0xe48]
add esp, 0xc
push 0
push eax
push 0x1388
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.__GS__
push ebx
call fcn.0041e710
pop ecx
pop ecx
test eax, eax
jne 0x407201
lea eax, [ebx + 0xa]
push str.__Dict__
push eax
call fcn.0041e710
pop ecx
pop ecx
test eax, eax
jne 0x407201
mov ecx, dword [ebx + 0x34]
lea esi, [ebx + 0x34]
add ecx, 6
lea edx, [ebx + 0x38]
push edx
mov eax, dword [ecx + ebx + 0x34]
add eax, 6
add ecx, eax
mov eax, dword [ecx + ebx + 0x34]
add ecx, edi
add esi, ecx
lea edi, [eax + 0x3a]
add edi, ecx
mov ecx, dword [ebp - 0xe3c]
add ecx, 0x14
add edi, ebx
call fcn.00403299
push esi
mov esi, dword [ebp - 0xe3c]
lea ecx, [esi + 0x2c]
call fcn.00403299
push edi
lea ecx, [esi + 0x44]
call fcn.00403299
mov eax, dword [ebx + 0x24]
xor edi, edi
mov dword [esi + 0x5c], eax
mov eax, dword [ebx + 0x28]
push 0x208
mov dword [esi + 0x60], eax
lea eax, [ebp - 0x628]
push edi
push eax
call fcn.00417110
push 0x208
lea eax, [ebp - 0x218]
push edi
push eax
call fcn.00417110
push 0x208
lea eax, [ebp - 0x420]
push edi
push eax
call fcn.00417110
push 0x3e8
lea eax, [ebp - 0xe20]
push edi
push eax
call fcn.00417110
mov edi, dword [ebp - 0xe40]
lea eax, [ebp - 0xe20]
push edi
push eax
call fcn.00419722
mov ecx, dword [0x442a00]
lea eax, [ebp - 0x628]
add esp, 0x38
push eax
push edi
call fcn.0040642f
mov ecx, eax
call fcn.004063a4
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0xe38]
push eax
call fcn.00403f0d
pop ecx
pop ecx
mov ecx, dword [0x442a00]
and dword [ebp - 4], 0
call fcn.0040642b
mov ecx, eax
call fcn.0040162f
push eax
lea eax, [ebp - 0x420]
push str._sDict_
push eax
call fcn.0040342b
add esp, 0xc
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40709f
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [ebp - 0xe24], 8
lea eax, [ebp - 0xe38]
push str..dcel
cmovae eax, dword [ebp - 0xe38]
push eax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push str._s_s_s
push eax
call fcn.0040342b
add esp, 0x14
cmp dword [esi], 0
je 0x407168
cmp dword [esi + 4], 0
jne 0x40713b
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40713b
lea ecx, [ebp - 0xe44]
call fcn.00408cd6
mov ecx, dword [0x442a00]
push 0
mov byte [ebp - 4], 1
call fcn.00406433
push eax
lea ecx, [ebp - 0xe44]
call fcn.00408d75
xor edx, edx
mov byte [ebp - 4], 0
xor ecx, ecx
inc edx
cmp eax, edx
mov dword [esi + 4], edx
sete cl
mov dword [esi + 0xc], ecx
lea ecx, [ebp - 0xe44]
call fcn.00408ce3
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407168
cmp dword [esi + 0xc], 0
jne 0x407168
push ebx
mov dword [esi + 8], 1
call fcn.0040a1de
pop ecx
push 4
pop esi
jmp 0x4071ee
mov esi, 0x208
lea eax, [ebp - 0x830]
push esi
push 0
push eax
call fcn.00417110
push esi
lea eax, [ebp - 0xa38]
push 0
push eax
call fcn.00417110
lea eax, [ebp - 0xe20]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00419722
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xa38]
push eax
call fcn.00419722
lea eax, [ebp - 0x830]
push eax
call fcn.0041998b
lea eax, [ebp - 0xa38]
push eax
call fcn.0041998b
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xe20]
push eax
call fcn.004040d9
push ebx
call fcn.0040a1de
add esp, 0x3c
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor esi, esi
push 0
push 1
lea ecx, [ebp - 0xe38]
call fcn.0040306a
mov eax, esi
jmp 0x407215
push ebx
call fcn.0040a1de
cmp dword [ebp + 0xc], 0
pop ecx
push 5
pop eax
push 2
pop ecx
cmovne eax, ecx
call fcn.00409eec
ret 8