Function at 0x401a94
Capabilities:
Check if file exists
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push edi
mov edi, ecx
test edi, edi
mov ebx, edx
mov dword [ebp - 0x14], ebx
je 0x401cc2
test ebx, ebx
je 0x401cc2
mov eax, dword [edi + 0x58]
test eax, eax
push esi
je 0x401ae7
push dword [ebp + 8]
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
push 0
push 0x1400
push eax
call esi
lea eax, [ebx + 0x10]
push eax
push 0
push 0x1401
push dword [edi + 0x58]
call esi
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x401ae7
call eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401b02
and eax, 0xfffffffa
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, 0x10000
call fcn.004018a6
xor esi, esi
push esi
push 0x80
push 2
push esi
push esi
push 0x40000000
push dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], eax
add eax, 0x10000
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x38], eax
jne 0x401b4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x401c62
mov eax, dword [edi + 0x54]
mov ecx, dword [ebx + 0x14]
cmp ecx, esi
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x24], 0x4019b1
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], ecx
ja 0x401b72
cmp eax, esi
jbe 0x401c6f
mov esi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
xor ecx, ecx
sub esi, ebx
cmp ecx, dword [ebp - 0x18]
jb 0x401b89
ja 0x401b87
cmp esi, eax
jbe 0x401b89
mov esi, eax
sub eax, esi
sbb dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0xc]
push eax
push esi
push ebx
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
call fcn.00402061
add esp, 0x14
test eax, eax
jne 0x401c49
cmp dword [ebp - 0xc], esi
jne 0x401c52
mov eax, dword [ebp - 0x34]
add ebx, esi
mov dword [ebp - 0x2c], ebx
sub ebx, eax
mov dword [ebp - 0x30], eax
je 0x401bef
push 0
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp - 0x30]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401c35
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x401c40
add dword [ebp - 0x30], eax
sub ebx, eax
jne 0x401bc7
mov eax, dword [ebp - 0x34]
and dword [ebp - 4], 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 4], 0
jne 0x401c62
mov eax, dword [edi + 0x58]
xor ebx, ebx
cmp eax, ebx
je 0x401c23
push esi
push ebx
push 0x1402
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [edi + 0x5c]
cmp eax, ebx
je 0x401c23
call eax
test eax, eax
je 0x401c5b
cmp dword [ebp - 0x18], ebx
ja 0x401c2d
cmp dword [ebp - 0x1c], ebx
jbe 0x401c6c
mov eax, dword [ebp - 0x1c]
jmp 0x401b72
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x401bf9
mov dword [ebp - 4], 0x27
jmp 0x401c62
mov dword [ebp - 4], 0x1e
jmp 0x401c62
mov dword [ebp - 4], 0x26
jmp 0x401c62
mov dword [ebp - 4], 0x4c7
lea esi, [ebp - 0x38]
call fcn.004018e2
jmp 0x401c9b
mov ebx, dword [ebp - 0x14]
lea eax, [ebx + 0x20]
push eax
push 0
push 0
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
lea esi, [ebp - 0x38]
call fcn.004018e2
test eax, eax
mov dword [ebp - 4], eax
jne 0x401c9b
push dword [ebx + 0x28]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [edi + 0x58]
test eax, eax
pop esi
je 0x401cbd
push dword [ebp - 4]
push 0
push 0x1403
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov edi, dword [edi + 0x5c]
test edi, edi
je 0x401cbd
call edi
mov eax, dword [ebp - 4]
jmp 0x401cc5
push 0x57
pop eax
pop edi
pop ebx
leave
ret 4