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

Disassembly:
push 0xffffffffffffffff
push 0x42ab38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov eax, dword [ecx + 0x88]
push ebx
push ebp
push esi
sub eax, 0x10
push edi
push eax
call fcn.004015f0
add eax, 0x10
add esp, 4
mov dword [esp + 0x1c], eax
push 1
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x4c], 0
call fcn.004037d0
mov eax, dword [eax]
push 0x42d034
push eax
call fcn.0040edb6
add esp, 8
test eax, eax
mov eax, dword [esp + 0x18]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, bl
je 0x4068b4
push 1
push 0x42d034
lea ecx, [esp + 0x24]
call fcn.00403a10
mov ecx, dword [esp + 0x4c]
call fcn.00401fb0
mov edi, eax
test edi, edi
mov dword [esp + 0x24], edi
je 0x406cbb
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Name
call fcn.004018d0
mov ecx, dword [edi + 0x14]
lea eax, [esp + 0x14]
push eax
call fcn.004022b0
mov ecx, dword [esp + 0x10]
push 0x5c
push ecx
mov byte [esp + 0x4c], 1
call fcn.0040ef77
add esp, 8
test eax, eax
jne 0x406906
or eax, 0xffffffff
jmp 0x40690a
sub eax, dword [esp + 0x10]
inc eax
push eax
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x18]
call fcn.00403830
mov ecx, dword [eax]
mov esi, dword [esp + 0x10]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
mov byte [esp + 0x44], 2
je 0x406975
mov edx, dword [esi + 0xc]
test edx, edx
lea ebx, [esi + 0xc]
jl 0x406967
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x406967
push eax
call fcn.004015f0
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x40695e
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
add ebp, 0x10
mov dword [esp + 0x10], ebp
jmp 0x406975
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00401750
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x44], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406998
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x406b72
mov dword [esp + 0x14], 2
call fcn.0041f494
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ebp, [eax + 0x10]
mov dword [esp + 0x18], ebp
mov byte [esp + 0x44], 3
lea esp, [esp]
mov esi, dword [esp + 0x14]
inc esi
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
js 0x406b53
cmp esi, ecx
jge 0x406b53
add eax, esi
push 0x5c
push eax
call fcn.0040eefc
add esp, 8
test eax, eax
je 0x406b53
mov ecx, dword [esp + 0x10]
sub eax, ecx
test eax, eax
jle 0x406b53
test esi, esi
mov eax, dword [ecx - 0xc]
jl 0x406a33
cmp esi, eax
jge 0x406a33
add esi, ecx
push 0x5c
push esi
call fcn.0040eefc
add esp, 8
test eax, eax
je 0x406a33
sub eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
jmp 0x406a3b
mov dword [esp + 0x14], 0xffffffff
mov eax, dword [esp + 0x14]
inc eax
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x18]
call fcn.00403830
mov eax, dword [eax]
lea esi, [eax - 0x10]
lea ebx, [ebp - 0x10]
cmp esi, ebx
mov byte [esp + 0x44], 4
je 0x406afb
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jl 0x406ae9
mov ecx, dword [esi]
cmp ecx, dword [ebx]
jne 0x406ae9
mov edx, dword [ecx]
call dword [edx + 0x10]
mov edx, dword [esi + 0xc]
test edx, edx
lea ecx, [esi + 0xc]
jl 0x406a91
cmp eax, dword [esi]
jne 0x406a91
mov ebp, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x406ac9
mov ecx, dword [esi + 4]
mov edx, dword [eax]
push 1
push ecx
mov ecx, eax
call dword [edx]
mov ebp, eax
test ebp, ebp
je 0x406d07
mov edx, dword [esi + 4]
mov dword [ebp + 4], edx
mov ecx, dword [esi + 4]
inc ecx
mov eax, ecx
shr ecx, 2
add esi, 0x10
lea edi, [ebp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x24]
or ecx, 0xffffffff
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406ae0
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
add ebp, 0x10
mov dword [esp + 0x18], ebp
jmp 0x406afb
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00401750
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x44], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406b1e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4069d0
cmp dword [ebp - 4], 1
jle 0x406b45
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [esp + 0x1c]
call fcn.004012e0
mov ebp, dword [esp + 0x18]
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x4069d0
lea eax, [ebp - 0x10]
mov byte [esp + 0x44], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406b72
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.Argu
call fcn.004018d0
mov ecx, dword [edi + 0x14]
lea eax, [esp + 0x3c]
push eax
call fcn.004022b0
mov eax, dword [eax]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x42d050
mov byte [esp + 0x50], 5
call fcn.004018d0
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [edi + 0x14]
call fcn.004022b0
mov eax, dword [eax]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push str.Name
mov byte [esp + 0x54], 6
call fcn.004018d0
mov ecx, dword [edi + 0x14]
lea edx, [esp + 0x3c]
push edx
call fcn.004022b0
mov esi, eax
add edi, 4
push edi
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov byte [esp + 0x58], 7
call fcn.00403d40
add esp, 0xc
mov esi, dword [esi]
mov eax, dword [eax]
push esi
push eax
mov byte [esp + 0x54], 8
call fcn.00409850
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
add esp, 0x10
mov byte [esp + 0x44], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406c2f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x44], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x44], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c75
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov byte [esp + 0x44], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c98
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x44], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406cbb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x4c]
call fcn.00401f90
test al, al
jne 0x4068b4
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x44], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406cf2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x38
ret 4
call fcn.004012d0
int3