Function at 0x10021c98
Capabilities:
Check if file exists
Delete file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x10052004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov eax, ecx
xor esi, esi
mov ecx, dword [ebp + 0x14]
mov ebx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 8], esi
push edi
test ecx, ecx
je 0x1002a60b
mov dword [ecx], esi
test eax, eax
je 0x10021ce9
mov edx, 0x104
mov ecx, eax
call fcn.1000713a
mov edi, eax
test edi, edi
js 0x10021def
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x14]
test ebx, 0x8000000
jne 0x1002a615
xor edx, edx
mov ecx, ebx
inc edx
call fcn.10006e40
mov edi, eax
test edi, edi
js 0x10021def
mov ecx, 0x4020000
mov eax, ebx
and eax, ecx
cmp eax, ecx
setne cl
test bl, 3
setne al
test al, cl
je 0x1002a6c8
mov ecx, ebx
call fcn.10006d2f
mov edx, eax
mov dword [ebp - 0xc], eax
mov eax, 0x30000
and ecx, eax
cmp ecx, eax
je 0x1002a645
mov eax, dword [ebp + 0xc]
mov ecx, 0x1000
mov edi, 0x4000
cmp eax, 0x200
ja 0x10021e24
test eax, eax
je 0x10021d67
cmp eax, 0x200
jne 0x1002a62d
mov eax, ebx
and eax, ecx
mov dword [ebp - 0x18], eax
jne 0x10021e04
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0xf80]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x1002a6af
mov edi, dword [ebp - 0x18]
mov ecx, ebx
mov edx, dword [ebp + 0x10]
neg edi
mov eax, edx
sbb edi, edi
shr edx, 4
and edx, 0x400
shr ecx, 0x11
shr eax, 0x14
and ecx, 1
push ecx
push dword [ebp + 8]
and eax, 0x200
shr ebx, 0x16
or edx, eax
and ebx, 0x10
or edx, ebx
and edi, 2
or edx, ecx
mov dword [ebp - 0x18], edi
or edx, dword [ebp - 0x18]
lea edi, [ebp - 0x14]
or edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
or edx, 4
push esi
push edi
push esi
push edx
mov edx, dword [ebp - 0xc]
call fcn.10006722
mov edi, eax
test edi, edi
js 0x10021e41
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x14]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100281a0
mov esp, ebp
pop ebp
ret 0x10
test dword [ebp + 0x10], edi
jne 0x10021d74
mov edi, dword [ebp - 0x10]
mov ecx, edi
call fcn.100212be
test eax, eax
js 0x10021d74
jmp 0x1002a686
or edx, 0x80000
mov dword [ebp - 0xc], edx
cmp eax, ecx
jne 0x1002a650
mov dword [ebp - 8], 0xc000
jmp 0x10021d67
mov esi, dword [ebp - 0x14]
jmp 0x1002a6cd
mov edi, 0x80030009
jmp 0x10021def
cmp dword [ebp + 0xc], 0x200
ja 0x1002a62d
push ecx
push dword [ebp + 8]
mov edx, ebx
mov ecx, eax
call fcn.1003ca19
jmp 0x1002a63e
mov edi, 0x80030057
jmp 0x10021def
mov ecx, eax
call fcn.10004c0d
mov edi, eax
jmp 0x10021def
or edx, 4
mov dword [ebp - 0xc], edx
jmp 0x10021d40
cmp eax, 0x2000
je 0x1002a67a
cmp eax, edi
je 0x1002a66e
cmp eax, 0x8000
jne 0x1002a62d
mov dword [ebp - 8], 0xf000
jmp 0x10021d67
mov dword [ebp - 8], 0xe000
jmp 0x10021d67
mov dword [ebp - 8], 0xd000
jmp 0x10021d67
push edi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_DeleteFileW]
test eax, eax
jne 0x10021d74
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
cmp eax, 2
je 0x10021d74
cmp eax, 3
je 0x10021d74
jmp 0x1002a637
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.api_ms_win_core_com_private_l1_1_0.dll_InternalTlsAllocData]
mov edi, eax
test edi, edi
js 0x10021def
jmp 0x10021d8b
mov edi, 0x800300ff
test esi, esi
je 0x10021def
mov eax, dword [esi]
push esi
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x100532e8]
call esi
jmp 0x10021def