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

Disassembly:
push 0xffffffffffffffff
push 0x606018
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
lea edi, [esp + 0x10]
call fcn.0047ac70
mov edi, 0x67f5e4
mov dword [esp + 0x20], 0
call fcn.0040ab90
or esi, 0xffffffff
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x513007
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x67f5e4]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x51303d
lea ecx, [eax - 1]
test ecx, ecx
jl 0x5131f1
cmp ecx, eax
jg 0x5131f1
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x51303d
push 0x5c
mov edi, 0x67f5e4
call fcn.0040af90
lea ecx, [esp + 0x10]
push 0x67f5e4
push ecx
mov ebx, str.cdict_
call fcn.0040aab0
add esp, 8
mov edi, 0x67f5f0
mov dword [esp + 0x20], 1
call fcn.0040ab90
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x513089
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [0x67f5f0]
push 0
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea edx, [esp + 0x10]
push 0x67f5e4
push edx
mov ebx, str.cdictlist.ini
call fcn.0040aab0
add esp, 8
mov edi, 0x67f5f4
mov dword [esp + 0x20], 2
call fcn.0040ab90
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5130e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ebx, [esp + 0x10]
call fcn.0047a980
mov edi, 0x67f5e8
mov dword [esp + 0x20], 3
call fcn.0040ab90
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x513124
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x67f5e8]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x51315a
lea eax, [ecx - 1]
test eax, eax
jl 0x5131f1
cmp eax, ecx
jg 0x5131f1
movzx eax, word [edx + eax*2]
cmp ax, 0x5c
je 0x51315a
push 0x5c
mov edi, 0x67f5e8
call fcn.0040af90
lea ecx, [esp + 0x14]
push 0x67f5e8
push ecx
mov ebx, str.cdict_
call fcn.0040aab0
add esp, 8
mov edi, 0x67f5ec
mov dword [esp + 0x20], 4
call fcn.0040ab90
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
lock xadd dword [edx], esi
dec esi
test esi, esi
jg 0x5131a4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x28], 0
je 0x5131fb
mov ecx, dword [0x67f5f4]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push ecx
mov esi, 1
call edi
test eax, eax
jne 0x5131ca
xor esi, esi
call fcn.00512230
mov edx, dword [0x67f5f4]
push edx
call edi
test eax, eax
jne 0x5131dc
call fcn.00513ae0
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x14
ret
push 0x80070057
call fcn.00403650
mov eax, dword [0x67f5f4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
neg eax
sbb eax, eax
neg eax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x14
ret