Function at 0x45f470
Capabilities:
Check if file exists
Create directory
Get file attributes
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x40cc
call fcn.0053af80
mov eax, dword [0x624500]
xor eax, esp
mov dword [esp + 0x40c8], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x48], eax
mov dword [esp + 0xb0], 0x462620
mov dword [esp + 0xb4], 0x462680
mov dword [esp + 0xb8], 0x462690
mov dword [esp + 0xbc], 0x4626e0
mov dword [esp + 0xc0], ecx
mov dword [esp + 0xc8], 0
mov dword [esp + 0xc4], 0
call fcn.00462700
lea ecx, [esp + 0x58]
call fcn.0045fc80
lea eax, [esp + 0x50]
mov dword [esp + 0x10], 0x462570
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x18], 0x462590
push eax
lea edx, [esp + 0xb8]
mov dword [esp + 0x58], 0x462570
mov dword [esp + 0x5c], 0x462590
call fcn.00461b30
mov ebx, eax
add esp, 8
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x45f54a
lea edx, [esp + 0x10]
lea ecx, [esp + 0x58]
call fcn.0045fcf0
xor edi, edi
mov dword [esp + 0x34], edi
test ebx, ebx
jne 0x45f8b4
xor ecx, ecx
mov dword [esp + 0x44], 0xffffffff
mov dword [esp + 0x30], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x2c], ecx
cmp dword [esp + 0x74], ecx
jbe 0x45f8a4
mov eax, dword [esp + 0x68]
add eax, 0x1d
mov dword [esp + 0x18], eax
nop dword [eax]
nop word [eax + eax]
mov eax, dword [esp + 0x98]
push dword [esp + 0x24]
mov esi, dword [eax + ecx*4 + 4]
sub esi, dword [eax + ecx*4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
add ebx, ebx
cmp esi, dword [esp + 0x34]
jbe 0x45f5e0
push edi
call fcn.00594e3b
lea eax, [esi + 1]
mov dword [esp + 0x38], esi
lea eax, [ebx + eax*2]
add esp, 4
test eax, eax
je 0x45f95a
push eax
call fcn.0059fc52
mov edi, eax
add esp, 4
test edi, edi
je 0x45f95c
mov esi, dword [esp + 0x24]
push ebx
push esi
push edi
call fcn.0058cce0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0xc
push esi
call ebx
mov ecx, 0x5c
push esi
mov word [edi + eax*2], cx
call ebx
mov ebx, dword [esp + 0x2c]
inc eax
mov edx, dword [esp + 0x98]
lea ecx, [edi + eax*2]
mov eax, dword [edx + ebx*4]
mov edx, dword [edx + ebx*4 + 4]
sub edx, eax
test ecx, ecx
je 0x45f644
mov esi, dword [esp + 0x9c]
lea esi, [esi + eax*2]
test edx, edx
je 0x45f640
sub esi, ecx
mov ax, word [esi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x45f630
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x38], 0
mov dword [esp + 0x28], 0
cmp byte [eax - 4], 0
jne 0x45f6a3
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x5c]
push eax
push ebx
lea edx, [esp + 0xd0]
lea ecx, [esp + 0x78]
call fcn.004620d0
mov ebx, eax
add esp, 0x20
mov dword [esp + 0x1c], ebx
test ebx, ebx
jne 0x45f8a4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [eax + 1]
movzx ecx, word [edi + ebx*2]
lea esi, [edi + ebx*2]
test cx, cx
je 0x45f6ea
nop dword [eax]
cmp cx, 0x2f
jne 0x45f6db
xor eax, eax
push eax
push edi
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, 0x5c
mov word [esi], ax
inc ebx
movzx eax, word [edi + ebx*2]
lea esi, [edi + ebx*2]
mov ecx, eax
test ax, ax
jne 0x45f6c0
mov ebx, dword [esp + 0x18]
add ebx, 0xffffffe3
mov dword [esp + 0x20], ebx
cmp byte [ebx + 0x19], 0
je 0x45f709
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x45f888
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x45f72a
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x45f72a
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 + 0x3c], esi
cmp esi, 0xffffffff
je 0x45f759
xor eax, eax
mov dword [esp + 0x1c], eax
jmp 0x45f7e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x45f7e4
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x45f7dc
lea edx, [esp + 0x40d0]
mov dword [esp + 0x40d0], ebx
mov dword [esp + 0xac], edi
mov eax, dword [ecx]
push edx
lea edx, [esp + 0xb0]
push edx
call dword [eax + 8]
test eax, eax
jne 0x45f7d3
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 + 0x3c], esi
cmp esi, 0xffffffff
je 0x45f7c5
xor eax, eax
mov dword [esp + 0x1c], eax
jmp 0x45f7e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [esp + 0x1c], ebx
jmp 0x45f7dc
cmp eax, 1
je 0x45f888
test ebx, ebx
jne 0x45f966
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
lea edx, [edx + ecx]
lea ecx, [esp + 0x40]
call fcn.004623b0
add esp, 4
test eax, eax
jne 0x45f966
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x20], eax
jne 0x45f966
mov eax, dword [esp + 0x18]
cmp byte [eax - 1], 0
je 0x45f838
push ebx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp esi, 0xffffffff
je 0x45f856
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x45f856
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x45f966
mov eax, dword [esp + 0x18]
cmp byte [eax], 0
je 0x45f869
push dword [eax - 9]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x45f888
mov dword [esp + 0xac], edi
lea edx, [esp + 0xac]
mov eax, dword [ecx]
push edx
call dword [eax + 8]
mov ecx, dword [esp + 0x2c]
add dword [esp + 0x18], 0x20
inc ecx
mov dword [esp + 0x2c], ecx
cmp ecx, dword [esp + 0x74]
jb 0x45f590
mov ebx, dword [esp + 0x1c]
push dword [esp + 0x30]
lea eax, [esp + 0x14]
push eax
call dword [esp + 0x1c]
add esp, 8
push dword [esp + 0x88]
lea eax, [esp + 0x14]
push eax
call dword [esp + 0x1c]
push dword [esp + 0x94]
lea eax, [esp + 0x1c]
push eax
call dword [esp + 0x24]
push dword [esp + 0xa0]
lea eax, [esp + 0x24]
push eax
call dword [esp + 0x2c]
push dword [esp + 0xac]
lea eax, [esp + 0x2c]
push eax
call dword [esp + 0x34]
push dword [esp + 0xb8]
lea eax, [esp + 0x34]
push eax
call dword [esp + 0x3c]
push dword [esp + 0xc4]
lea eax, [esp + 0x3c]
push eax
call dword [esp + 0x44]
lea edx, [esp + 0x40]
mov dword [esp + 0xcc], 0
lea ecx, [esp + 0x88]
mov dword [esp + 0xd0], 0
call fcn.0045fb00
push edi
call fcn.00594e3b
mov ecx, dword [esp + 0x4108]
add esp, 0x34
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00539e65
mov esp, ebp
pop ebp
ret
xor edi, edi
mov ebx, 2
jmp 0x45f8a4
mov ebx, 0xb
jmp 0x45f8a4