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

Disassembly:
mov eax, 0x40c8
call fcn.0044d420
mov eax, dword [0x487590]
xor eax, esp
mov dword [esp + 0x40c4], eax
mov eax, dword [esp + 0x40d0]
push ebx
push ebp
push esi
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x40e0]
mov ebp, edx
push edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x48], eax
mov dword [esp + 0xb0], 0x434390
mov dword [esp + 0xb4], 0x4343f0
mov dword [esp + 0xb8], 0x434400
mov dword [esp + 0xbc], 0x434450
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc8], 0
mov dword [esp + 0xc4], 0
call fcn.00434470
lea ecx, [esp + 0x60]
call fcn.00431a30
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x18]
push eax
lea edx, [esp + 0xb8]
mov dword [esp + 0x1c], 0x4317b0
mov dword [esp + 0x20], 0x4317d0
mov dword [esp + 0x58], 0x4317b0
mov dword [esp + 0x5c], 0x4317d0
call fcn.00433cc0
mov ebx, eax
add esp, 8
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x43115f
lea edx, [esp + 0x14]
lea ecx, [esp + 0x60]
call fcn.00431aa0
xor edi, edi
mov dword [esp + 0x3c], edi
test ebx, ebx
jne 0x43148c
xor ecx, ecx
mov dword [esp + 0x5c], 0xffffffff
mov dword [esp + 0x28], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x34], ecx
cmp dword [esp + 0x7c], ecx
jbe 0x43147c
mov dword [esp + 0x2c], ecx
mov eax, dword [esp + 0xa0]
push ebp
mov esi, dword [eax + ecx*4 + 4]
sub esi, dword [eax + ecx*4]
lea ebx, [eax + ecx*4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebp, [eax*2 + 2]
cmp esi, dword [esp + 0x3c]
jbe 0x4311e5
push edi
call fcn.00438972
lea eax, [esi*2]
add esp, 4
mov dword [esp + 0x3c], esi
add eax, ebp
je 0x431468
push eax
call fcn.004388e0
mov edi, eax
add esp, 4
test edi, edi
je 0x43146a
lea eax, [ebp - 2]
mov ebp, dword [esp + 0x30]
push eax
push ebp
push edi
call fcn.00438f90
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0xc
push ebp
call esi
mov ecx, 0x5c
push ebp
mov word [edi + eax*2], cx
call esi
mov esi, dword [ebx]
mov edx, dword [ebx + 4]
lea ecx, [eax + 1]
sub edx, esi
lea ecx, [edi + ecx*2]
test ecx, ecx
je 0x43123d
mov eax, dword [esp + 0xa4]
lea esi, [eax + esi*2]
test edx, edx
je 0x43123d
sub esi, ecx
lea ecx, [ecx]
mov ax, word [esi + ecx]
mov word [ecx], ax
lea ecx, [ecx + 2]
dec edx
jne 0x431230
mov ebp, dword [esp + 0x2c]
add ebp, dword [esp + 0x70]
mov dword [esp + 0x40], 0
mov dword [esp + 0x20], 0
cmp byte [ebp + 0x19], 0
mov dword [esp + 0x24], ebp
jne 0x4312aa
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x74]
push eax
push dword [esp + 0x50]
lea edx, [esp + 0xd0]
lea ecx, [esp + 0x80]
call fcn.00434090
mov ebx, eax
add esp, 0x20
mov dword [esp + 0x1c], ebx
test ebx, ebx
jne 0x43147c
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [eax + 1]
cmp word [edi + ebx*2], 0
lea esi, [edi + ebx*2]
je 0x4312eb
mov ebp, 0x5c
cmp word [esi], 0x2f
jne 0x4312dc
xor eax, eax
push eax
push edi
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov word [esi], bp
inc ebx
cmp word [edi + ebx*2], 0
lea esi, [edi + ebx*2]
jne 0x4312c6
mov ebp, dword [esp + 0x24]
cmp byte [ebp + 0x19], 0
je 0x4312ff
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x43144b
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x431320
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x431320
and eax, 0xfffffffe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x24], esi
cmp esi, 0xffffffff
je 0x43134c
xor eax, eax
mov dword [esp + 0x1c], eax
jmp 0x4313cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x4313cb
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x4313c3
lea edx, [esp + 0x4c]
push edx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x3c], edi
mov eax, dword [ecx]
lea edx, [esp + 0x3c]
push edx
call dword [eax + 8]
test eax, eax
jne 0x4313ba
push eax
push 0x80
push 2
push eax
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x24], esi
cmp esi, 0xffffffff
je 0x4313ac
xor eax, eax
mov dword [esp + 0x1c], eax
jmp 0x4313cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [esp + 0x1c], ebx
jmp 0x4313c3
cmp eax, 1
je 0x43144b
test ebx, ebx
jne 0x431471
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x20]
lea eax, [esp + 0x20]
lea edx, [edx + ecx]
push eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x24], ebx
call fcn.00431650
add esp, 4
test eax, eax
jne 0x431471
cmp dword [esp + 0x20], ebx
jne 0x431471
cmp byte [ebp + 0x1c], al
je 0x431408
push ebp
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp esi, 0xffffffff
je 0x431422
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x431422
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x431471
cmp byte [ebp + 0x1d], 0
je 0x431432
push dword [ebp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x58]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x43144b
mov dword [esp + 0x38], edi
mov eax, dword [ecx]
lea edx, [esp + 0x38]
push edx
call dword [eax + 8]
mov ecx, dword [esp + 0x34]
add dword [esp + 0x2c], 0x20
inc ecx
mov dword [esp + 0x34], ecx
cmp ecx, dword [esp + 0x7c]
jae 0x431478
mov ebp, dword [esp + 0x30]
jmp 0x431191
xor edi, edi
mov ebx, 2
jmp 0x43147c
mov ebx, 0xb
jmp 0x43147c
mov ebx, dword [esp + 0x1c]
push dword [esp + 0x28]
lea eax, [esp + 0x18]
push eax
call dword [esp + 0x20]
add esp, 8
push dword [esp + 0x90]
lea eax, [esp + 0x18]
push eax
call dword [esp + 0x20]
push dword [esp + 0x9c]
lea eax, [esp + 0x20]
push eax
call dword [esp + 0x28]
push dword [esp + 0xa8]
lea eax, [esp + 0x28]
push eax
call dword [esp + 0x30]
push dword [esp + 0xb4]
lea eax, [esp + 0x30]
push eax
call dword [esp + 0x38]
push dword [esp + 0xc0]
lea eax, [esp + 0x38]
push eax
call dword [esp + 0x40]
push dword [esp + 0xcc]
lea eax, [esp + 0x40]
push eax
call dword [esp + 0x48]
lea edx, [esp + 0x44]
lea ecx, [esp + 0x90]
mov dword [esp + 0xd4], 0
mov dword [esp + 0xd8], 0
call fcn.00431990
push edi
call fcn.00438972
mov ecx, dword [esp + 0x4108]
add esp, 0x34
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00437bed
add esp, 0x40c8
ret