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

Disassembly:
push 0xffffffffffffffff
push 0x43bc48
mov eax, dword fs:[0]
push eax
sub esp, 0x87c
mov eax, dword [0x44bcd0]
xor eax, esp
mov dword [esp + 0x878], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44bcd0]
xor eax, esp
push eax
lea eax, [esp + 0x890]
mov dword fs:[0], eax
mov eax, dword [esp + 0x8a4]
mov esi, dword [esp + 0x8a0]
xor ebp, ebp
push 0x208
lea ecx, [esp + 0x480]
push ebp
push ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x48], ebp
call fcn.00420a40
push 0x208
lea edx, [esp + 0x694]
push ebp
push edx
call fcn.00420a40
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 + 0x8a0], ebp
call fcn.00409320
mov ecx, dword [eax]
add esp, 8
lea edx, [esp + 0x47c]
lea esp, [esp]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x40f240
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 0x40f26c
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 + 0x898], ebx
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f292
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x47c]
add eax, ebx
jmp 0x40f2a0
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40f2a0
mov ecx, dword [0x43d8c8]
mov edx, dword [0x43d8cc]
mov dword [eax], ecx
mov ecx, dword [0x43d8d0]
mov dword [eax + 4], edx
mov dl, byte [0x43d8d4]
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 + 0x8a0], 1
call fcn.00409320
mov ecx, dword [eax]
add esp, 8
lea edx, [esp + 0x684]
jmp 0x40f300
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x40f300
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 0x40f329
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 + 0x898], ebx
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f34f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esp + 0x684]
add eax, ebx
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40f358
mov ecx, dword [str.ldcab.lddat]
mov edx, dword [0x43d8bc]
mov dword [eax], ecx
mov ecx, dword [0x43d8c0]
mov dword [eax + 4], edx
mov dl, byte [0x43d8c4]
mov dword [eax + 8], ecx
mov byte [eax + 0xc], dl
lea eax, [esp + 0x47c]
push 0x43d570
push eax
call fcn.0042065d
lea ecx, [esp + 0x68c]
mov edi, eax
push 0x43d570
push ecx
mov dword [esp + 0x50], edi
call fcn.0042065d
add esp, 0x10
mov dword [esp + 0x24], eax
cmp edi, ebp
je 0x40fb00
cmp eax, ebp
je 0x40fb00
push 0x10e
lea edx, [esp + 0x168]
push ebp
push edx
call fcn.00420a40
push edi
push 1
lea eax, [esp + 0x178]
push 0x10e
push eax
call fcn.0042057c
lea ecx, [esp + 0x180]
push str.LDIND
push ecx
call fcn.00420d6f
add esp, 0x24
test eax, eax
jne 0x40fb00
push edi
mov byte [esp + 0x1b], 1
mov byte [esp + 0x1a], al
mov byte [esp + 0x27], al
call fcn.00420274
add esp, 4
test eax, eax
jne 0x40fb04
call fcn.00411c35
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40faa3
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 + 0x50]
push 0
push ecx
mov dword [esp + 0x8a4], 2
call fcn.00420a40
mov edi, dword [esp + 0x4c]
push edi
push 1
lea edx, [esp + 0x60]
push 0x118
push edx
call fcn.0042057c
add esp, 0x1c
cmp eax, 1
jne 0x40faad
push 0x208
lea eax, [esp + 0x278]
push 0
push eax
call fcn.00420a40
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x280]
add esp, 0xc
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40f4b0
lea edi, [esp + 0x274]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40f4c2
mov cx, word [0x43d584]
lea edx, [esp + 0x170]
push 0x43d840
push edx
mov word [edi], cx
call fcn.00420d6f
add esp, 8
test eax, eax
je 0x40f582
cmp dword [0x44d3c5], 0
jne 0x40f547
lea eax, [esp + 0x170]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f503
lea edi, [esp + 0x274]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40f514
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 + 0x274]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40f534
mov ax, word [0x43d584]
mov word [edi], ax
jmp 0x40f582
lea ecx, [esp + 0x170]
push ecx
lea edx, [esp + 0x278]
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, 0x44d3c9
call fcn.0040bc50
mov dword [esp + 0x3c], 1
lea eax, [esp + 0x4c]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f588
lea edi, [esp + 0x274]
sub eax, edx
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40f5a0
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.00411c35
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40faa3
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x274]
push ecx
lea edx, [esp + 0x3c]
push 0x43e050
push edx
mov byte [esp + 0x8a4], 3
call fcn.00401f40
mov ebx, dword [esp + 0x44]
push 0x5c
push ebx
call fcn.0041fb5d
add esp, 0x14
test eax, eax
jne 0x40f613
or eax, 0xffffffff
jmp 0x40f615
sub eax, ebx
push eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x40]
call fcn.00401d50
cmp byte [esp + 0x16], 0
mov ebp, dword [esp + 0x2c]
mov byte [esp + 0x898], 4
jne 0x40f664
mov ecx, dword [ebp - 8]
mov eax, 1
sub eax, dword [ebp - 4]
or ecx, eax
jge 0x40f655
push 0
lea ecx, [esp + 0x30]
call fcn.004016e0
mov ebp, dword [esp + 0x2c]
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
setne byte [esp + 0x23]
test dword [esp + 0x158], 0x80000000
je 0x40f6ac
lea edi, [esp + 0x274]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40f680
mov edx, dword [esp + 0x30]
mov cx, word [0x43d584]
push edx
lea eax, [esp + 0x278]
push eax
mov word [edi], cx
call fcn.0040f040
add esp, 8
jmp 0x40fa19
cmp dword [0x44d3c5], 0
mov esi, dword [esp + 0x30]
jne 0x40f6ca
lea ecx, [esp + 0x274]
push esi
push ecx
call fcn.0040f040
add esp, 8
mov edx, dword [esp + 0x15c]
mov eax, dword [esp + 0x24]
push 0
push 0
push edx
push eax
call fcn.00420b56
add esp, 0x10
lea ecx, [esp + 0x274]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00402d40
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x48]
push eax
mov byte [esp + 0x8a0], 5
call fcn.00409220
add esp, 8
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x898], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f736
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.00411c35
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40faa3
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
cmp dword [0x44d3c5], 0
mov byte [esp + 0x898], 8
jne 0x40f7b5
lea ecx, [esp + 0x274]
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, 0x44d3c9
call fcn.0040bc50
lea ecx, [esp + 0x274]
push ecx
lea edx, [esp + 0x20]
push 0x43e050
push edx
call fcn.00401f40
add esp, 0xc
jmp 0x40f836
cmp dword [esp + 0x8a8], 0
je 0x40f80e
cmp dword [esp + 0x3c], 0
je 0x40f7eb
lea eax, [esp + 0x274]
push eax
lea ecx, [esp + 0x20]
push 0x43e050
push ecx
call fcn.00401f40
add esp, 0xc
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x40f836
lea edx, [esp + 0x274]
push edx
call fcn.00408d60
push eax
push esi
lea eax, [esp + 0x28]
push str._s_s
push eax
call fcn.00401f40
add esp, 0x14
jmp 0x40f836
cmp dword [esp + 0x3c], 0
je 0x40f81e
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 0x43e6b4
push edx
call fcn.00401f40
add esp, 0x10
cmp byte [esp + 0x23], 0
je 0x40f961
cmp byte [esp + 0x16], 0
jne 0x40f99c
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x40f86e
push 0
lea ecx, [esp + 0x20]
call fcn.004016e0
mov esi, dword [esp + 0x1c]
push esi
call fcn.004089a0
add esp, 4
test eax, eax
je 0x40f96c
lea eax, [esp + 0x48]
push 7
push eax
mov byte [esp + 0x1f], 1
call fcn.0040ca70
mov eax, dword [eax]
add esp, 8
push 4
push eax
push 0x43e688
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
mov eax, dword [esp + 0x48]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f8d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40f8ef
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x34], 0xffffffff
mov byte [esp + 0x17], 0
mov byte [esp + 0x16], 1
jmp 0x40f9a0
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, 0x44d3c9
call fcn.0040bc50
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, 0x44d3c9
call fcn.0040bc50
mov ebx, dword [esp + 0x38]
mov byte [esp + 0x16], 1
jmp 0x40f9a0
cmp byte [esp + 0x16], 0
jne 0x40f99c
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x40f98a
push 0
lea ecx, [esp + 0x20]
call fcn.004016e0
mov esi, dword [esp + 0x1c]
push esi
call fcn.004089a0
add esp, 4
test eax, eax
setne byte [esp + 0x16]
jmp 0x40f9a0
mov esi, dword [esp + 0x1c]
cmp byte [esp + 0x17], 0
je 0x40f9cd
mov edx, dword [esp + 0x158]
mov ecx, dword [esp + 0x160]
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x154]
push eax
push ecx
push esi
push edx
call fcn.0040d0e0
add esp, 0x14
add esi, 0xfffffff0
mov byte [esp + 0x898], 7
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f9f1
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov byte [esp + 0x898], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa19
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 + 0x898], 3
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa3d
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 + 0x898], 2
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa61
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 + 0x898], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa88
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00420274
add esp, 4
test eax, eax
je 0x40f427
mov edi, dword [esp + 0x40]
jmp 0x40fb04
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, 0x44d3c9
call fcn.0040bc50
lea eax, [esi - 0x10]
mov dword [esp + 0x898], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fb04
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40fb04
mov dword [esp + 0x34], ebx
test edi, edi
je 0x40fb11
push edi
call fcn.00420014
add esp, 4
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40fb22
push eax
call fcn.00420014
add esp, 4
push 0
push str.UnCompressLdxFile_Over
mov ecx, 0x44d3c9
call fcn.0040bc50
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x890]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x878]
xor ecx, esp
call fcn.0041eff4
add esp, 0x888
ret