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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100822d3
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x100a6250]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x23c], eax
add eax, 0x98
xor ebx, ebx
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x244], eax
mov eax, dword [eax]
mov esi, dword [eax]
cmp esi, eax
je 0x10031c7f
lea edi, [esi + 8]
mov ecx, edi
call fcn.10036e40
test eax, eax
je 0x10031c24
mov eax, dword [edi]
lea ecx, [ebp - 0x250]
push ecx
push edi
call dword [eax]
push dword [eax]
or ebx, 1
mov dword [ebp - 4], 0
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x240], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10031ab3
mov eax, dword [ebp - 0x23c]
cmp dword [eax + 0x8c], 0
je 0x10031ab3
mov eax, dword [edi]
lea ecx, [ebp - 0x24c]
push ecx
push edi
call dword [eax + 8]
push dword [eax]
or ebx, 2
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], ebx
call fcn.10008b60
mov ebx, dword [ebp - 0x240]
mov ecx, ebx
mov edx, dword [eax]
or ecx, 6
mov dword [ebp - 0x238], ecx
xor eax, eax
mov ecx, edx
mov word [ebp - 0x230], ax
mov dword [ebp - 4], 2
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
lea eax, [ecx + 2]
mov dword [ebp - 0x240], eax
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031a60
sub ecx, dword [ebp - 0x240]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x230]
call fcn.10006920
lea eax, [ebp - 0x230]
mov dword [ebp - 4], 3
push eax
mov eax, dword [ebp - 0x23c]
or ebx, 0xe
mov dword [ebp - 0x238], ebx
mov ecx, dword [eax + 0x8c]
call fcn.10036740
mov byte [ebp - 0x231], 1
test eax, eax
je 0x10031aba
mov byte [ebp - 0x231], 0
mov dword [ebp - 4], 2
test bl, 8
je 0x10031b26
mov edx, dword [ebp - 0x21c]
and ebx, 0xfffffff7
cmp edx, 8
jb 0x10031b09
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10031aff
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10031ca8
push edx
push ecx
call fcn.1001a759
add esp, 8
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov dword [ebp - 4], 1
test bl, 4
je 0x10031b59
mov edx, dword [ebp - 0x248]
and ebx, 0xfffffffb
mov dword [ebp - 0x238], ebx
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10031b59
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, 2
je 0x10031b6d
push dword [ebp - 0x24c]
and ebx, 0xfffffffd
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
push dword [ebp - 0x250]
mov dword [ebp - 4], 0xffffffff
and ebx, 0xfffffffe
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp byte [ebp - 0x231], 0
je 0x10031c6d
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100456c0
mov eax, dword [edi]
lea ecx, [ebp - 0x254]
add esp, 0xc
push ecx
push edi
call dword [eax]
mov edx, 0x104
mov edi, dword [eax]
lea eax, [ebp - 0x218]
nop
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x10031be0
movzx ecx, word [edi]
test cx, cx
je 0x10031be0
mov word [eax], cx
add edi, 2
add eax, 2
sub edx, 1
jne 0x10031bc0
push dword [ebp - 0x254]
lea ecx, [eax - 2]
test edx, edx
cmovne ecx, eax
xor eax, eax
mov word [ecx], ax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x218]
push eax
call fcn.1003df10
add esp, 4
jmp 0x10031c6d
mov eax, dword [ebp - 0x23c]
cmp dword [eax + 0x94], 0
je 0x10031c6d
mov eax, dword [edi]
lea ecx, [ebp - 0x258]
push ecx
push edi
call dword [eax + 8]
push dword [eax]
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 4], 4
mov ecx, dword [eax + 0x94]
call fcn.1003d4d0
push dword [ebp - 0x258]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x244]
mov esi, dword [esi]
cmp esi, dword [eax]
jne 0x10031995
jmp 0x10031c85
mov eax, dword [ebp - 0x244]
mov ecx, eax
call fcn.10036040
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1001a767
mov esp, ebp
pop ebp
ret
call fcn.1004906c
int3