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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44c
mov eax, dword [0x428044]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
cmp dword [ebp + 8], 0
je 0x40cde6
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40cde6
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 0x40cdf5
jmp 0x40cfe8
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 0x40ce47
mov edx, dword [ebp - 0x218]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x40ce2d
mov ecx, dword [ebp - 0x218]
movzx edx, word [ecx]
cmp edx, 0x5c
jne 0x40ce36
mov eax, dword [ebp - 0x218]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x218]
add ecx, 2
mov dword [ebp - 0x218], ecx
jmp 0x40ce04
mov edx, dword [ebp - 4]
mov dword [ebp - 0x214], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
je 0x40ceaa
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.00414390
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.0040cdb0
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 0x40cf22
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 0x40ceda
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 0x40cf37
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 0x40cf85
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 0x40cfe8
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.004107a7
mov esp, ebp
pop ebp
ret