Function at 0x10045a6
Capabilities:
Check if file exists
Create directory
Delete directory
Get common file path
Get disk information
Get disk size
Get file attributes
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x100c02c]
and dword [ebp - 0x23c], 0
or dword [ebp - 0x21c], 0xffffffff
push esi
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
push eax
mov dword [ebp - 0x218], eax
call esi
pop ecx
lea ecx, [eax + 1]
cmp ecx, 0x104
ja 0x10045ee
mov eax, 0x20a
jmp 0x10045f2
lea eax, [eax + eax + 2]
mov edi, dword [sym.imp.msvcrt.dll_malloc]
push eax
mov dword [ebp - 0x224], eax
call edi
test eax, eax
pop ecx
mov dword [ebp - 0x214], eax
jne 0x1004614
push 8
pop eax
jmp 0x100493f
push ebx
mov ebx, 0x1001510
push ebx
call esi
mov ecx, dword [ebp - 0x224]
lea eax, [ecx + eax*2]
push eax
call edi
mov edi, eax
xor esi, esi
cmp edi, esi
pop ecx
pop ecx
mov dword [ebp - 0x220], edi
jne 0x100464e
push dword [ebp - 0x214]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push 8
pop eax
jmp 0x100493e
push dword [ebp - 0x224]
push dword [ebp - 0x214]
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
test eax, eax
je 0x10046d7
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 4
je 0x10048ec
cmp eax, 5
je 0x10048ec
push esi
push esi
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x10046d7
mov eax, dword [0x100cda4]
mov dword [ebp - 0x228], eax
mov eax, dword [0x100cda0]
mov dword [ebp - 0x240], eax
lea eax, [ebp - 0x254]
push eax
push esi
push esi
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
jne 0x10046e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1004924
push dword [ebp - 0x214]
push edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push ebx
push edi
call dword [sym.imp.msvcrt.dll_wcscat]
add esp, 0x10
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x100471e
call edi
mov ebx, eax
cmp ebx, 0xb7
jne 0x1004924
lea eax, [ebp - 0x210]
push eax
push esi
push 0x1001508
push dword [ebp - 0x220]
mov dword [ebp - 0x23c], 1
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x1004797
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1004797
test bh, 0x40
je 0x1004770
push esi
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.ADVAPI32.dll_DecryptFileW]
test eax, eax
je 0x1004797
push esi
push 0x24000080
push 3
push esi
push esi
push 0x40000000
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x21c], eax
jne 0x10047a0
call edi
mov ebx, eax
jmp 0x1004918
test bh, 8
je 0x10047d7
push esi
lea ecx, [ebp - 0x224]
push ecx
push esi
push esi
push 2
lea ecx, [ebp - 0x218]
push ecx
push 0x9c040
push eax
mov dword [ebp - 0x218], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10047d7
call edi
mov ebx, eax
jmp 0x10048ef
push esi
push 0x64
push dword [ebp - 0x250]
mov dword [ebp - 0x230], esi
push dword [ebp - 0x254]
mov dword [ebp - 0x22c], esi
call fcn.01005dd0
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x238], eax
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x244], edx
mov dword [ebp - 0x234], edx
mov dword [ebp - 0x218], eax
mov ebx, dword [ebp - 0x234]
cmp dword [ebp - 0x22c], ebx
jb 0x100485d
ja 0x1004839
mov eax, dword [ebp - 0x238]
cmp dword [ebp - 0x230], eax
jb 0x100485d
push 0x1001504
call dword [sym.imp.msvcrt.dll_printf]
mov eax, dword [ebp - 0x248]
add dword [ebp - 0x238], eax
pop ecx
adc ebx, dword [ebp - 0x244]
mov dword [ebp - 0x234], ebx
push dword [ebp - 0x218]
push 0x100cc80
call fcn.01003ec2
push esi
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x218]
push dword [ebp - 0x240]
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10048ad
call edi
cmp eax, 0x70
jne 0x10048c4
mov eax, dword [ebp - 0x24c]
xor ebx, ebx
cmp dword [ebp - 0x218], eax
jbe 0x10048c8
jmp 0x1004815
mov eax, dword [ebp - 0x228]
add dword [ebp - 0x230], eax
adc dword [ebp - 0x22c], esi
jmp 0x100481b
call edi
mov ebx, eax
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
call fcn.010040d7
push dword [ebp - 0x21c]
push dword [ebp - 0x214]
call fcn.0100424f
jmp 0x10048ef
push 0x32
pop ebx
cmp dword [ebp - 0x21c], 0xffffffff
je 0x1004910
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x23c], esi
je 0x1004924
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push dword [ebp - 0x214]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x220]
call esi
pop ecx
pop ecx
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.010058ab
leave
ret 4