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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10185300
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x101dd594]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
or ebx, 0xffffffff
mov dword [ebp - 4], 0
cmp dword [eax - 0xc], 0
je 0x1006cbd2
cmp dword [eax - 4], 1
jle 0x1006c953
push dword [eax - 0xc]
lea ecx, [ebp + 8]
call fcn.10017f50
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x1006cbcf
call fcn.1001b540
mov ecx, eax
test ecx, ecx
je 0x1006cc0a
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 1
cmp dword [eax - 0xc], 0
jge 0x1006c98e
or edi, 0xffffffff
jmp 0x1006c9ae
push 0x1019606c
push eax
call fcn.10150619
mov edi, eax
add esp, 8
mov eax, dword [ebp + 8]
test edi, edi
jne 0x1006c9aa
or edi, 0xffffffff
jmp 0x1006c9ae
sub edi, eax
sar edi, 1
mov esi, dword [eax - 0xc]
xor edx, edx
test edi, edi
mov ecx, esi
cmovns edx, edi
cmp edx, esi
cmovle ecx, edx
xor ebx, ebx
test esi, esi
cmovns ebx, ecx
cmp ebx, esi
jne 0x1006c9de
add eax, 0xfffffff0
push eax
call fcn.1001d450
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
jmp 0x1006ca0a
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x1006c9ee
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x1006c9fa
call fcn.1001b540
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push ebx
push dword [ebp + 8]
lea ecx, [ebp - 0x14]
call fcn.100670a0
mov esi, dword [ebp - 0x14]
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
push esi
call fcn.1006c340
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1006ca36
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x10]
cmp dword [esi - 4], 1
jle 0x1006ca4d
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
call fcn.10017f50
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1006ca75
cmp dword [esi - 4], 1
jle 0x1006ca6c
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
call fcn.10017f50
mov esi, dword [ebp - 0x10]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp + 8]
lea ecx, [edi + 1]
mov ebx, dword [eax - 0xc]
mov edx, ebx
sub edx, edi
xor edi, edi
test ecx, ecx
cmovns edi, ecx
xor esi, esi
sub edx, 1
mov ecx, SysReAllocString
cmovns esi, edx
sub ecx, edi
cmp ecx, esi
jl 0x1006cc00
lea ecx, [esi + edi]
cmp ecx, ebx
jle 0x1006caab
mov esi, ebx
sub esi, edi
xor ecx, ecx
cmp edi, ebx
cmovle ecx, esi
mov dword [ebp - 0x1c], ecx
test edi, edi
jne 0x1006cad1
cmp ecx, ebx
jne 0x1006cad1
add eax, 0xfffffff0
push eax
call fcn.1001d450
add esp, 4
add eax, 0x10
mov dword [ebp - 0x18], eax
jmp 0x1006cb03
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x1006cae1
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x1006caed
call fcn.1001b540
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
push dword [ebp - 0x1c]
lea eax, [eax + edi*2]
push eax
call fcn.100670a0
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp + 8]
lea esi, [eax - 0x10]
add edi, 0xfffffff0
mov byte [ebp - 4], 3
cmp esi, edi
je 0x1006cb5a
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x1006cb4e
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x1006cb4e
push esi
call fcn.1001d450
add esp, 4
mov dword [ebp - 0x1c], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x1006cb46
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
add eax, 0x10
mov dword [ebp + 8], eax
jmp 0x1006cb5a
push dword [eax - 0xc]
lea ecx, [ebp + 8]
push eax
call fcn.10020080
or ebx, 0xffffffff
mov byte [ebp - 4], 1
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1006cb75
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 1
push 0x1019606c
lea ecx, [ebp - 0x10]
call fcn.1006c340
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
jl 0x1006cbb1
push 0x1019606c
push eax
call fcn.10150619
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x1006cbb1
mov eax, dword [ebp + 8]
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x1006c983
mov edx, dword [ebp - 0x10]
mov eax, ebx
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1006cbcf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x1006cbee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070216
call fcn.10017a40
push 0x80004005
call fcn.10017a40
int3