Function at 0x404960
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4217b8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4360c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x14]
call fcn.0040e3f0
mov dword [ebp - 4], 0
mov ecx, dword [eax]
mov edi, dword [0x4397c8]
lea edx, [ecx - 0x10]
add edi, 0xfffffff0
or esi, 0xffffffff
cmp edx, edi
je 0x4049f5
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x4049e7
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x4049e7
push edx
call fcn.00407780
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, esi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x4049dd
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x10]
add eax, 0x10
mov dword [0x4397c8], eax
jmp 0x4049f5
push dword [ecx - 0xc]
push ecx
mov ecx, 0x4397c8
call fcn.00402320
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404a18
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4397c8]
mov edx, dword [eax - 0xc]
test edx, edx
jle 0x404a46
lea edi, [edx - 1]
test edi, edi
js 0x404ab0
cmp edi, edx
jg 0x404ab0
cmp word [eax + edi*2], 0x5c
je 0x404a46
push 0x5c
mov ecx, 0x4397c8
call fcn.00402140
push str.cdict_
lea eax, [ebp - 0x10]
push 0x4397c8
push eax
call fcn.00407400
add esp, 0xc
mov dword [ebp - 4], 1
mov ecx, dword [eax]
mov edi, dword [0x4397e4]
lea edx, [ecx - 0x10]
add edi, 0xfffffff0
cmp edx, edi
je 0x404ac8
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x404aba
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x404aba
push edx
call fcn.00407780
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, esi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x404aa6
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
add eax, 0x10
mov dword [0x4397e4], eax
jmp 0x404ac8
push 0x80070057
call fcn.00401e80
push dword [ecx - 0xc]
push ecx
mov ecx, 0x4397e4
call fcn.00402320
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404aeb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push dword [0x4397e4]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push str.cdictlist.ini
lea eax, [ebp - 0x10]
push 0x4397c8
push eax
call fcn.00407400
add esp, 0xc
mov dword [ebp - 4], 2
mov ecx, dword [eax]
mov edi, dword [0x4397e0]
lea edx, [ecx - 0x10]
add edi, 0xfffffff0
cmp edx, edi
je 0x404b73
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x404b65
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x404b65
push edx
call fcn.00407780
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, esi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x404b5b
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
add eax, 0x10
mov dword [0x4397e0], eax
jmp 0x404b73
push dword [ecx - 0xc]
push ecx
mov ecx, 0x4397e0
call fcn.00402320
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404b96
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x10]
call fcn.0040e080
mov dword [ebp - 4], 3
mov ecx, dword [eax]
mov edi, dword [0x4397e8]
lea edx, [ecx - 0x10]
add edi, 0xfffffff0
cmp edx, edi
je 0x404c00
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x404bf2
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x404bf2
push edx
call fcn.00407780
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, esi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x404be8
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
add eax, 0x10
mov dword [0x4397e8], eax
jmp 0x404c00
push dword [ecx - 0xc]
push ecx
mov ecx, 0x4397e8
call fcn.00402320
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404c23
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4397e8]
mov edx, dword [eax - 0xc]
test edx, edx
jle 0x404c55
lea edi, [edx - 1]
test edi, edi
js 0x404ab0
cmp edi, edx
jg 0x404ab0
cmp word [eax + edi*2], 0x5c
je 0x404c55
push 0x5c
mov ecx, 0x4397e8
call fcn.00402140
push str.cdict_
lea eax, [ebp - 0x18]
push 0x4397e8
push eax
call fcn.00407400
add esp, 0xc
mov dword [ebp - 4], 4
mov ecx, dword [eax]
mov edi, dword [0x4397cc]
lea edx, [ecx - 0x10]
add edi, 0xfffffff0
cmp edx, edi
je 0x404ccd
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x404cbf
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x404cbf
push edx
call fcn.00407780
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, esi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x404cb5
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
add eax, 0x10
mov dword [0x4397cc], eax
jmp 0x404ccd
push dword [ecx - 0xc]
push ecx
mov ecx, 0x4397cc
call fcn.00402320
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x404cee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [0x4397e0]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, 1
call edi
test eax, eax
jne 0x404d0c
xor esi, esi
call fcn.00403ea0
push dword [0x4397e0]
call edi
test eax, eax
jne 0x404d1d
call fcn.00404e10
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret