Function at 0x41080c
Capabilities:
Check if file exists
Clear file content
Delete file
Get file attributes
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x46c
mov eax, dword [0x4291b0]
xor eax, esp
mov dword [esp + 0x468], eax
mov eax, dword [0x42a92c]
and dword [esp + 0x18], 0
push ebx
push esi
push edi
mov edi, edx
mov dword [esp + 0x20], eax
xor ebx, ebx
call fcn.00423a42
xor esi, esi
inc esi
cmp byte [ebp + 8], bl
je 0x41087b
push 3
pop esi
push dword [0x42a8cc]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41087b
test eax, 0x4000
je 0x41087b
push ebx
push 0x80
push 2
push dword [edi]
push dword [0x42a8cc]
call dword [sym.imp.ADVAPI32.dll_DuplicateEncryptionInfoFile]
push dword [edi]
call dword [sym.imp.api_ms_win_core_shlwapi_legacy_l1_1_0.dll_PathFileExistsW]
push 0
push 0x80
push 4
push 0
push esi
push 0xc0000000
push dword [edi]
mov dword [esp + 0x44], eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov dword [0x429d8c], eax
cmp eax, 0xffffffff
je 0x410cfe
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
mov dword [esp + 0x2c], ecx
cmp dword [0x42ab94], ebx
je 0x4108cf
call fcn.00410775
xor esi, esi
push esi
push esi
push 0xe
push dword [0x42adac]
call dword [sym.imp.USER32.dll_SendMessageW]
push esi
push esi
push 0xbd
push dword [0x42adac]
mov dword [esp + 0x28], eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov esi, eax
test esi, esi
je 0x410cb7
push esi
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalLock]
mov dword [esp + 0x10], eax
test eax, eax
je 0x410cb7
mov ecx, dword [0x429e14]
lea eax, [ecx - 1]
sub eax, 1
je 0x410a44
sub eax, 1
je 0x4109e4
sub eax, 1
jne 0x410954
push eax
lea eax, [esp + 0x20]
push eax
push 3
push 0x4292d0
push dword [0x429d8c]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
mov ecx, dword [0x429e14]
cmp ecx, 4
je 0x41096f
cmp ecx, 5
je 0x41096f
call dword [sym.imp.api_ms_win_core_localization_l1_2_0.dll_GetACP]
lea ecx, [esp + 0x24]
mov ebx, 0x400
jmp 0x410978
xor ecx, ecx
mov eax, 0xfde9
xor ebx, ebx
push ecx
push 0
push 0
push 0
push dword [esp + 0x28]
mov dword [esp + 0x28], eax
push dword [esp + 0x24]
push ebx
push eax
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
cmp dword [esp + 0x24], 0
mov ecx, eax
jne 0x4109a8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4109d0
test ecx, ecx
jne 0x4109d0
mov edx, dword [0x42929c]
mov ecx, dword [esp + 0x20]
push 0x31
push dword [edi]
push dword [0x42924c]
call fcn.0040f7c1
cmp eax, 2
je 0x410cb7
mov eax, dword [esp + 0x18]
xor ebx, ebx
mov edx, dword [esp + 0x14]
push eax
push dword [esp + 0x14]
push ebx
call fcn.004106be
jmp 0x410a7c
push 0
lea eax, [esp + 0x20]
push eax
push 2
push 0x4292c8
push dword [0x429d8c]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
mov edx, dword [esp + 0x10]
mov ecx, edx
push dword [esp + 0x18]
call fcn.00410686
push 0
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
add eax, eax
push eax
push dword [esp + 0x1c]
push dword [0x429d8c]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
mov edx, dword [esp + 0x10]
mov ecx, edx
push dword [esp + 0x18]
mov dword [esp + 0x24], eax
call fcn.00410686
mov eax, dword [esp + 0x20]
jmp 0x410a7c
push 0
lea eax, [esp + 0x20]
push eax
push 2
push 0x4292cc
push dword [0x429d8c]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
push 0
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
add eax, eax
push eax
push dword [esp + 0x1c]
push dword [0x429d8c]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x410cb7
push dword [0x429d8c]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetEndOfFile]
push esi
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalUnlock]
mov eax, dword [0x429e14]
xor esi, esi
push esi
push esi
push 0xb9
push dword [0x42adac]
mov dword [0x429e18], eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [0x429e14], 1
mov dword [0x4292c0], esi
jne 0x410ad4
test ebx, ebx
jne 0x410ad4
xor edx, edx
mov ecx, edi
push esi
inc edx
call fcn.00410da5
push dword [0x429d8c]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
or dword [0x429d8c], 0xffffffff
lea eax, [esp + 0x30]
push 0x218
push esi
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
cmp byte [ebp + 8], 0
je 0x410b4f
push dword [edi]
call dword [sym.imp.api_ms_win_shcore_path_l1_1_0.dll_Ordinal_170]
push dword [edi]
mov dword [esp + 0x38], eax
call dword [sym.imp.api_ms_win_core_shlwapi_legacy_l1_1_0.dll_PathFindExtensionW]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x24c]
push eax
push esi
push dword [edi]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesExW]
mov ecx, dword [edi]
lea edx, [esp + 0x3c]
neg eax
sbb eax, eax
and eax, dword [esp + 0x26c]
mov dword [esp + 0x30], eax
call fcn.00410d1d
mov eax, dword [0x429e14]
mov dword [esp + 0x244], eax
cmp dword [0x42ab94], esi
je 0x410b5c
call fcn.004107c6
mov ebx, esi
cmp word [0x42a968], bx
je 0x410bc1
mov dword [esp + 0x14], esi
cmp dword [esp + 0x28], ebx
jne 0x410b76
xor ebx, ebx
inc ebx
jmp 0x410bc1
push ecx
mov ecx, dword [edi]
lea edx, [esp + 0x18]
call fcn.00411900
mov esi, dword [esp + 0x14]
test eax, eax
js 0x410bb4
and dword [esp + 0x14], ebx
lea eax, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x278]
mov ecx, esi
call fcn.00425137
test eax, eax
js 0x410bb2
cmp dword [esp + 0x14], 2
je 0x410bb2
xor ebx, ebx
inc ebx
jmp 0x410bb4
xor ebx, ebx
test esi, esi
je 0x410bbf
push esi
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
xor esi, esi
cmp dword [ebp + 0xc], 0
jne 0x410bcf
test ebx, ebx
je 0x410c95
push ecx
mov ecx, dword [edi]
lea edx, [esp + 0x14]
mov dword [esp + 0x14], esi
call fcn.00411900
mov esi, dword [esp + 0x10]
test eax, eax
js 0x410c8a
push 0x1fa
lea eax, [esp + 0x274]
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov eax, dword [ebp + 0xc]
add esp, 0xc
test eax, eax
jne 0x410c0e
mov eax, 0x42a968
push eax
mov edx, 0xfd
lea ecx, [esp + 0x274]
call fcn.0040675d
test eax, eax
jns 0x410c3e
cmp dword [esp + 0x10], 0
je 0x410cfe
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
jmp 0x410cfe
lea edx, [esp + 0x270]
mov ecx, esi
call fcn.00425b89
test eax, eax
js 0x410c8a
cmp word [esp + 0x270], 0
je 0x410c82
lea ecx, [esp + 0x270]
call fcn.0040fcbf
test eax, eax
jne 0x410c79
mov edx, dword [0x429e18]
mov ecx, edi
push eax
call fcn.00410da5
inc word [0x42a94c]
jmp 0x410c8a
xor ecx, ecx
inc ecx
call fcn.0040fd23
test esi, esi
je 0x410c95
push esi
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
push dword [0x429e94]
call dword [sym.imp.USER32.dll_SetCursor]
call fcn.0040f022
movzx edx, byte [ebp + 8]
lea ecx, [esp + 0x30]
call fcn.00423a9a
mov al, 1
jmp 0x410d00
push dword [0x429e94]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [0x429d8c]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
or dword [0x429d8c], 0xffffffff
test esi, esi
je 0x410ce1
push esi
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalUnlock]
cmp dword [esp + 0x2c], 0
je 0x410cf0
push dword [edi]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_DeleteFileW]
cmp dword [0x42ab94], 0
je 0x410cfe
call fcn.004107c6
xor al, al
mov ecx, dword [esp + 0x474]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00426d60
mov esp, ebp
pop ebp
ret 8