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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x274
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], eax
mov esi, eax
call fcn.00416130
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004160d0
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
call fcn.0041fb54
push dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x10]
call fcn.0041e329
movzx eax, word [edi + esi*2 - 2]
add esp, 0x10
cmp eax, 0x5c
je 0x403f8b
cmp eax, 0x2f
jne 0x403f96
xor eax, eax
mov word [ebx + esi*2 - 2], ax
dec esi
mov dword [ebp - 4], esi
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [eax]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x404047
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403fc1
push eax
jmp 0x403fd6
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404047
test al, 0x10
jne 0x404047
push 0xb7
call edi
test esi, esi
jle 0x403ff5
nop dword [eax]
movzx eax, word [ebx + esi*2]
cmp eax, 0x2f
je 0x403ff3
cmp eax, 0x5c
je 0x403ff3
dec esi
test esi, esi
jg 0x403fe0
test esi, esi
je 0x403fff
xor eax, eax
mov word [ebx + esi*2], ax
jmp 0x403fa0
cmp dword [ebp - 4], 2
mov ecx, dword [ebp + 8]
jne 0x404024
mov ax, word [ecx]
or ax, 0x20
sub ax, 0x61
cmp ax, 0x19
ja 0x404024
cmp word [ecx + 2], 0x3a
je 0x4041b5
push ecx
push 0xc
push 1
call fcn.0040be50
add esp, 0xc
xor esi, esi
push dword [ebp - 0x10]
call fcn.0041e329
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x4040d5
lea eax, [ebp - 0x274]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x4040d5
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp - 0x274], 0x10
je 0x404099
push 0x10
call edi
push dword [ebp - 0x10]
xor esi, esi
call fcn.0041e329
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x434f50]
test eax, eax
je 0x4040c4
cmp eax, 2
jne 0x4041ea
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jns 0x4041ea
push ebx
call fcn.004048b0
add esp, 4
test eax, eax
jne 0x4041ea
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40412c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4040f2
push eax
jmp 0x404107
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40412c
test al, 0x10
jne 0x40412c
push 0xb7
call edi
push ebx
push 0xc
push 1
call fcn.0040be50
add esp, 0xc
xor esi, esi
push dword [ebp - 0x10]
call fcn.0041e329
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
cmp esi, eax
jge 0x4041b5
sub eax, esi
lea edi, [ebx + esi*2]
inc eax
push eax
mov eax, dword [ebp + 8]
lea eax, [eax + esi*2]
push eax
push edi
call fcn.0041b340
add esp, 0xc
lea eax, [esi + 1]
cmp word [edi], 0
cmove eax, esi
mov esi, eax
movzx eax, word [ebx + esi*2]
mov ecx, eax
test ax, ax
je 0x40417f
movzx eax, cx
cmp eax, 0x5c
je 0x40417f
cmp eax, 0x2f
je 0x40417f
movzx eax, word [ebx + esi*2 + 2]
inc esi
mov ecx, eax
test ax, ax
jne 0x404165
xor eax, eax
push eax
push ebx
mov word [ebx + esi*2], ax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4041ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4041d5
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4041ae
test al, 0x10
je 0x4041ce
mov eax, dword [ebp - 4]
cmp esi, eax
jl 0x404137
push dword [ebp - 0x10]
mov esi, 1
call fcn.0041e329
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xb7
jmp 0x4041d6
push eax
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
push ebx
push 0xc
push 1
call fcn.0040be50
add esp, 0xc
push dword [ebp - 0x10]
xor esi, esi
call fcn.0041e329
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret