Function at 0x4019a6
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, 0x838
mov eax, dword [0x41c004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
mov word [ebp - 0x826], cx
mov ecx, dword [ebp + 0xc]
mov ebx, edx
mov dword [ebp - 0x82c], eax
mov dword [ebp - 0x830], ecx
mov dword [ebp - 0x834], esi
mov dword [ebp - 0x838], esi
push edi
mov edi, esi
test eax, eax
je 0x401a79
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [ebp - 0x82c]
cmp eax, 0xffffffff
jne 0x401a28
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401a1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401bf7
mov dword [ebp - 0x838], 1
push edi
mov edi, 0x410
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.00404f24
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.00404a29
mov edi, eax
add esp, 0x14
cmp edi, 0x40e
jae 0x401a79
push 0x5c
pop eax
mov word [ebp + edi*2 - 0x824], ax
inc edi
lea eax, [edi + edi]
cmp eax, 0x820
jae 0x401c44
xor ecx, ecx
mov word [ebp + eax - 0x824], cx
cmp ebx, 0xffff
jbe 0x401ab0
mov eax, 0x410
sub eax, edi
push ebx
push eax
lea eax, [ebp - 0x824]
lea eax, [eax + edi*2]
push eax
call fcn.00404f24
mov edi, 0x410
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.00404a29
add esp, 0x14
jmp 0x401b2c
push 0xa
movzx eax, bx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [0x41d2c0], eax
test eax, eax
je 0x401acd
call fcn.00401935
jmp 0x401acf
mov eax, esi
test eax, eax
je 0x401bf7
mov ecx, dword [0x41d2cc]
mov eax, 0x40f
sub eax, edi
cmp eax, ecx
jae 0x401af0
mov ecx, eax
mov dword [0x41d2cc], ecx
mov edx, esi
test ecx, ecx
je 0x401b0f
mov ebx, dword [0x41d2c8]
movsx ax, byte [ebx + edx]
mov word [ebp + edi*2 - 0x824], ax
inc edi
inc edx
cmp edx, ecx
jb 0x401afc
add edi, edi
cmp edi, 0x820
jae 0x401c44
xor eax, eax
mov word [ebp + edi - 0x824], ax
call fcn.00401979
mov bx, word [ebp - 0x826]
test bx, bx
je 0x401b5b
push 0xa
movzx eax, bx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [0x41d2c0], eax
test eax, eax
je 0x401b55
call fcn.00401935
jmp 0x401b57
mov eax, esi
test eax, eax
jne 0x401b73
cmp dword [0x41d2c8], esi
je 0x401bf7
cmp dword [0x41d2cc], esi
je 0x401bf7
xor eax, eax
cmp dword [ebp - 0x830], eax
push esi
sete al
push 0x80
lea eax, [eax*2 + 2]
push eax
push esi
push 1
push 0x40000000
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x401be9
mov dword [ebp - 0x834], 1
cmp dword [ebp - 0x830], esi
jne 0x401bc5
push 2
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x828]
push eax
push dword [0x41d2cc]
push dword [0x41d2c8]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bx, bx
je 0x401bf3
call fcn.00401979
test esi, esi
jne 0x401c31
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x834], 0
mov edi, eax
je 0x401c15
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x838], 0
je 0x401c2a
push dword [ebp - 0x82c]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040310d
mov esp, ebp
pop ebp
ret
call fcn.00403241
int3