Function at 0x4e1680
Capabilities:
Check if file exists
Create directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53893b
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x59a0a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
push 8
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
call fcn.0049aa4a
add esp, 4
test eax, eax
jne 0x4e16e5
call fcn.004a4e3e
mov dword [ebp - 0x40], eax
lea ecx, [ebp - 0x40]
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x40]
mov dword [eax], ecx
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004021e0
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 2
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
or edi, 0xffffffff
nop
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4e173a
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4e18ce
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4e17d0
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4e17d0
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4e17d0
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x59fee8]
cmp eax, dword [ecx + 4]
jle 0x4e17b1
push 0x59fee8
call fcn.0049af28
add esp, 4
cmp dword [0x59fee8], 0xffffffff
jne 0x4e17b1
mov byte [ebp - 4], 3
call fcn.004e7150
push 0x53eaa0
call fcn.0049b282
add esp, 4
mov byte [ebp - 4], 2
push 0x59fee8
call fcn.0049aee9
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x55bfb4
push str.__s__Fail__s__Del_Fail_Err__d_
push 0x59feec
call fcn.004e76a0
add esp, 0x14
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x40]
call fcn.00413420
mov esi, dword [ebp - 0x10]
push 0x5c
push esi
call fcn.0049d8a4
add esp, 8
test eax, eax
je 0x4e18ce
sub eax, esi
sar eax, 1
test eax, eax
jle 0x4e18ce
push eax
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
call fcn.004059d0
mov byte [ebp - 4], 4
lea edi, [esi - 0x10]
mov edx, dword [eax]
lea ecx, [edx - 0x10]
cmp ecx, edi
je 0x4e188a
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x4e187b
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x4e187b
call fcn.004021e0
mov ebx, eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x4e186d
mov edx, dword [edi]
push edi
mov ecx, dword [edx]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x4e1869
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea esi, [ebx + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x10], esi
jmp 0x4e188a
mov ecx, edx
call esi
lea esi, [ebx + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x10], esi
jmp 0x4e188a
push dword [edx - 0xc]
lea ecx, [ebp - 0x10]
push edx
call fcn.00402d50
mov esi, dword [ebp - 0x10]
mov byte [ebp - 4], 2
or edi, 0xffffffff
mov ecx, dword [ebp - 0x14]
mov eax, edi
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4e1720
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e18c5
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x4e171c
mov ecx, edx
call edi
jmp 0x4e171c
cmp dword [ebp - 0x30], 0
sete al
test al, al
jne 0x4e1aad
nop dword [eax]
push ecx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x40]
call fcn.00409ba0
mov ecx, eax
call fcn.004099d0
mov edi, dword [eax]
test edi, edi
je 0x4e1900
mov edi, dword [edi]
mov edx, dword [eax + 8]
mov eax, edx
mov ecx, dword [edi + 8]
and edx, 3
shr eax, 2
dec ecx
and ecx, eax
mov eax, dword [edi + 4]
mov eax, dword [eax + ecx*4]
mov edi, dword [eax + edx*4]
mov ecx, dword [edi - 0x10]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x4e192b
call dword [eax + 0x10]
mov ecx, eax
cmp dword [edi - 4], 0
lea eax, [edi - 4]
jl 0x4e1941
cmp ecx, dword [edi - 0x10]
jne 0x4e1941
lea ebx, [edi - 0x10]
lock inc dword [eax]
jmp 0x4e1978
mov eax, dword [ecx]
push 2
push dword [edi - 0xc]
call dword [eax]
mov ebx, eax
test ebx, ebx
je 0x4e1adb
mov ecx, dword [edi - 0xc]
mov dword [ebx + 4], ecx
lea ecx, [ebx + 0x10]
mov edx, dword [edi - 0xc]
lea eax, [edx*2 + 2]
push eax
push edi
lea edx, [edx*2 + 2]
call fcn.004c7670
add esp, 8
lea edi, [ebx + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
dec eax
mov ecx, dword [ebp - 0x38]
add edx, eax
mov eax, edx
dec ecx
shr eax, 2
and edx, 3
and ecx, eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + edx*4]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4e19d5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e19d3
mov eax, dword [ecx + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call ebx
jmp 0x4e19db
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
sub dword [ebp - 0x30], 1
mov ecx, 0
mov eax, dword [ebp - 0x34]
push ecx
cmove eax, ecx
push edi
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4e1a6a
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x59fee8]
cmp eax, dword [ecx + 4]
jle 0x4e1a4b
push 0x59fee8
call fcn.0049af28
add esp, 4
cmp dword [0x59fee8], 0xffffffff
jne 0x4e1a4b
mov byte [ebp - 4], 6
call fcn.004e7150
push 0x53eaa0
call fcn.0049b282
add esp, 4
mov byte [ebp - 4], 5
push 0x59fee8
call fcn.0049aee9
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.CreateDirEx
push str.__s__Dir__s__Create_Fail_Err__d_
push 0x59feec
call fcn.004e76a0
add esp, 0x14
mov byte [ebp - 4], 2
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4e1a9b
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e1a99
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x4e1a9b
call edx
cmp dword [ebp - 0x30], 0
sete al
test al, al
je 0x4e18e0
or edi, 0xffffffff
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4e1ae2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e1ae0
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x4e1ae2
call fcn.00402c20
call edx
lea ecx, [ebp - 0x40]
call fcn.00413310
push dword [ebp - 0x40]
call fcn.0049aa1d
mov dword [ebp - 4], 0xffffffff
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x40], 0
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], edi
dec edi
test edi, edi
jg 0x4e1b32
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e1b2e
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x4e1b32
mov ecx, edx
call esi
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret