Function at 0x401b3b
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 0x401c0e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [ebp - 0x82c]
cmp eax, 0xffffffff
jne 0x401bbd
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401bb3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401d8c
mov dword [ebp - 0x838], 1
push edi
mov edi, 0x410
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.00404a77
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.00404cd2
mov edi, eax
add esp, 0x14
cmp edi, 0x40e
jae 0x401c0e
push 0x5c
pop eax
mov word [ebp + edi*2 - 0x824], ax
inc edi
lea eax, [edi + edi]
cmp eax, 0x820
jae 0x401dd9
xor ecx, ecx
mov word [ebp + eax - 0x824], cx
cmp ebx, 0xffff
jbe 0x401c45
mov eax, 0x410
sub eax, edi
push ebx
push eax
lea eax, [ebp - 0x824]
lea eax, [eax + edi*2]
push eax
call fcn.00404a77
mov edi, 0x410
lea eax, [ebp - 0x824]
push edi
push eax
call fcn.00404cd2
add esp, 0x14
jmp 0x401cc1
push 0xa
movzx eax, bx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [0x41d2c0], eax
test eax, eax
je 0x401c62
call fcn.00401aca
jmp 0x401c64
mov eax, esi
test eax, eax
je 0x401d8c
mov ecx, dword [0x41d2cc]
mov eax, 0x40f
sub eax, edi
cmp eax, ecx
jae 0x401c85
mov ecx, eax
mov dword [0x41d2cc], ecx
mov edx, esi
test ecx, ecx
je 0x401ca4
mov ebx, dword [0x41d2c8]
movsx ax, byte [ebx + edx]
mov word [ebp + edi*2 - 0x824], ax
inc edi
inc edx
cmp edx, ecx
jb 0x401c91
add edi, edi
cmp edi, 0x820
jae 0x401dd9
xor eax, eax
mov word [ebp + edi - 0x824], ax
call fcn.00401b0e
mov bx, word [ebp - 0x826]
test bx, bx
je 0x401cf0
push 0xa
movzx eax, bx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [0x41d2c0], eax
test eax, eax
je 0x401cea
call fcn.00401aca
jmp 0x401cec
mov eax, esi
test eax, eax
jne 0x401d08
cmp dword [0x41d2c8], esi
je 0x401d8c
cmp dword [0x41d2cc], esi
je 0x401d8c
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 0x401d7e
mov dword [ebp - 0x834], 1
cmp dword [ebp - 0x830], esi
jne 0x401d5a
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 0x401d88
call fcn.00401b0e
test esi, esi
jne 0x401dc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x834], 0
mov edi, eax
je 0x401daa
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x838], 0
je 0x401dbf
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.004032a6
mov esp, ebp
pop ebp
ret
call fcn.004033da
int3