Function at 0x401917
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, 0x428
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov word [ebp - 0x416], cx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x420], ecx
mov dword [ebp - 0x428], ebx
mov dword [ebp - 0x424], ebx
push esi
mov esi, ebx
push edi
mov edi, edx
test eax, eax
je 0x4019e5
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, dword [ebp - 0x41c]
cmp eax, 0xffffffff
jne 0x401999
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40198f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401b59
mov dword [ebp - 0x424], 1
push 0x410
push esi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x414]
push 0x410
push eax
call fcn.00403a78
mov esi, eax
pop ecx
pop ecx
cmp esi, 0x40e
jae 0x4019e5
mov byte [ebp + esi - 0x414], 0x5c
inc esi
cmp esi, 0x410
jae 0x401ba6
mov byte [ebp + esi - 0x414], bl
cmp edi, 0xffff
jbe 0x401a1a
mov eax, 0x410
sub eax, esi
push eax
lea eax, [ebp - 0x414]
push edi
add eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x414]
push 0x410
push eax
call fcn.00403a78
pop ecx
pop ecx
jmp 0x401a8e
push 0xa
movzx eax, di
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [0x415e64], eax
test eax, eax
je 0x401a37
call fcn.004018a6
jmp 0x401a39
mov eax, ebx
test eax, eax
je 0x401b59
mov ecx, dword [0x415e68]
mov eax, 0x40f
sub eax, esi
cmp eax, ecx
jae 0x401a5a
mov ecx, eax
mov dword [0x415e68], ecx
mov edx, ebx
test ecx, ecx
je 0x401a76
mov edi, dword [0x415e70]
mov al, byte [edi + edx]
mov byte [ebp + esi - 0x414], al
inc esi
inc edx
cmp edx, ecx
jb 0x401a66
cmp esi, 0x410
jae 0x401ba6
mov byte [ebp + esi - 0x414], bl
call fcn.004018ea
mov di, word [ebp - 0x416]
test di, di
je 0x401abd
push 0xa
movzx eax, di
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [0x415e64], eax
test eax, eax
je 0x401ab7
call fcn.004018a6
jmp 0x401ab9
mov eax, ebx
test eax, eax
jne 0x401ad5
cmp dword [0x415e70], ebx
je 0x401b59
cmp dword [0x415e68], ebx
je 0x401b59
xor eax, eax
cmp dword [ebp - 0x420], eax
push ebx
sete al
push 0x80
lea eax, [eax*2 + 2]
push eax
push ebx
push 1
push 0x40000000
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401b4b
mov dword [ebp - 0x428], 1
cmp dword [ebp - 0x420], ebx
jne 0x401b27
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x418]
push eax
push dword [0x415e68]
push dword [0x415e70]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test di, di
je 0x401b55
call fcn.004018ea
test ebx, ebx
jne 0x401b93
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x428], 0
mov esi, eax
je 0x401b77
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x424], 0
je 0x401b8c
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403259
mov esp, ebp
pop ebp
ret
call fcn.0040369b
int3