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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47b2ab
mov eax, dword fs:[0]
push eax
sub esp, 0x2a0
mov eax, dword [0x4a83e0]
xor eax, esp
mov dword [esp + 0x298], eax
push ebx
push esi
push edi
mov eax, dword [0x4a83e0]
xor eax, esp
push eax
lea eax, [esp + 0x2b0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x10]
mov esi, ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x10], 0x80004005
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
xor eax, eax
mov dword [esp + 0x2b8], ebx
push 0x206
mov word [esp + 0xa0], ax
lea eax, [esp + 0xa2]
push ebx
push eax
call fcn.0043fd80
xor eax, eax
add esp, 0xc
lea edi, [esp + 0x48]
mov dword [esp + 0x44], ebx
stosd dword es:[edi], eax
mov dword [esp + 0x3c], ebx
cmp esi, ebx
je 0x40cc08
cmp dword [esp + 0x24], ebx
je 0x40cc08
mov esi, dword [esp + 0x40]
cmp esi, ebx
je 0x40cc08
mov eax, 0x104
push eax
push 0x490fd4
push eax
lea eax, [esp + 0xa8]
push eax
call fcn.0044838d
add esp, 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
push ebx
push 0x12
push ebx
push esi
call dword [sym.imp.ole32.dll_StgOpenStorage]
mov dword [esp + 0x10], eax
cmp eax, ebx
jge 0x40c9a3
cmp eax, 0x80030050
jne 0x40c988
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c988
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x1c]
push eax
push ebx
push 0x12
push esi
call dword [sym.imp.ole32.dll_StgCreateDocfile]
mov dword [esp + 0x10], eax
cmp eax, ebx
jl 0x40cb8c
cmp word [esp + 0x9c], 0x5c
lea edi, [esp + 0x9c]
jne 0x40c9bc
lea edi, [esp + 0x9e]
push edi
call fcn.0044845a
pop ecx
cmp eax, ebx
je 0x40c9d6
lea eax, [edi + eax*2 - 2]
cmp word [eax], 0x5c
jne 0x40c9d6
xor ecx, ecx
mov word [eax], cx
push 0x48fb68
push edi
call fcn.004546e1
pop ecx
pop ecx
mov dword [esp + 0x20], eax
cmp eax, ebx
je 0x40c9f7
xor ecx, ecx
mov word [eax], cx
add eax, 2
mov dword [esp + 0x20], eax
mov esi, dword [esp + 0x1c]
cmp esi, ebx
je 0x40caee
mov eax, dword [esi]
lea ecx, [esp + 0x18]
push ecx
push ebx
push ebx
push 0x12
push ebx
push edi
push esi
call dword [eax + 0x18]
mov dword [esp + 0x10], eax
cmp eax, ebx
jge 0x40ca38
mov eax, dword [esi]
lea ecx, [esp + 0x18]
push ecx
push ebx
push ebx
push 0x12
push edi
push esi
call dword [eax + 0x14]
mov dword [esp + 0x10], eax
cmp eax, ebx
jl 0x40cb8c
lea eax, [esp + 0x18]
lea esi, [esp + 0x28]
call fcn.0041f5cc
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
cmp edi, ebx
je 0x40ca7b
cmp word [edi], bx
je 0x40ca7b
push 0x48fb68
push edi
call fcn.004546e1
pop ecx
pop ecx
mov dword [esp + 0x20], eax
cmp eax, ebx
je 0x40ca77
xor ecx, ecx
mov word [eax], cx
add eax, 2
mov dword [esp + 0x20], eax
cmp edi, ebx
jne 0x40c9fb
mov eax, dword [esp + 0x2c]
mov eax, dword [eax - 4]
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x40cb8c
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push ebx
push 0x12
push ebx
push dword [esp + 0x34]
push eax
call dword [ecx + 0x10]
test eax, eax
jns 0x40cac8
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push ebx
push ebx
push 0x12
push dword [esp + 0x34]
push eax
call dword [ecx + 0xc]
mov dword [esp + 0x10], eax
cmp eax, ebx
jl 0x40cb8c
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
xor edi, edi
inc edi
push edi
lea edx, [esp + 0x58]
push edx
push eax
call dword [ecx + 0x30]
mov dword [esp + 0x10], eax
cmp eax, ebx
jge 0x40cb03
push eax
push 0x491310
jmp 0x40cb7f
push 0x4912c8
push 3
pop edx
push 2
pop esi
call fcn.0040b07c
jmp 0x40cb8b
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push ebx
push ebx
push dword [esp + 0x50]
push dword [esp + 0x50]
push eax
call dword [ecx + 0x14]
mov dword [esp + 0x10], eax
cmp eax, ebx
jl 0x40cb8c
mov esi, dword [esp + 0x50]
mov dword [esi], ebx
cmp dword [esp + 0x38], ebx
je 0x40cb63
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push esi
push dword [ebp + 0x14]
push dword [esp + 0x40]
push eax
call dword [ecx + 0x10]
mov dword [esp + 0x10], eax
mov eax, 0x80030109
cmp dword [esp + 0x10], eax
jne 0x40cb63
push eax
push 0x491368
push 3
pop edx
push 2
pop esi
call fcn.0040b07c
mov dword [esp + 0x44], edi
jmp 0x40cb8a
mov esi, dword [esi]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push ebx
push esi
push eax
call dword [ecx + 0x18]
mov dword [esp + 0x10], eax
cmp eax, ebx
jge 0x40cb8c
push eax
push 0x4913c0
push 3
pop edx
push 2
pop esi
call fcn.0040b07c
pop ecx
pop ecx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40cb9e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esp + 0x14], ebx
mov esi, dword [esp + 0x28]
jmp 0x40cbd5
mov eax, dword [esp + 0x2c]
mov eax, dword [eax - 4]
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x40cbca
cmp esi, dword [esp + 0x2c]
je 0x40cbbe
sub dword [esp + 0x2c], 4
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esp + 0x18], ebx
jmp 0x40cbd5
cmp esi, dword [esp + 0x2c]
je 0x40cbdb
sub dword [esp + 0x2c], 4
cmp esi, dword [esp + 0x2c]
jne 0x40cba4
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40cbed
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esp + 0x1c], ebx
cmp dword [esp + 0x3c], ebx
je 0x40cbfd
push dword [esp + 0x40]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp esi, ebx
je 0x40cc08
push esi
call fcn.0043e93a
pop ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.0043e1a7
mov esp, ebp
pop ebp
ret 0x10