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, 0x8b8
call fcn.00401c60
push 0x40d184
call fcn.00402900
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 [0x40d180], eax
lea eax, [ebp - 0x50]
mov dword [0x40e5a8], esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov al, byte [0x40e9b8]
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.00402a10
pop ecx
dec edi
pop ecx
jne 0x401567
mov eax, 0x1d6
xor ecx, ecx
mov edi, 0x40bde0
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, 0x40c538
jl 0x401586
push 0x40cd48
call fcn.00402900
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 [0x40d14c], eax
mov esi, edi
mov dword [0x40d17c], 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.00402900
push eax
call fcn.00402af0
mov ecx, dword [0x40d17c]
push esi
push eax
mov dword [ecx*4 + 0x40d150], eax
call fcn.00402a00
add esp, 0x10
inc dword [0x40d17c]
mov esi, edi
jmp 0x4015dd
inc edi
jmp 0x4015dd
push esi
call fcn.00402900
push eax
call fcn.00402af0
mov ecx, dword [0x40d17c]
push esi
push eax
mov dword [ecx*4 + 0x40d150], eax
call fcn.00402a00
movzx eax, word [ebp - 0x42]
push eax
inc dword [0x40d17c]
movzx eax, word [ebp - 0x44]
push eax
mov edi, 0x40e5b0
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.004029ae
mov esi, 0x40e1a8
push str.WNDCLASS_
push esi
call fcn.00402a00
push edi
push esi
call fcn.00402a10
add esp, 0x44
push 0x40cd48
call fcn.00401142
push dword [0x40b040]
mov dword [0x40c540], eax
lea eax, [ebp - 0x6c]
mov dword [0x40c544], edx
push eax
push 0x3ed
push dword [0x40d180]
call fcn.00401307
push dword [0x40b040]
mov dword [0x40d178], eax
lea eax, [ebp - 0x84]
push eax
push 0x3e9
push dword [0x40d180]
call fcn.00401307
add esp, 0x24
mov esi, 0x40b9e0
mov dword [ebp - 4], eax
push ebx
push 0x1a
push esi
push dword [0x40d984]
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 [0x40d150]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push dword [0x40d154]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push esi
mov dword [0x40c53c], 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.004030e0
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], 0x401eb0
mov dword [ebp - 0x90], 0x40e1a8
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.00402a10
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 [0x40d180]
call fcn.00401307
push dword [0x40b040]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x80]
push eax
push 0x3ec
push dword [0x40d180]
call fcn.00401307
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x4b8]
push esi
push eax
call fcn.00402a00
lea eax, [ebp - 0x4b8]
push 0x40b0a0
push eax
call fcn.00402a10
push dword [ebp - 0xc]
lea eax, [ebp - 0x4b8]
push eax
call fcn.00402a10
add esp, 0x38
lea eax, [ebp - 0x4b8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401893
lea eax, [ebp - 0x4b8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push 0x80
push 1
push ebx
push ebx
lea eax, [ebp - 0x4b8]
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, 0x40c548
push 0x40d584
push esi
call fcn.00402a00
push 0x40b094
push esi
call fcn.00402a10
push edi
push esi
call fcn.00402a10
push str..xml
push esi
call fcn.00402a10
push dword [0x40b040]
lea eax, [ebp - 0xc]
push eax
push 0x3ea
push dword [0x40d180]
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.004021d2
push edi
call fcn.00402900
pop ecx
push eax
push edi
lea ecx, [ebp - 0x3c]
call fcn.0040220e
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004021d2
mov edi, 0x40dda8
push edi
call fcn.00402900
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040220e
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004021d2
mov edi, 0x40b088
push edi
call fcn.00402900
pop ecx
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.0040220e
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.004021d2
push 1
lea ecx, [ebp - 0x1c]
call fcn.004021d2
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004021d2
mov edi, 0x40d988
push edi
call fcn.00402900
pop ecx
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.0040220e
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004021d2
mov edi, 0x40b084
push edi
call fcn.00402900
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040220e
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.004021d2
push 1
lea ecx, [ebp - 0x2c]
call fcn.004021d2
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004021d2
lea eax, [ebp - 0x4b8]
push eax
call fcn.00402900
pop ecx
push eax
lea eax, [ebp - 0x4b8]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040220e
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004021d2
mov edi, 0x40b080
push edi
call fcn.00402900
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040220e
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.004021d2
push 1
lea ecx, [ebp - 0x2c]
call fcn.004021d2
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 [0x40e9b4], 1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x40e9b4], bl
je 0x401bba
push dword [0x40b040]
lea eax, [ebp - 0x58]
push eax
push 0x3ee
push dword [0x40d180]
call fcn.00401307
mov edi, 0x40c948
push 0x40d584
push edi
mov dword [ebp - 8], eax
call fcn.00402a00
push 0x40b07c
push edi
call fcn.00402a10
push 0x40e5b0
push edi
call fcn.00402a10
push str..bat
push edi
call fcn.00402a10
push esi
lea eax, [ebp - 0x8b8]
push dword [ebp - 8]
push eax
call fcn.004029ae
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 - 0x8b8]
push eax
call fcn.00402900
pop ecx
lea ecx, [ebp - 8]
push ebx
push ecx
push eax
lea eax, [ebp - 0x8b8]
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.004021d2
push 1
lea ecx, [ebp - 0x3c]
call fcn.004021d2
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], ebx
je 0x401be5
push dword [ebp - 4]
call fcn.0040243e
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 0x40e1b1
push 0x40e1a8
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
push ebx
push eax
mov dword [0x40d984], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push ebx
push ebx
mov esi, 0x40dd88
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 [0x40dd94]
pop edi
pop esi
pop ebx
leave
ret 0x10