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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10155940
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x101a154c]
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 0x10066762
cmp dword [eax - 4], 1
jle 0x100664e3
push dword [eax - 0xc]
lea ecx, [ebp + 8]
call fcn.100147b0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x1006675f
call fcn.10017d20
mov ecx, eax
test ecx, ecx
je 0x1006679a
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 0x1006651e
or edi, 0xffffffff
jmp 0x1006653e
push 0x10161eac
push eax
call fcn.10121589
mov edi, eax
add esp, 8
mov eax, dword [ebp + 8]
test edi, edi
jne 0x1006653a
or edi, 0xffffffff
jmp 0x1006653e
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 0x1006656e
add eax, 0xfffffff0
push eax
call fcn.10019b20
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
jmp 0x1006659a
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x1006657e
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x1006658a
call fcn.10017d20
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.100610b0
mov esi, dword [ebp - 0x14]
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
push esi
call fcn.10065ea0
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100665c6
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 0x100665dd
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
call fcn.100147b0
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10066605
cmp dword [esi - 4], 1
jle 0x100665fc
push dword [esi - 0xc]
lea ecx, [ebp - 0x10]
call fcn.100147b0
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 0x10066790
lea ecx, [esi + edi]
cmp ecx, ebx
jle 0x1006663b
mov esi, ebx
sub esi, edi
xor ecx, ecx
cmp edi, ebx
cmovle ecx, esi
mov dword [ebp - 0x1c], ecx
test edi, edi
jne 0x10066661
cmp ecx, ebx
jne 0x10066661
add eax, 0xfffffff0
push eax
call fcn.10019b20
add esp, 4
add eax, 0x10
mov dword [ebp - 0x18], eax
jmp 0x10066693
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x10066671
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x1006667d
call fcn.10017d20
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.100610b0
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 0x100666ea
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x100666de
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x100666de
push esi
call fcn.10019b20
add esp, 4
mov dword [ebp - 0x1c], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x100666d6
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 0x100666ea
push dword [eax - 0xc]
lea ecx, [ebp + 8]
push eax
call fcn.1001c8c0
or ebx, 0xffffffff
mov byte [ebp - 4], 1
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10066705
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 1
push 0x10161eac
lea ecx, [ebp - 0x10]
call fcn.10065ea0
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0
jl 0x10066741
push 0x10161eac
push eax
call fcn.10121589
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x10066741
mov eax, dword [ebp + 8]
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x10066513
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 0x1006675f
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 0x1006677e
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.100142b0
push 0x80004005
call fcn.100142b0
int3