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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419409
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x424320]
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, edx
mov dword [ebp - 0x60], ebx
mov esi, ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x64], 0
cmp dword [ebx + 0x14], 8
mov dword [ebp - 0x68], esi
jb 0x409a3d
mov eax, dword [ebx]
jmp 0x409a3f
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x409a4f
test al, 0x10
jne 0x409a66
cmp dword [ebx + 0x14], 8
jb 0x409a59
mov eax, dword [ebx]
jmp 0x409a5b
mov eax, ebx
push 0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0x1e
xor eax, eax
mov dword [ebp - 0x44], 7
push str.GetUniqueDirectoryName_BEGIN:
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.00404f00
push ebx
lea edx, [ebp - 0x58]
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x40]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.004030c0
cmp dword [ebp - 0x2c], 8
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
jb 0x409ac0
push dword [ebp - 0x40]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x409ae2
push dword [ebp - 0x58]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 3
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], eax
mov word [esi], ax
mov dword [ebp - 0x64], 1
mov dword [ebp - 0x5c], eax
mov edx, eax
lea ecx, [ebp - 0x58]
call fcn.004016d0
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call fcn.0040d8a0
mov edi, eax
add esp, 4
cmp esi, edi
je 0x409b99
cmp dword [esi + 0x14], 8
jb 0x409b41
push dword [esi]
call ebx
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 0x409b70
mov eax, dword [edi + 0x10]
inc eax
je 0x409b7a
add eax, eax
push eax
push edi
push esi
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x409b7a
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 - 0x5c]
cmp dword [ebp - 0x2c], 8
jb 0x409baa
push dword [ebp - 0x40]
call ebx
add esp, 4
xor eax, eax
mov byte [ebp - 4], 3
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x409bd0
push dword [ebp - 0x58]
call ebx
add esp, 4
mov edx, dword [ebp - 0x60]
lea ecx, [ebp - 0x40]
push esi
call fcn.00409e20
mov edi, eax
add esp, 4
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x409c53
cmp dword [ebp - 0x14], 8
jb 0x409bf6
push dword [ebp - 0x28]
call ebx
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 0x409c29
mov eax, dword [edi + 0x10]
inc eax
je 0x409c34
add eax, eax
push eax
lea eax, [ebp - 0x28]
push edi
push eax
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x409c34
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 - 0x2c], 8
jb 0x409c61
push dword [ebp - 0x40]
call ebx
add esp, 4
push 0x12
xor eax, eax
mov dword [ebp - 0x44], 7
push str.Unique_Name_tried
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.00404f00
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 5
push eax
lea edx, [ebp - 0x58]
lea ecx, [ebp - 0x40]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 6
mov ecx, eax
call fcn.004030c0
cmp dword [ebp - 0x2c], 8
jb 0x409cb5
push dword [ebp - 0x40]
call ebx
add esp, 4
xor eax, eax
mov byte [ebp - 4], 3
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x409cdb
push dword [ebp - 0x58]
call ebx
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 - 0x5c]
jne 0x409b14
push 0x11
xor eax, eax
mov dword [ebp - 0x44], 7
push str.Final_Unique_Name
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.00404f00
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 7
push eax
lea edx, [ebp - 0x58]
lea ecx, [ebp - 0x40]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 8
mov ecx, eax
call fcn.004030c0
cmp dword [ebp - 0x2c], 8
jb 0x409d4c
push dword [ebp - 0x40]
call ebx
add esp, 4
xor eax, eax
mov byte [ebp - 4], 3
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x409d72
push dword [ebp - 0x58]
call ebx
add esp, 4
push 0x26
xor eax, eax
mov dword [ebp - 0x44], 7
push str.GetUniqueDirectoryName_END_:__uniq__:
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.00404f00
push esi
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x40]
call fcn.00406380
add esp, 4
xor dl, dl
mov byte [ebp - 4], 0xa
mov ecx, eax
call fcn.004030c0
cmp dword [ebp - 0x2c], 8
jb 0x409dc3
push dword [ebp - 0x40]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x409de5
push dword [ebp - 0x58]
call ebx
add esp, 4
cmp dword [ebp - 0x14], 8
jb 0x409df3
push dword [ebp - 0x28]
call ebx
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.004176f4
mov esp, ebp
pop ebp
ret