Function at 0x10021c80
Capabilities:
Check if file exists
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1009f083
mov eax, dword fs:[0]
push eax
sub esp, 0x100
mov eax, dword [0x100cc144]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0xe8], 0
je 0x10021f0d
mov eax, dword [esi + 4]
lea ecx, [esi + 4]
mov eax, dword [eax + 4]
call eax
test al, al
jne 0x10021f0d
lea eax, [ebp - 0x30]
mov ecx, esi
push eax
call fcn.1001cf60
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
mov dword [ebp - 4], 0
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10021d09
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
push 0x100a67e4
cmovae eax, dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
call fcn.1007c937
mov eax, dword [ebp - 0x44]
add esp, 0xc
test eax, eax
je 0x10021e34
push eax
push 1
lea eax, [esi + 0xf0]
push 4
push eax
call fcn.1007c4b5
push dword [ebp - 0x44]
mov eax, dword [esi + 0x98]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x9c]
push 1
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push 8
push eax
call fcn.1007c4b5
push dword [ebp - 0x44]
mov eax, dword [esi + 0x90]
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 0x94]
push 1
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
push 8
push eax
call fcn.1007c4b5
push dword [ebp - 0x44]
lea eax, [ebp - 0x18]
xorps xmm0, xmm0
push 1
push 8
push eax
movlpd qword [ebp - 0x18], xmm0
call fcn.1007c4b5
mov ecx, dword [esi + 0xc]
add esp, 0x40
push dword [ebp - 0x44]
call fcn.10013d00
push 0
push 0
push 0x14
push dword [ebp - 0x44]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
call fcn.1007cd21
push dword [ebp - 0x44]
lea eax, [ebp - 0x18]
push 1
push 8
push eax
call fcn.1007c4b5
push dword [ebp - 0x44]
call fcn.1007c9f5
mov edi, dword [esi + 0xc]
lea eax, [ebp - 0x5c]
add esp, 0x24
lea ecx, [esi + 0x18]
push 1
push 0
push eax
call fcn.10022900
push str..allfile.txt
push eax
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 1
push eax
call fcn.100083e0
add esp, 0xc
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 2
jb 0x10021e17
mov eax, dword [eax]
push eax
mov ecx, edi
call fcn.10014f60
lea ecx, [ebp - 0x74]
call fcn.100043b0
lea ecx, [ebp - 0x5c]
call fcn.100043b0
jmp 0x10021f05
call fcn.10031890
push 1
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, eax
call edx
movzx eax, al
sub eax, 1
jne 0x10021f05
push 0x53
push str.d:jenkins.jenkinsworkspacedefragger_defragdefragdefrag_file_system_ntfs_fs.cc
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], 0xf
mov byte [ebp - 0x74], al
call fcn.10007190
push 3
push 0x100a57c0
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0xf
mov byte [ebp - 0x5c], 0
call fcn.10007190
push 0x2fa
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x10c]
call fcn.10003b10
mov esi, eax
push str._error__open_file_failed__path:
push esi
mov byte [ebp - 4], 5
call fcn.10004a70
cmp dword [ebp - 0x1c], 8
lea ecx, [ebp - 0x30]
mov eax, 0x100a5654
cmovae ecx, dword [ebp - 0x30]
test ecx, ecx
cmovne eax, ecx
push eax
push esi
call fcn.10002c50
add esp, 0x10
call fcn.10031890
push esi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1c]
lea ecx, [ebp - 0x10c]
call fcn.10004b90
lea ecx, [ebp - 0x5c]
call fcn.10004360
lea ecx, [ebp - 0x74]
call fcn.10004360
lea ecx, [ebp - 0x30]
call fcn.100043b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10039fbc
mov esp, ebp
pop ebp
ret