Function at 0x46bf90
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x228
push ebx
push ebp
mov ebp, dword [esp + 0x234]
push esi
test ebp, ebp
push edi
je 0x46c328
mov esi, dword [esp + 0x240]
test esi, esi
je 0x46c328
push 0x5c
push ebp
call fcn.00431b20
mov edx, eax
add esp, 8
test edx, edx
je 0x46c328
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
inc edx
push edx
push esi
stosb byte es:[edi], al
push 0x5bf328
lea eax, [esp + 0x3c]
push 0x103
push eax
call fcn.004320c8
lea ecx, [esp + 0x44]
add esp, 0x14
xor ebx, ebx
mov esi, 0x57
test ecx, ecx
jne 0x46c051
push esi
mov dword [0x5e277c], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
xor ecx, ecx
test eax, eax
je 0x46c0c0
mov al, byte [esp + 0x244]
test al, 1
je 0x46c099
push 0xb7
mov dword [0x5e277c], 0xb7
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x228
ret
push 0
push 0
push 0
push 0
lea edx, [esp + 0x20]
push 0
lea eax, [esp + 0x44]
push edx
push eax
mov dword [esp + 0x2c], 0
call fcn.00489bb0
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x2c]
add esp, 0x1c
test ecx, ecx
je 0x46c083
mov ebx, eax
cmp eax, 0xffffffff
je 0x46c018
test al, 0x10
je 0x46c018
mov eax, 1
test al, bl
je 0x46c01a
mov ecx, eax
jmp 0x46c024
test ecx, ecx
je 0x46c0c0
test al, 2
je 0x46c0c0
push 5
mov dword [0x5e277c], 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x228
ret
lea edx, [esp + 0x30]
test edx, edx
je 0x46c32d
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x46c0ff
test al, 0x10
jne 0x46c2b0
lea ecx, [esp + 0x30]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x30]
push 0
push eax
call ebx
test eax, eax
jne 0x46c2b0
mov ecx, 0x40
lea edi, [esp + 0x135]
mov byte [esp + 0x134], al
push 0x103
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x34]
lea edx, [esp + 0x138]
push ecx
push edx
mov ebp, 1
stosb byte es:[edi], al
call fcn.00431a20
lea eax, [esp + 0x140]
push 0x5c
push eax
call fcn.00431b60
mov esi, eax
lea edi, [esp + 0x148]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x46c1b0
cmp byte [esp + 0x134], 0x5c
jne 0x46c1b0
cmp byte [esp + 0x135], 0x5c
jne 0x46c1b0
lea ecx, [esp + 0x136]
push 0x5c
push ecx
call fcn.00431b60
add esp, 8
test eax, eax
je 0x46c23e
inc eax
push 0x5c
push eax
call fcn.00431b60
add esp, 8
mov esi, eax
test esi, esi
je 0x46c23e
lea edx, [esp + 0x134]
mov byte [esi], 0
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x46c200
test bl, 1
je 0x46c1e8
and al, 0xfe
lea ecx, [esp + 0x134]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x134]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x46c282
cmp ebx, 0xffffffff
je 0x46c209
test edi, edi
jne 0x46c21b
lea eax, [esp + 0x134]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
test ebp, ebp
je 0x46c282
mov byte [esi], 0x5c
inc esi
push 0x5c
push esi
call fcn.00431b60
mov esi, eax
add esp, 8
test esi, esi
jne 0x46c1b8
test ebp, ebp
je 0x46c282
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x46c273
test al, 0x10
jne 0x46c27e
test al, 1
je 0x46c264
and al, 0xfe
push eax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x46c282
lea edx, [esp + 0x30]
push 0
push edx
call ebx
mov ebp, eax
test ebp, ebp
jne 0x46c2a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x5e277c], eax
je 0x46c33a
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x228
ret
mov ebp, dword [esp + 0x23c]
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x244]
mov edi, ebp
mov dword [esp + 0x18], eax
or ecx, 0xffffffff
xor eax, eax
push edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x34]
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0x46c350
dec ecx
push 0x10
push ebp
mov dword [esp + 0x24], 2
mov dword [esp + 0x2c], 1
mov dword [esp + 0x30], ebp
mov dword [esp + 0x3c], ecx
call fcn.0046a8a0
mov eax, dword [esp + 0x2c]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret
mov esi, 0x57
push esi
mov dword [0x5e277c], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x228
ret