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

Disassembly:
push ebp
lea ebp, [esp - 0x1cc]
sub esp, 0x244
mov eax, dword [0xaff3f4]
xor eax, ebp
mov dword [ebp + 0x1c8], eax
push esi
push edi
cmp dword [ebp + 0x1d4], 0
je 0x4214e6
push dword [ebp + 0x1d4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4214e6
push 0
push dword [ebp + 0x1d4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [ebp + 0x1d8]
movsx eax, byte [eax]
test eax, eax
jne 0x4214f8
jmp 0x42168b
mov eax, dword [ebp + 0x1d8]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
movsx eax, byte [eax]
test eax, eax
je 0x421536
mov eax, dword [ebp - 0x48]
movsx eax, byte [eax]
cmp eax, 0x2f
je 0x421527
mov eax, dword [ebp - 0x48]
movsx eax, byte [eax]
cmp eax, 0x5c
jne 0x42152d
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x48]
inc eax
mov dword [ebp - 0x48], eax
jmp 0x421507
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp + 0x1d8]
je 0x42159f
mov eax, dword [ebp - 0x4c]
sub eax, dword [ebp + 0x1d8]
push eax
push dword [ebp + 0x1d8]
lea eax, [ebp - 0x40]
push eax
call fcn.00650d40
add esp, 0xc
mov eax, dword [ebp - 0x4c]
sub eax, dword [ebp + 0x1d8]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0x104
jae 0x42157a
jmp 0x42157f
call fcn.0064e577
mov eax, dword [ebp - 0x60]
mov byte [ebp + eax - 0x40], 0
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 0x1d4]
call fcn.004214a1
pop ecx
pop ecx
mov eax, dword [ebp - 0x64]
inc eax
mov dword [ebp - 0x64], eax
xor eax, eax
inc eax
imul eax, eax, 0
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0x104
jae 0x4215b3
jmp 0x4215b8
call fcn.0064e577
mov eax, dword [ebp - 0x68]
mov byte [ebp + eax + 0xc4], 0
cmp dword [ebp + 0x1d4], 0
je 0x421608
mov eax, dword [ebp + 0x1d4]
mov dword [ebp - 0x5c], eax
lea eax, [ebp + 0xc4]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x5c]
mov al, byte [eax]
mov byte [ebp - 0x41], al
mov eax, dword [ebp - 0x54]
mov cl, byte [ebp - 0x41]
mov byte [eax], cl
mov eax, dword [ebp - 0x5c]
inc eax
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x54], eax
cmp byte [ebp - 0x41], 0
jne 0x4215e4
mov eax, dword [ebp + 0x1d8]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x50]
mov al, byte [eax]
mov byte [ebp - 0x42], al
inc dword [ebp - 0x50]
cmp byte [ebp - 0x42], 0
jne 0x421617
mov eax, dword [ebp - 0x50]
sub eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x74], eax
lea eax, [ebp + 0xc4]
dec eax
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
mov al, byte [eax + 1]
mov byte [ebp - 0x43], al
inc dword [ebp - 0x58]
cmp byte [ebp - 0x43], 0
jne 0x421641
mov edi, dword [ebp - 0x58]
mov esi, dword [ebp - 0x70]
mov eax, dword [ebp - 0x74]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp + 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x42168b
push 0
lea eax, [ebp + 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop esi
mov ecx, dword [ebp + 0x1c8]
xor ecx, ebp
call fcn.0064e653
add ebp, 0x1cc
mov esp, ebp
pop ebp
ret