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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x412e89
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x41a3b0]
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 ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0
cmp dword [ebx + 0x14], 8
mov dword [ebp - 0x34], esi
jb 0x40626c
mov eax, dword [ebx]
jmp 0x40626e
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40627e
test al, 0x10
jne 0x406293
cmp dword [ebx + 0x14], 8
jb 0x406288
mov eax, dword [ebx]
jmp 0x40628a
mov eax, ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], eax
mov dword [ebp - 4], 1
mov word [esi], ax
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.00407990
push eax
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 2
push str.Resource
push eax
call fcn.00404f80
mov edi, eax
add esp, 0x14
cmp esi, edi
je 0x406353
cmp dword [esi + 0x14], 8
jb 0x4062fb
push dword [esi]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [edi + 0x14], 8
jae 0x40632a
mov eax, dword [edi + 0x10]
inc eax
je 0x406334
add eax, eax
push eax
push edi
push esi
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x406334
mov eax, dword [edi]
mov dword [esi], eax
mov dword [edi], 0
mov eax, dword [edi + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [edi + 0x14]
mov dword [esi + 0x14], eax
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
inc dword [ebp - 0x2c]
cmp dword [ebp - 0x38], 8
jb 0x406367
push dword [ebp - 0x4c]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x38], 7
cmp dword [ebp - 0x50], 8
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x4c], ax
mov byte [ebp - 4], 1
jb 0x406390
push dword [ebp - 0x64]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
push esi
lea eax, [ebp - 0x64]
push ebx
push eax
call fcn.00405370
mov edi, eax
add esp, 0xc
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x406415
cmp dword [ebp - 0x14], 8
jb 0x4063b8
push dword [ebp - 0x28]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp dword [edi + 0x14], 8
jae 0x4063eb
mov eax, dword [edi + 0x10]
inc eax
je 0x4063f6
add eax, eax
push eax
lea eax, [ebp - 0x28]
push edi
push eax
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x4063f6
mov eax, dword [edi]
mov dword [ebp - 0x28], eax
mov dword [edi], 0
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
cmp dword [ebp - 0x50], 8
jb 0x406426
push dword [ebp - 0x64]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, dword [ebp - 0x2c]
jne 0x4062c5
cmp dword [ebp - 0x14], 8
jb 0x406454
push dword [ebp - 0x28]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
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.00411746
mov esp, ebp
pop ebp
ret