Function at 0x4083b7
Capabilities:
Check if file exists
Delete file
Get file attributes
Write file on windows

Disassembly:
mov eax, 0x40a74d
call fcn.0040a620
sub esp, 0x444
mov eax, dword [0x40c324]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x10], eax
je 0x4089fb
cmp dword [ebp + 0xc], edi
je 0x4089fb
cmp dword [ebp + 0x14], edi
je 0x4089fb
cmp dword [ebp + 0x1c], edi
je 0x4089fb
cmp dword [ebp + 0x20], edi
je 0x4089fb
mov esi, dword [ebp + 8]
cmp dword [esi + 0x294], edi
je 0x4089fb
push 0x4000
mov dword [ebp + 0x20], edi
mov dword [esi + 0x2a0], edi
call sub.MFC42u.dll_operatornew
cmp eax, edi
pop ecx
mov dword [ebp - 0x444], eax
je 0x4089fb
push ebx
mov dword [ebp - 0x428], edi
jmp 0x40843d
mov esi, dword [ebp + 8]
cmp dword [esi + 0x2a0], edi
jne 0x4089e4
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x428]
lea ebx, [eax + ecx*2]
cmp ebx, edi
mov dword [ebp - 0x44c], ebx
je 0x4089e4
cmp word [ebx], di
je 0x4089e4
mov esi, dword [sym.imp.msvcrt.dll__snwprintf]
push ebx
push dword [ebp + 0x10]
mov edi, 0x103
push 0x402eb0
lea eax, [ebp - 0x218]
push edi
push eax
call esi
and word [ebp - 0x12], 0
add esp, 0x14
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
mov dword [ebp - 0x430], eax
je 0x4085d7
lea ecx, [ebp - 0x434]
call fcn.00409bc2
and dword [ebp - 4], 0
lea eax, [ebp - 0x434]
push 0x8b
push eax
call sub.MFC42u.dll_CString::Format
test byte [ebp - 0x430], 1
pop ecx
pop ecx
je 0x408535
lea ecx, [ebp - 0x450]
call fcn.00409bc2
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x450]
push 0x82cc
push eax
mov byte [ebp - 4], 1
call sub.MFC42u.dll_CString::Format
add esp, 0xc
push 0
push dword [ebp - 0x434]
lea eax, [ebp - 0x218]
push eax
push dword [ebp + 0x18]
call dword [sym.imp.USER32.dll_MessageBoxW]
push ebx
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ecx, dword [ebp - 0x428]
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x450]
jmp 0x408596
lea ecx, [ebp - 0x440]
call fcn.00409bc2
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x440]
push 0x82c9
push eax
mov byte [ebp - 4], 2
call sub.MFC42u.dll_CString::Format
add esp, 0xc
push 0x124
push dword [ebp - 0x434]
push dword [ebp - 0x440]
push dword [ebp + 0x18]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 7
jne 0x4085b9
push ebx
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ecx, dword [ebp - 0x428]
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x440]
mov dword [ebp - 0x428], eax
mov byte [ebp - 4], 0
call sub.MFC42u.dll_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x434]
call sub.MFC42u.dll_CString::CString
jmp 0x4089d9
lea ecx, [ebp - 0x440]
mov byte [ebp - 4], 0
call sub.MFC42u.dll_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x434]
call sub.MFC42u.dll_CString::CString
push 0
push 0x80
push 4
pop ebx
push ebx
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x448], eax
jne 0x40863c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x408615
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x408625
call dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0x80070000
push eax
push 0x8004
push 0x8001
push dword [ebp + 0x18]
mov dword [ebp + 0x20], eax
call dword [sym.imp.USER32.dll_SendMessageW]
and dword [ebp - 0x43c], 0
cmp dword [ebp + 0x20], 0
jl 0x40897c
push dword [ebp - 0x44c]
lea eax, [ebp - 0x420]
push dword [ebp + 0xc]
push 0x402e9c
push edi
push eax
call esi
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x294]
and word [ebp - 0x21a], 0
mov edx, dword [eax + 0xc]
add edx, ebx
mov dword [eax + 0x18], ebx
mov dword [eax + 8], edx
mov ebx, dword [ecx + 0x294]
add esp, 0x14
lea eax, [ebp - 0x420]
push eax
call fcn.00409580
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
mov esi, dword [edi + 0x294]
or ebx, 0xffffffff
push ebx
push 9
call fcn.00409456
mov esi, dword [ebp + 0x1c]
mov edi, dword [edi + 0x294]
call fcn.00409487
test eax, eax
je 0x40870e
cmp eax, 9
jne 0x40870e
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x294]
and dword [ebp - 0x430], 0
lea eax, [ebp - 0x430]
push eax
call fcn.004095a5
mov esi, dword [edi + 0x294]
lea eax, [ebp - 0x43c]
push eax
call fcn.004095a5
mov eax, dword [ebp - 0x430]
test eax, eax
je 0x40872a
jle 0x408708
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0x20], eax
push eax
jmp 0x408717
mov eax, 0x80004005
mov dword [ebp + 0x20], eax
push eax
push 0x8004
push 0x8001
push dword [ebp + 0x18]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [ebp + 0x20], 0
jl 0x40897c
cmp dword [ebp - 0x43c], 0
je 0x40897c
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [ebp - 0x420]
push eax
push 0x8006
mov edi, 0x8001
xor ebx, ebx
push edi
push dword [ebp + 0x18]
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0x438], ebx
mov dword [ebp - 0x424], ebx
mov dword [ebp - 0x430], ebx
call esi
lea eax, [ebp - 0x218]
push eax
push 0x8007
push edi
push dword [ebp + 0x18]
call esi
push dword [ebp - 0x43c]
push 0x8003
push edi
push dword [ebp + 0x18]
call esi
mov dword [ebp - 0x42c], ebx
mov ebx, dword [ebp + 0x1c]
jmp 0x4088bf
cmp dword [ebp - 0x42c], 0xffffffff
je 0x4088f0
cmp dword [ebp - 0x42c], 0xfffffffd
je 0x408904
cmp dword [ebp - 0x42c], 0xfffffffe
jne 0x40883d
mov eax, dword [ebx]
and dword [ebp - 0x438], 0
lea ecx, [ebp - 0x424]
push ecx
lea ecx, [ebp - 0x438]
push ecx
push 0xffffffffffffffff
push ebx
mov dword [ebp - 0x424], 4
call dword [eax + 0x24]
test eax, eax
mov dword [ebp + 0x20], eax
jl 0x40890e
mov eax, dword [ebp - 0x438]
cmp eax, 0x4000
ja 0x40890e
test eax, eax
jbe 0x40890e
lea ecx, [ebp - 0x424]
push ecx
push dword [ebp - 0x444]
mov dword [ebp - 0x424], eax
mov eax, dword [ebx]
push 0xffffffffffffffff
push ebx
call dword [eax + 0x24]
test eax, eax
mov dword [ebp + 0x20], eax
jl 0x408970
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2a0], 0
jne 0x408915
push 0
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x438]
push dword [ebp - 0x444]
push dword [ebp - 0x448]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40893c
mov eax, dword [ebx]
and dword [ebp - 0x424], 0
push 4
lea ecx, [ebp - 0x424]
push ecx
push 0xffffffffffffffff
push ebx
call dword [eax + 0x20]
test eax, eax
mov dword [ebp + 0x20], eax
jl 0x408970
mov eax, dword [ebp - 0x430]
add eax, dword [ebp - 0x438]
push eax
push 0
push 0x8002
push dword [ebp + 0x18]
mov dword [ebp - 0x430], eax
call esi
and dword [ebp - 0x42c], 0
mov eax, dword [ebx]
lea ecx, [ebp - 0x424]
push ecx
lea ecx, [ebp - 0x42c]
push ecx
push 0xffffffffffffffff
push ebx
mov dword [ebp - 0x424], 4
call dword [eax + 0x24]
test eax, eax
mov dword [ebp + 0x20], eax
jge 0x4087a9
push eax
jmp 0x408971
push dword [ebp - 0x43c]
push 0
push 0x8002
push dword [ebp + 0x18]
call esi
jmp 0x408933
mov eax, 0x80004005
mov dword [ebp + 0x20], eax
jmp 0x408970
push 0x80004005
jmp 0x408971
mov eax, dword [ebx]
push 4
lea ecx, [ebp - 0x424]
push ecx
push 0xffffffffffffffff
push ebx
mov dword [ebp - 0x424], 1
call dword [eax + 0x20]
mov dword [ebp + 0x20], eax
push 0
push 0x8005
jmp 0x408976
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 4
lea ecx, [ebp - 0x424]
push ecx
push 0xffffffffffffffff
mov dword [ebp - 0x424], eax
mov eax, dword [ebx]
push ebx
call dword [eax + 0x20]
mov dword [ebp + 0x20], eax
mov eax, dword [ebp - 0x424]
test eax, eax
jle 0x408970
and eax, 0xffff
or eax, 0x80070000
push eax
push 0x8004
push edi
push dword [ebp + 0x18]
call esi
cmp dword [ebp - 0x448], 0xffffffff
je 0x408991
push dword [ebp - 0x448]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x20], 0
jl 0x4089a3
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2a0], 0
je 0x4089bc
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2a0], 0
jne 0x4089d9
push dword [ebp - 0x44c]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ecx, dword [ebp - 0x428]
lea eax, [ecx + eax + 1]
mov dword [ebp - 0x428], eax
xor edi, edi
cmp dword [ebp + 0x20], edi
jge 0x40843a
push dword [ebp - 0x444]
call sub.MFC42u.dll_operatordelete
xor eax, eax
cmp dword [ebp + 0x20], edi
pop ecx
setge al
pop ebx
jmp 0x4089fd
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
call fcn.0040a572
leave
ret 0x1c