Function at 0x4013c6
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
xor esi, esi
cmp dword [ebp + 0x10], esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
je 0x401457
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401422
push esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40141b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4015a4
mov dword [ebp - 8], 1
push 0x104
push dword [ebp + 0x10]
lea eax, [ebp - 0x114]
push eax
call edi
lea eax, [ebp - 0x114]
push eax
call ebx
mov esi, eax
cmp esi, 0x102
jae 0x401457
mov byte [ebp + esi - 0x114], 0x5c
inc esi
mov byte [ebp + esi - 0x114], 0
cmp dword [ebp + 0xc], 0xffff
jbe 0x401482
mov eax, 0x104
sub eax, esi
push eax
push dword [ebp + 0xc]
lea eax, [ebp + esi - 0x114]
push eax
call edi
lea eax, [ebp - 0x114]
push eax
call ebx
xor edi, edi
jmp 0x4014ed
movzx eax, word [ebp + 0xc]
push 0xa
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
mov dword [0x405384], eax
je 0x4014a1
call fcn.00401354
jmp 0x4014a3
xor eax, eax
test eax, eax
je 0x4015a4
mov eax, dword [0x405390]
mov ecx, 0x103
sub ecx, esi
cmp ecx, eax
jae 0x4014c2
mov eax, ecx
mov dword [0x405390], eax
xor edi, edi
xor ecx, ecx
cmp eax, edi
jbe 0x4014e0
mov edx, dword [0x40538c]
mov dl, byte [edx + ecx]
mov byte [ebp + esi - 0x114], dl
inc esi
inc ecx
cmp ecx, eax
jb 0x4014ca
mov byte [ebp + esi - 0x114], 0
call fcn.00401399
cmp word [ebp + 8], di
je 0x401517
movzx eax, word [ebp + 8]
push 0xa
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
mov dword [0x405384], eax
je 0x401511
call fcn.00401354
jmp 0x401513
xor eax, eax
cmp eax, edi
jne 0x40152e
cmp dword [0x40538c], edi
je 0x4015a4
cmp dword [0x405390], 0
je 0x4015a4
xor edi, edi
xor eax, eax
cmp dword [ebp + 0x14], edi
push edi
sete al
push 0x80
xor ebx, ebx
inc ebx
lea eax, [eax + eax + 2]
push eax
push edi
push ebx
push 0x40000000
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401594
cmp dword [ebp + 0x14], edi
mov dword [ebp - 0xc], ebx
jne 0x401572
push 2
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [ebp - 0x10]
push eax
push dword [0x405390]
push dword [0x40538c]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp word [ebp + 8], di
je 0x40159f
call fcn.00401399
cmp dword [ebp - 4], edi
jne 0x4015d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0xc], 0
mov esi, eax
je 0x4015bf
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 8], 0
je 0x4015ce
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret