Function at 0x4066e0
Capabilities:
Check if file exists
Create directory
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x551750
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x61308c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x68], ebx
xor eax, eax
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], eax
mov word [ebp - 0x28], ax
cmp word [edx], ax
jne 0x40673f
xor ecx, ecx
jmp 0x406753
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406744
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00404d30
mov byte [ebp - 4], 1
xor eax, eax
push eax
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0
push 0x587c78
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.00404d30
mov byte [ebp - 4], 2
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4067b4
test al, 0x10
ja 0x406992
push 1
push ecx
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0x5c
push eax
lea ecx, [ebp - 0x28]
call fcn.00406dc0
mov edi, dword [ebp - 0x18]
lea esi, [edi - 1]
cmp eax, esi
je 0x4067ee
push 1
push ecx
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0x2f
push eax
lea ecx, [ebp - 0x28]
call fcn.00406dc0
cmp eax, esi
jne 0x40686c
push esi
push 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.00406c60
mov esi, eax
mov byte [ebp - 4], 3
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x40683c
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40681f
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00407af0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x406855
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00404be0
mov edi, dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
xor esi, esi
test edi, edi
je 0x4068f8
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
cmp ecx, 8
cmovae eax, edx
cmp word [eax + esi*2], 0x5c
je 0x4068b6
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax + esi*2], 0x2f
je 0x4068b6
cmp ecx, 8
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x40]
cmovae eax, edx
movzx eax, word [eax + esi*2]
push eax
push 1
call fcn.004073d0
jmp 0x4068d1
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x68]
call fcn.00406af0
push 1
push 0x587c7c
lea ecx, [ebp - 0x40]
call fcn.00406f60
mov ecx, dword [ebp - 0x18]
lea eax, [ecx - 1]
cmp esi, eax
jne 0x4068ea
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x68]
call fcn.00406af0
mov ecx, dword [ebp - 0x18]
inc esi
cmp esi, ecx
jb 0x406876
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x68]
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x64]
mov eax, 0x2aaaaaab
sub ecx, ebx
imul ecx
sar edx, 2
mov edi, edx
shr edi, 0x1f
add edi, edx
cmp edi, 1
jbe 0x406961
lea esi, [ebx + 0x18]
dec edi
lea eax, [ebp - 0x40]
cmp eax, esi
je 0x40692a
push 0xffffffffffffffff
push 0
push esi
mov ecx, eax
call fcn.004048d0
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406959
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0x80
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
add esi, 0x18
sub edi, 1
jne 0x406917
push dword [ebp - 0x5c]
mov edx, dword [ebp - 0x64]
push ecx
mov ecx, ebx
call fcn.00407260
add esp, 8
lea eax, [ebp - 0x28]
mov edi, ebx
mov dword [ebp - 0x64], edi
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406999
test al, 0x10
jbe 0x406999
mov esi, 1
jmp 0x40699b
xor esi, esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x4069b4
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x4069e0
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x406a41
push dword [ebp - 0x5c]
mov edx, edi
push ecx
mov ecx, ebx
call fcn.00407260
mov ecx, dword [ebp - 0x6c]
mov eax, 0x2aaaaaab
sub ecx, ebx
add esp, 8
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push ebx
call fcn.004071a0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret