Function at 0x4013d6
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 0x401467
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401432
push esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40142b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4015b4
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 0x401467
mov byte [ebp + esi - 0x114], 0x5c
inc esi
mov byte [ebp + esi - 0x114], 0
cmp dword [ebp + 0xc], 0xffff
jbe 0x401492
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 0x4014fd
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 0x4014b1
call fcn.00401364
jmp 0x4014b3
xor eax, eax
test eax, eax
je 0x4015b4
mov eax, dword [0x405390]
mov ecx, 0x103
sub ecx, esi
cmp ecx, eax
jae 0x4014d2
mov eax, ecx
mov dword [0x405390], eax
xor edi, edi
xor ecx, ecx
cmp eax, edi
jbe 0x4014f0
mov edx, dword [0x40538c]
mov dl, byte [edx + ecx]
mov byte [ebp + esi - 0x114], dl
inc esi
inc ecx
cmp ecx, eax
jb 0x4014da
mov byte [ebp + esi - 0x114], 0
call fcn.004013a9
cmp word [ebp + 8], di
je 0x401527
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 0x401521
call fcn.00401364
jmp 0x401523
xor eax, eax
cmp eax, edi
jne 0x40153e
cmp dword [0x40538c], edi
je 0x4015b4
cmp dword [0x405390], 0
je 0x4015b4
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 0x4015a4
cmp dword [ebp + 0x14], edi
mov dword [ebp - 0xc], ebx
jne 0x401582
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 0x4015af
call fcn.004013a9
cmp dword [ebp - 4], edi
jne 0x4015e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0xc], 0
mov esi, eax
je 0x4015cf
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 8], 0
je 0x4015de
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