Function at 0x4017b0
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
xor ebx, ebx
push esi
mov eax, edx
push edi
mov dword [ebp - 8], eax
mov word [ebp - 2], cx
mov esi, ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov edi, 0x104
cmp dword [ebp + 8], ebx
je 0x401848
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40180d
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x401806
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401996
mov dword [ebp - 0x10], 1
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
mov eax, dword [ebp - 8]
cmp esi, 0x102
jae 0x401848
mov byte [ebp + esi - 0x114], 0x5c
inc esi
mov byte [ebp + esi - 0x114], bl
cmp eax, 0xffff
jbe 0x401871
sub edi, esi
push edi
push eax
lea eax, [ebp - 0x114]
add eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
jmp 0x4018d9
movzx eax, ax
push 0xa
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [0x412b3c], eax
test eax, eax
je 0x40188e
call fcn.0040173f
jmp 0x401890
mov eax, ebx
test eax, eax
je 0x401996
mov ecx, dword [0x412b40]
mov eax, 0x103
sub eax, esi
cmp eax, ecx
jae 0x4018b1
mov ecx, eax
mov dword [0x412b40], ecx
mov edx, ebx
test ecx, ecx
je 0x4018cd
mov edi, dword [0x412b48]
mov al, byte [edi + edx]
mov byte [ebp + esi - 0x114], al
inc esi
inc edx
cmp edx, ecx
jb 0x4018bd
mov byte [ebp + esi - 0x114], bl
call fcn.00401783
mov ax, word [ebp - 2]
test ax, ax
je 0x401905
movzx eax, ax
push 0xa
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [0x412b3c], eax
test eax, eax
je 0x4018ff
call fcn.0040173f
jmp 0x401901
mov eax, ebx
test eax, eax
jne 0x401919
cmp dword [0x412b48], ebx
je 0x401996
cmp dword [0x412b40], ebx
je 0x401996
mov edi, dword [ebp + 0xc]
xor eax, eax
test edi, edi
sete al
push ebx
push 0x80
lea eax, [eax*2 + 2]
push eax
push ebx
push 1
push 0x40000000
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401984
mov dword [ebp - 0xc], 1
test edi, edi
jne 0x401963
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 8]
push eax
push dword [0x412b40]
push dword [0x412b48]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov cx, word [ebp - 2]
test cx, cx
je 0x401992
call fcn.00401783
test ebx, ebx
jne 0x4019c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0xc], 0
mov esi, eax
je 0x4019b1
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x10], 0
je 0x4019c0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret