Function at 0x408f60
Capabilities:
Check if file exists
Create directory
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4408bb
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x45407c]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push esi
push edi
mov eax, dword [0x45407c]
xor eax, esp
push eax
lea eax, [esp + 0x250]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, dword [ebx + 0x11878]
push 0x447b38
push str.INFO
mov dword [esp + 0x24], ebx
call fcn.00404920
mov eax, dword [ebx]
mov edx, dword [eax]
push 0x104
lea esi, [ebx + 0x13d0]
push esi
mov ecx, ebx
call edx
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x408ff1
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x408ff1
test al, 0x10
jne 0x408ff1
push esi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
push 0x104
lea eax, [esp + 0x40]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov edi, dword [ebx + 0x11878]
lea ecx, [esp + 0x3c]
push ecx
call fcn.0040d750
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x24]
push ecx
mov edx, str.initxml
mov ecx, eax
mov dword [ebx + 0x1187c], eax
call fcn.0040dc40
mov edi, eax
test edi, edi
je 0x409113
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
push eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
call fcn.0042770a
add esp, 4
push 0
mov esi, eax
mov eax, dword [esp + 0x18]
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ecx
mov eax, esi
call fcn.00405fa0
push esi
mov dword [esp + 0x1c], eax
call fcn.00427715
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
mov ecx, ebx
call eax
mov edi, dword [esp + 0x14]
test al, al
je 0x4090d7
mov ecx, dword [esp + 0x10]
mov esi, dword [ebx + 0x11878]
lea eax, [ebx + 0x13d0]
push eax
push ecx
mov ebx, edi
call fcn.00408b50
mov ebx, dword [esp + 0x24]
add esp, 8
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push edi
call fcn.00406b50
push edi
call fcn.00427715
mov esi, dword [esp + 0x20]
mov ecx, dword [ebx + 0x11878]
lea eax, [ebx + 0x11888]
add esp, 0xc
push eax
mov edx, esi
call fcn.00408860
add esp, 4
push esi
call fcn.00427715
add esp, 4
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [ebx + 0x1187c]
lea edx, [esp + 0x24]
push edx
mov edx, str.tail
call fcn.0040dc40
mov edi, eax
test edi, edi
je 0x409381
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
call fcn.0042770a
mov edx, dword [esp + 0x18]
add esp, 4
push 0
push 0
push edx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov ecx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x1c]
push eax
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, esi
call fcn.00405fa0
push esi
mov dword [esp + 0x28], eax
call fcn.00427715
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ecx
push esi
call fcn.00406b50
push esi
call fcn.00427715
mov edi, dword [esp + 0x20]
add esp, 0xc
lea edx, [ebx + 0x324]
push edx
mov edx, edi
call fcn.0040d390
xor esi, esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x258], esi
mov eax, dword [ebx + 0x11878]
push eax
push ebx
lea ecx, [esp + 0x34]
mov edx, edi
call fcn.0040c550
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x38]
sub esi, dword [esp + 0x34]
add esp, 8
sar esi, 2
mov dword [esp + 0x1c], esi
test esi, esi
je 0x409367
nop
push 0xc4
call fcn.00427771
mov edi, eax
add esp, 4
test edi, edi
je 0x40926c
mov eax, dword [ebx + 0x11878]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + edx*4]
mov dword [edi], ecx
mov dword [edi + 4], eax
xor eax, eax
lea ecx, [edi + 0xc]
xor edx, edx
push ecx
mov dword [edi + 0xc0], ebx
mov word [edi + 0x3e], dx
mov word [edi + 0x7e], ax
mov word [edi + 8], ax
mov byte [edi + 0x3c], al
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
lea edx, [edi + 0x24]
push edx
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
mov dword [esp + 0x18], edi
jmp 0x409274
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x10]
lea ecx, [esp + 0x28]
cmp ecx, eax
jae 0x4092f5
mov edx, dword [ebx + 0xc]
cmp edx, ecx
ja 0x4092f5
sub ecx, edx
sar ecx, 2
mov dword [esp + 0x18], ecx
mov ecx, dword [ebx + 0x14]
cmp eax, ecx
jne 0x4092e0
sub eax, edx
sar eax, 2
cmp eax, 0x3ffffffe
ja 0x4093a5
sub ecx, edx
inc eax
sar ecx, 2
cmp eax, ecx
jbe 0x4092e0
mov edx, ecx
shr edx, 1
mov esi, 0x3fffffff
sub esi, edx
cmp esi, ecx
jae 0x4092cb
xor ecx, ecx
jmp 0x4092cd
add ecx, edx
cmp ecx, eax
jae 0x4092d3
mov ecx, eax
push ecx
lea esi, [ebx + 0xc]
call fcn.00406fc0
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x40934e
mov edx, dword [ebx + 0xc]
mov ecx, dword [esp + 0x18]
mov edx, dword [edx + ecx*4]
mov dword [eax], edx
jmp 0x40934e
mov ecx, dword [ebx + 0x14]
cmp eax, ecx
jne 0x409341
mov edx, dword [ebx + 0xc]
sub eax, edx
sar eax, 2
cmp eax, 0x3ffffffe
ja 0x4093a5
sub ecx, edx
inc eax
sar ecx, 2
cmp eax, ecx
jbe 0x409341
mov edx, ecx
shr edx, 1
mov esi, 0x3fffffff
sub esi, edx
cmp esi, ecx
jae 0x40932c
xor ecx, ecx
jmp 0x40932e
add ecx, edx
cmp ecx, eax
jae 0x409334
mov ecx, eax
push ecx
lea esi, [ebx + 0xc]
call fcn.00406fc0
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x40934e
mov ecx, dword [esp + 0x18]
mov dword [eax], ecx
mov eax, dword [esp + 0x10]
add dword [ebx + 0x10], 4
inc eax
mov dword [esp + 0x10], eax
cmp eax, esi
jb 0x409210
mov edi, dword [esp + 0x14]
push edi
call fcn.00427715
mov eax, dword [esp + 0x30]
add esp, 4
test eax, eax
je 0x409381
push eax
call fcn.00427715
add esp, 4
mov ecx, dword [esp + 0x250]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.004276fb
mov esp, ebp
pop ebp
ret
push str.vector_T__too_long
call fcn.0043b9f0
int3