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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44c
mov eax, dword [0x437c20]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
cmp dword [ebp + 8], 0
je 0x40d806
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40d806
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, dword [ebp + 0xc]
movzx eax, word [edx]
test eax, eax
jne 0x40d815
jmp 0x40da08
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
mov dword [ebp - 0x218], edx
mov eax, dword [ebp - 0x218]
movzx ecx, word [eax]
test ecx, ecx
je 0x40d867
mov edx, dword [ebp - 0x218]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x40d84d
mov ecx, dword [ebp - 0x218]
movzx edx, word [ecx]
cmp edx, 0x5c
jne 0x40d856
mov eax, dword [ebp - 0x218]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x218]
add ecx, 2
mov dword [ebp - 0x218], ecx
jmp 0x40d824
mov edx, dword [ebp - 4]
mov dword [ebp - 0x214], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
je 0x40d8ca
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp + 0xc]
sar ecx, 1
shl ecx, 1
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x420]
push eax
call fcn.0041f750
add esp, 0xc
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp + 0xc]
sar ecx, 1
xor edx, edx
mov word [ebp + ecx*2 - 0x420], dx
lea eax, [ebp - 0x420]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040d7d0
add esp, 8
mov edx, dword [ebp - 0x214]
add edx, 2
mov dword [ebp - 0x214], edx
xor eax, eax
mov word [ebp - 0x210], ax
cmp dword [ebp + 8], 0
je 0x40d942
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x424], ecx
lea edx, [ebp - 0x210]
mov dword [ebp - 0x428], edx
mov eax, dword [ebp - 0x428]
mov dword [ebp - 0x42c], eax
mov ecx, dword [ebp - 0x424]
mov dx, word [ecx]
mov word [ebp - 0x42e], dx
mov eax, dword [ebp - 0x428]
mov cx, word [ebp - 0x42e]
mov word [eax], cx
mov edx, dword [ebp - 0x424]
add edx, 2
mov dword [ebp - 0x424], edx
mov eax, dword [ebp - 0x428]
add eax, 2
mov dword [ebp - 0x428], eax
cmp word [ebp - 0x42e], 0
jne 0x40d8fa
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x434], ecx
mov edx, dword [ebp - 0x434]
mov dword [ebp - 0x438], edx
mov eax, dword [ebp - 0x434]
mov cx, word [eax]
mov word [ebp - 0x43a], cx
add dword [ebp - 0x434], 2
cmp word [ebp - 0x43a], 0
jne 0x40d957
mov edx, dword [ebp - 0x434]
sub edx, dword [ebp - 0x438]
mov eax, dword [ebp - 0x438]
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x444], edx
lea ecx, [ebp - 0x210]
add ecx, 0xfffffffe
mov dword [ebp - 0x448], ecx
mov edx, dword [ebp - 0x448]
mov ax, word [edx + 2]
mov word [ebp - 0x44a], ax
add dword [ebp - 0x448], 2
cmp word [ebp - 0x44a], 0
jne 0x40d9a5
mov edi, dword [ebp - 0x448]
mov esi, dword [ebp - 0x440]
mov edx, dword [ebp - 0x444]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40da08
push 0
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004188aa
mov esp, ebp
pop ebp
ret