Function at 0x401aab
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 0x401cd9
test ebx, ebx
je 0x401cd9
mov eax, dword [edi + 0x58]
test eax, eax
push esi
je 0x401afe
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 0x401afe
call eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401b19
and eax, 0xfffffffa
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, 0x10000
call fcn.004018bd
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 0x401b64
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x401c79
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], 0x4019c8
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], ecx
ja 0x401b89
cmp eax, esi
jbe 0x401c86
mov esi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
xor ecx, ecx
sub esi, ebx
cmp ecx, dword [ebp - 0x18]
jb 0x401ba0
ja 0x401b9e
cmp esi, eax
jbe 0x401ba0
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.00402078
add esp, 0x14
test eax, eax
jne 0x401c60
cmp dword [ebp - 0xc], esi
jne 0x401c69
mov eax, dword [ebp - 0x34]
add ebx, esi
mov dword [ebp - 0x2c], ebx
sub ebx, eax
mov dword [ebp - 0x30], eax
je 0x401c06
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 0x401c4c
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x401c57
add dword [ebp - 0x30], eax
sub ebx, eax
jne 0x401bde
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 0x401c79
mov eax, dword [edi + 0x58]
xor ebx, ebx
cmp eax, ebx
je 0x401c3a
push esi
push ebx
push 0x1402
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [edi + 0x5c]
cmp eax, ebx
je 0x401c3a
call eax
test eax, eax
je 0x401c72
cmp dword [ebp - 0x18], ebx
ja 0x401c44
cmp dword [ebp - 0x1c], ebx
jbe 0x401c83
mov eax, dword [ebp - 0x1c]
jmp 0x401b89
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x401c10
mov dword [ebp - 4], 0x27
jmp 0x401c79
mov dword [ebp - 4], 0x1e
jmp 0x401c79
mov dword [ebp - 4], 0x26
jmp 0x401c79
mov dword [ebp - 4], 0x4c7
lea esi, [ebp - 0x38]
call fcn.004018f9
jmp 0x401cb2
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.004018f9
test eax, eax
mov dword [ebp - 4], eax
jne 0x401cb2
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 0x401cd4
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 0x401cd4
call edi
mov eax, dword [ebp - 4]
jmp 0x401cdc
push 0x57
pop eax
pop edi
pop ebx
leave
ret 4