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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x160c
call fcn.00403260
call fcn.00401d48
push 0x40d184
call fcn.004029f0
test eax, eax
pop ecx
jbe 0x40159c
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 - 0x3c]
mov dword [0x40e5a8], esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov al, byte [0x40e9b8]
lea edi, [ebp - 0x7f]
mov byte [ebp - 0x80], 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 - 0x80]
push 0x40b0b0
push eax
call fcn.00402b00
pop ecx
dec edi
pop ecx
jne 0x4015d6
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 0x4015f5
push 0x40cd48
call fcn.004029f0
test eax, eax
pop ecx
jbe 0x401622
inc dword [0x40b040]
push dword [0x40b040]
lea eax, [ebp - 0x68]
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 0x40168b
cmp al, 0x20
jge 0x401688
mov byte [edi], bl
inc edi
cmp byte [edi], 0x20
jl 0x401653
push esi
call fcn.004029f0
push eax
call fcn.00402be0
mov ecx, dword [0x40d17c]
push esi
push eax
mov dword [ecx*4 + 0x40d150], eax
call fcn.00402af0
add esp, 0x10
inc dword [0x40d17c]
mov esi, edi
jmp 0x401649
inc edi
jmp 0x401649
push esi
call fcn.004029f0
push eax
call fcn.00402be0
mov ecx, dword [0x40d17c]
push esi
push eax
mov dword [ecx*4 + 0x40d150], eax
call fcn.00402af0
movzx eax, word [ebp - 0x2e]
push eax
inc dword [0x40d17c]
movzx eax, word [ebp - 0x30]
push eax
mov edi, 0x40e5b0
movzx eax, word [ebp - 0x32]
push eax
movzx eax, word [ebp - 0x34]
push eax
movzx eax, word [ebp - 0x36]
push eax
movzx eax, word [ebp - 0x3a]
push eax
movzx eax, word [ebp - 0x3c]
push eax
lea eax, [ebp - 0x80]
push eax
push edi
call fcn.00402a9e
mov esi, 0x40e1a8
push str.WNDCLASS_
push esi
call fcn.00402af0
push edi
push esi
call fcn.00402b00
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 - 0x88]
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 0x4017b0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x30
lea eax, [ebp - 0xb8]
push ebx
push eax
call fcn.00403200
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], 0x401f98
mov dword [ebp - 0x90], 0x40e1a8
mov dword [0x40b048], ecx
call dword [sym.imp.USER32.dll_RegisterClassExA]
test ax, ax
jne 0x401839
xor eax, eax
jmp 0x401d41
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401ccd
push str._apps
push esi
call fcn.00402b00
pop ecx
pop ecx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401868
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401ccd
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 - 0x84]
push eax
push 0x3ec
push dword [0x40d180]
call fcn.00401307
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x60c]
push esi
push eax
call fcn.00402af0
lea eax, [ebp - 0x60c]
push 0x40b0a0
push eax
call fcn.00402b00
push dword [ebp - 0xc]
lea eax, [ebp - 0x60c]
push eax
call fcn.00402b00
add esp, 0x38
lea eax, [ebp - 0x60c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401902
lea eax, [ebp - 0x60c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push 0x80
push 1
push ebx
push ebx
lea eax, [ebp - 0x60c]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebx
mov dword [ebp - 0x50], eax
je 0x401cbf
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 0x401cb6
mov esi, 0x40c548
push 0x40d584
push esi
call fcn.00402af0
push 0x40b094
push esi
call fcn.00402b00
push edi
push esi
call fcn.00402b00
push str..xml
push esi
call fcn.00402b00
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 - 0x4c]
push ebx
mov byte [ebp - 0x4c], al
call fcn.004022ba
push edi
call fcn.004029f0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x4c]
call fcn.004022f6
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004022ba
mov edi, 0x40dda8
push edi
call fcn.004029f0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.004022f6
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004022ba
mov edi, 0x40b088
push edi
call fcn.004029f0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.004022f6
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00401322
add esp, 0xc
lea ecx, [ebp - 0x2c]
push 1
call fcn.004022ba
push 1
lea ecx, [ebp - 0x1c]
call fcn.004022ba
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004022ba
mov edi, 0x40d988
push edi
call fcn.004029f0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.004022f6
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004022ba
mov edi, 0x40b084
push edi
call fcn.004029f0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.004022f6
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00401322
add esp, 0xc
lea ecx, [ebp - 0x1c]
push 1
call fcn.004022ba
push 1
lea ecx, [ebp - 0x2c]
call fcn.004022ba
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004022ba
lea eax, [ebp - 0x60c]
push eax
call fcn.004029f0
pop ecx
push eax
lea eax, [ebp - 0x60c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004022f6
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call fcn.004022ba
mov edi, 0x40b080
push edi
call fcn.004029f0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.004022f6
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00401322
add esp, 0xc
lea ecx, [ebp - 0x1c]
push 1
call fcn.004022ba
push 1
lea ecx, [ebp - 0x2c]
call fcn.004022ba
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x48]
cmp eax, ebx
jne 0x401b1e
mov eax, 0x409154
push eax
lea eax, [ebp - 0x64]
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 0x401ca2
mov eax, dword [ebp - 0x60]
cmp eax, ebx
jne 0x401b56
mov eax, 0x409154
lea ecx, [ebp - 8]
push ebx
push ecx
push dword [ebp - 0x5c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401b71
mov byte [0x40e9b4], 1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x40e9b4], bl
je 0x401ca2
push dword [0x40b040]
lea eax, [ebp - 0x70]
push eax
push 0x3ee
push dword [0x40d180]
call fcn.00401307
mov edi, 0x40c948
push 0x40d584
push edi
mov dword [ebp - 8], eax
call fcn.00402af0
push 0x40b07c
push edi
call fcn.00402b00
push 0x40e5b0
push edi
call fcn.00402b00
push str..bat
push edi
call fcn.00402b00
movzx eax, word [ebp - 0x3c]
movzx ecx, word [ebp - 0x3a]
imul eax, ecx
movzx ecx, word [ebp - 0x36]
add eax, ecx
push eax
call fcn.004031cb
lea eax, [ebp - 0x184]
push eax
call fcn.00401518
lea eax, [ebp - 0xfc]
push eax
call fcn.00401518
lea eax, [ebp - 0x1c8]
push eax
call fcn.00401518
add esp, 0x40
lea eax, [ebp - 0x20c]
push eax
call fcn.00401518
lea eax, [ebp - 0x140]
push eax
call fcn.00401518
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x20c]
push esi
push eax
lea eax, [ebp - 0x1c8]
push eax
lea eax, [ebp - 0xfc]
push eax
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x160c]
push dword [ebp - 8]
push eax
call fcn.00402a9e
add esp, 0x28
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 0x401ca2
lea eax, [ebp - 0x160c]
push eax
call fcn.004029f0
pop ecx
lea ecx, [ebp - 8]
push ebx
push ecx
push eax
lea eax, [ebp - 0x160c]
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 - 0x64]
call fcn.004022ba
push 1
lea ecx, [ebp - 0x4c]
call fcn.004022ba
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], ebx
je 0x401ccd
push dword [ebp - 4]
call fcn.00402526
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 0x401d37
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 0x401d1d
call fcn.00401000
mov eax, dword [0x40dd94]
pop edi
pop esi
pop ebx
leave
ret 0x10