Function at 0x40f710
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Read file on windows
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x43c523
mov eax, dword fs:[0]
push eax
sub esp, 0x880
mov eax, dword [0x44ccd0]
xor eax, esp
mov dword [esp + 0x87c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44ccd0]
xor eax, esp
push eax
lea eax, [esp + 0x894]
mov dword fs:[0], eax
mov eax, dword [esp + 0x8a8]
mov esi, dword [esp + 0x8a4]
xor ebp, ebp
push 0x208
lea ecx, [esp + 0x484]
push ebp
push ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x4c], ebp
call fcn.00421360
push 0x208
lea edx, [esp + 0x698]
push ebp
push edx
call fcn.00421360
add esp, 0x18
push esi
lea ecx, [esp + 0x28]
call fcn.00402d40
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x8a4], ebp
call fcn.00409010
mov ecx, dword [eax]
add esp, 8
lea edx, [esp + 0x480]
lea esp, [esp]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x40f7c0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
or ebx, 0xffffffff
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f7ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov dword [esp + 0x89c], ebx
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f812
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x480]
add eax, ebx
jmp 0x40f820
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40f820
mov ecx, dword [0x43e8d4]
mov edx, dword [0x43e8d8]
mov dword [eax], ecx
mov ecx, dword [0x43e8dc]
mov dword [eax + 4], edx
mov dl, byte [0x43e8e0]
mov dword [eax + 8], ecx
push esi
lea ecx, [esp + 0x28]
mov byte [eax + 0xc], dl
call fcn.00402d40
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x8a4], 1
call fcn.00409010
mov ecx, dword [eax]
add esp, 8
lea edx, [esp + 0x688]
jmp 0x40f880
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x40f880
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f8a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov dword [esp + 0x89c], ebx
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f8cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x688]
add eax, ebx
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40f8d8
mov ecx, dword [str.ldcab.lddat]
mov edx, dword [0x43e8c8]
mov dword [eax], ecx
mov ecx, dword [0x43e8cc]
mov dword [eax + 4], edx
mov dl, byte [0x43e8d0]
mov dword [eax + 8], ecx
mov byte [eax + 0xc], dl
lea eax, [esp + 0x480]
push 0x43e570
push eax
call fcn.00420f7d
lea ecx, [esp + 0x690]
mov edi, eax
push 0x43e570
push ecx
mov dword [esp + 0x48], edi
call fcn.00420f7d
add esp, 0x10
mov dword [esp + 0x24], eax
cmp edi, ebp
je 0x4100ea
cmp eax, ebp
je 0x4100ea
push 0x10e
lea edx, [esp + 0x16c]
push ebp
push edx
call fcn.00421360
push edi
push 1
lea eax, [esp + 0x17c]
push 0x10e
push eax
call fcn.00420e9c
lea ecx, [esp + 0x184]
push str.LDIND
push ecx
call fcn.0042168f
add esp, 0x24
test eax, eax
jne 0x4100ea
push edi
mov byte [esp + 0x1b], 1
mov byte [esp + 0x1a], al
mov byte [esp + 0x27], al
call fcn.00420b94
add esp, 4
test eax, eax
jne 0x4100ee
call fcn.004125a5
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x41008d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
push 0x118
lea ecx, [esp + 0x54]
push 0
push ecx
mov dword [esp + 0x8a8], 2
call fcn.00421360
mov edi, dword [esp + 0x44]
push edi
push 1
lea edx, [esp + 0x64]
push 0x118
push edx
call fcn.00420e9c
add esp, 0x1c
cmp eax, 1
jne 0x410097
push 0x208
lea eax, [esp + 0x27c]
push 0
push eax
call fcn.00421360
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x284]
add esp, 0xc
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40fa30
lea edi, [esp + 0x278]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40fa42
mov cx, word [0x43e584]
lea edx, [esp + 0x174]
push 0x43e84c
push edx
mov word [edi], cx
call fcn.0042168f
add esp, 8
test eax, eax
je 0x40fb02
cmp dword [0x44e3c5], 0
jne 0x40fac7
lea eax, [esp + 0x174]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fa83
lea edi, [esp + 0x278]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40fa94
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x278]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40fab4
mov ax, word [0x43e584]
mov word [edi], ax
jmp 0x40fb02
lea ecx, [esp + 0x174]
push ecx
lea edx, [esp + 0x27c]
push edx
lea eax, [esp + 0x20]
push str.UnCompressLdxFile_m_szRootPath__s___s_
push eax
call fcn.00401f40
mov ecx, dword [esp + 0x28]
add esp, 0x10
push 0
push ecx
mov ecx, 0x44e3c9
call fcn.0040be50
mov dword [esp + 0x40], 1
lea eax, [esp + 0x50]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fb08
lea edi, [esp + 0x278]
sub eax, edx
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40fb20
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004125a5
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x41008d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x3c], eax
lea ecx, [esp + 0x278]
push ecx
lea edx, [esp + 0x40]
push 0x43f120
push edx
mov byte [esp + 0x8a8], 3
call fcn.00401f40
mov ebx, dword [esp + 0x48]
push 0x5c
push ebx
call fcn.0042047d
add esp, 0x14
test eax, eax
jne 0x40fb93
or eax, 0xffffffff
jmp 0x40fb95
sub eax, ebx
push eax
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x44]
call fcn.00401d50
cmp byte [esp + 0x16], 0
mov ebp, dword [esp + 0x30]
mov byte [esp + 0x89c], 4
jne 0x40fbe4
mov ecx, dword [ebp - 8]
mov eax, 1
sub eax, dword [ebp - 4]
or ecx, eax
jge 0x40fbd5
push 0
lea ecx, [esp + 0x34]
call fcn.004016c0
mov ebp, dword [esp + 0x30]
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
setne byte [esp + 0x23]
test dword [esp + 0x15c], 0x80000000
je 0x40fc2c
lea edi, [esp + 0x278]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40fc00
mov edx, dword [esp + 0x2c]
mov cx, word [0x43e584]
push edx
lea eax, [esp + 0x27c]
push eax
mov word [edi], cx
call fcn.0040f5c0
add esp, 8
jmp 0x410003
cmp dword [0x44e3c5], 0
mov esi, dword [esp + 0x2c]
jne 0x40fc4a
lea ecx, [esp + 0x278]
push esi
push ecx
call fcn.0040f5c0
add esp, 8
mov edx, dword [esp + 0x160]
mov eax, dword [esp + 0x24]
push 0
push 0
push edx
push eax
call fcn.00421476
add esp, 0x10
lea ecx, [esp + 0x278]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00402d40
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x48]
push eax
mov byte [esp + 0x8a4], 5
call fcn.00408f10
add esp, 8
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x89c], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fcb6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.004125a5
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x41008d
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
cmp dword [0x44e3c5], 0
mov byte [esp + 0x89c], 8
jne 0x40fd35
lea ecx, [esp + 0x278]
push ecx
lea edx, [esp + 0x1c]
push str.UnCompressLdxFile_strDstFile__s_
push edx
call fcn.00401f40
mov eax, dword [esp + 0x24]
add esp, 0xc
push 0
push eax
mov ecx, 0x44e3c9
call fcn.0040be50
lea ecx, [esp + 0x278]
push ecx
lea edx, [esp + 0x20]
push 0x43f120
push edx
call fcn.00401f40
add esp, 0xc
jmp 0x40fdb6
cmp dword [esp + 0x8ac], 0
je 0x40fd8e
cmp dword [esp + 0x40], 0
je 0x40fd6b
lea eax, [esp + 0x278]
push eax
lea ecx, [esp + 0x20]
push 0x43f120
push ecx
call fcn.00401f40
add esp, 0xc
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x40fdb6
lea edx, [esp + 0x278]
push edx
call fcn.00408a50
push eax
push esi
lea eax, [esp + 0x28]
push str._s_s
push eax
call fcn.00401f40
add esp, 0x14
jmp 0x40fdb6
cmp dword [esp + 0x40], 0
je 0x40fd9e
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [esp + 0x44]
push ecx
push esi
lea edx, [esp + 0x24]
push 0x43f788
push edx
call fcn.00401f40
add esp, 0x10
cmp byte [esp + 0x23], 0
je 0x40ff4b
cmp byte [esp + 0x16], 0
jne 0x40ff86
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x40fdee
push 0
lea ecx, [esp + 0x20]
call fcn.004016c0
mov esi, dword [esp + 0x1c]
push esi
call fcn.00408690
add esp, 4
test eax, eax
je 0x40ff56
mov byte [esp + 0x17], 1
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLCID]
cmp eax, 0x404
je 0x40fea6
cmp eax, 0xc04
je 0x40fea6
lea eax, [esp + 0x48]
push 7
push eax
call fcn.0040d030
mov edi, eax
lea ecx, [esp + 0x54]
push 0x74
push ecx
mov byte [esp + 0x8ac], 9
call fcn.0040d030
mov edi, dword [edi]
mov eax, dword [eax]
add esp, 0x10
push 4
push edi
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edi, eax
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40fe7c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
mov byte [esp + 0x89c], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fec1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40fec1
push 4
push 0x43f77c
push 0x43f750
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edi, eax
cmp edi, 7
jne 0x40fedd
mov dword [esp + 0x34], 0xffffffff
mov byte [esp + 0x17], 0
mov byte [esp + 0x16], 1
jmp 0x40ff8a
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
push esi
lea ecx, [esp + 0x20]
push str.UnCompressLdxFile_SetFileAttributes__s__GetLastError__d_
push ecx
call fcn.00401f40
mov edx, dword [esp + 0x28]
add esp, 0x10
push 0
push edx
mov ecx, 0x44e3c9
call fcn.0040be50
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call edi
push eax
push esi
lea eax, [esp + 0x20]
push str.UnCompressLdxFile_DeleteFile__s_GetLastError__d_
push eax
call fcn.00401f40
mov ecx, dword [esp + 0x28]
add esp, 0x10
push 0
push ecx
mov ecx, 0x44e3c9
call fcn.0040be50
mov byte [esp + 0x16], 1
jmp 0x40ff8a
cmp byte [esp + 0x16], 0
jne 0x40ff86
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x40ff74
push 0
lea ecx, [esp + 0x20]
call fcn.004016c0
mov esi, dword [esp + 0x1c]
push esi
call fcn.00408690
add esp, 4
test eax, eax
setne byte [esp + 0x16]
jmp 0x40ff8a
mov esi, dword [esp + 0x1c]
cmp byte [esp + 0x17], 0
je 0x40ffb7
mov edx, dword [esp + 0x15c]
mov ecx, dword [esp + 0x164]
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x158]
push eax
push ecx
push esi
push edx
call fcn.0040d6a0
add esp, 0x14
lea eax, [esi - 0x10]
mov byte [esp + 0x89c], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ffdb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov byte [esp + 0x89c], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410003
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x89c], 3
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410027
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x89c], 2
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41004b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x89c], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410072
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x38]
push ecx
call fcn.00420b94
add esp, 4
test eax, eax
je 0x40f9a7
mov edi, dword [esp + 0x38]
jmp 0x4100ee
push 0x80004005
call fcn.004011d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x1c]
push str.CUnCompressFile::UnCompressLdxFile_fread_Fail__d_
push edx
call fcn.00401f40
mov esi, dword [esp + 0x24]
add esp, 0xc
push 0
push esi
mov ecx, 0x44e3c9
call fcn.0040be50
lea eax, [esi - 0x10]
mov dword [esp + 0x89c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4100ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4100ee
mov dword [esp + 0x34], ebx
test edi, edi
je 0x4100fb
push edi
call fcn.00420934
add esp, 4
mov eax, dword [esp + 0x24]
test eax, eax
je 0x41010c
push eax
call fcn.00420934
add esp, 4
push 0
push str.UnCompressLdxFile_Over
mov ecx, 0x44e3c9
call fcn.0040be50
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x894]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x87c]
xor ecx, esp
call fcn.0041f914
add esp, 0x88c
ret