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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55ca49
mov eax, dword fs:[0]
push eax
sub esp, 0x84
push ebx
push esi
push edi
mov eax, dword [0x5b7e5c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
call fcn.004088f9
mov ecx, eax
test ecx, ecx
jne 0x404985
push 0x80004005
call fcn.00402590
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
push 6
push 0x56bd68
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.004042c0
push dword [ebx]
lea eax, [ebp - 0x20]
push eax
call fcn.00405c90
add esp, 8
push 0xe
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
push ecx
mov ecx, eax
call fcn.00403600
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
push dword [eax - 0xc]
push eax
call fcn.004024c0
mov edx, dword [ebp - 0x30]
or ebx, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4049f8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x20]
mov eax, ebx
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404a16
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 3
push 0x56bd70
lea ecx, [ebp - 0x18]
call fcn.004024c0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
call fcn.004088f9
mov ecx, eax
test ecx, ecx
jne 0x404a64
push 0x80004005
call fcn.00402590
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 3
call fcn.004088f9
mov ecx, eax
test ecx, ecx
jne 0x404a88
push 0x80004005
call fcn.00402590
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x68], vtable.CList_class_ATL::CStringT_char__class_StrTraitMFC_char__class_ATL::ChTraitsCRT_char_____class_ATL::CStringT_char__class_StrTraitMFC_char__class_ATL::ChTraitsCRT_char____const__.0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0xa
mov eax, dword [ebp - 0x1c]
xor esi, esi
mov byte [ebp - 4], 5
mov dword [ebp - 0x30], esi
cmp dword [eax + 0x14], esi
jbe 0x404f35
mov dword [ebp - 0x3c], esi
nop dword [eax]
push str.6100
lea ecx, [ebp - 0x10]
call fcn.00401bc0
mov byte [ebp - 4], 6
test esi, esi
js 0x405022
mov eax, dword [ebp - 0x1c]
cmp esi, dword [eax + 0x14]
jge 0x405022
mov esi, dword [eax + 0x10]
lea ecx, [ebp - 0x7c]
add esi, dword [ebp - 0x3c]
lea eax, [esi + 8]
push eax
call fcn.00405550
push 0x2f
push 1
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x7c]
call fcn.00405570
mov eax, dword [eax]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
push dword [eax - 0xc]
push eax
call fcn.004024c0
mov edx, dword [ebp - 0x6c]
or eax, 0xffffffff
mov byte [ebp - 4], 7
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404b5c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [esi + 0xc]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [esi + 0xc]
cmp dword [eax - 0xc], 0
je 0x404beb
push 0x56bd5c
push eax
call fcn.00544dc1
add esp, 8
test eax, eax
setne al
test al, al
je 0x404beb
push dword [esi + 0x14]
inc dword [ebp - 0x2c]
lea ecx, [ebp - 0x70]
call fcn.00401ca0
lea ecx, [ebp - 0x48]
push ecx
push SysReAllocString
push 0x409
push dword [eax]
call dword [sym.imp.OLEAUT32.dll_VarCyFromDisp]
push dword [ebp - 0x70]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call sub.OLEAUT32.dll_DllUnregisterServer
mov eax, dword [esi + 0x10]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [esi + 0x10]
cmp dword [eax - 0xc], 0
je 0x404c6b
push 0x56bd5c
push eax
call fcn.00544dc1
add esp, 8
test eax, eax
setne al
test al, al
je 0x404c6b
push dword [esi + 0x14]
inc dword [ebp - 0x28]
lea ecx, [ebp - 0x74]
call fcn.00401ca0
lea ecx, [ebp - 0x48]
push ecx
push SysReAllocString
push 0x409
push dword [eax]
call dword [sym.imp.OLEAUT32.dll_VarCyFromDisp]
push dword [ebp - 0x74]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call sub.OLEAUT32.dll_VarCyAbs
mov ecx, dword [esi + 0x14]
add ebx, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x404cbe
cmp dword [ebx + 0xc], 0
jl 0x404cb2
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x404cb2
push edx
call fcn.00402e20
add esp, 4
mov dword [ebp - 0x20], eax
or ecx, 0xffffffff
lea edx, [ebx + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404caa
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x20]
add eax, 0x10
mov dword [ebp - 0x24], eax
jmp 0x404cbe
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x24]
call fcn.004042c0
push 0x2c
push 0x2e
lea ecx, [ebp - 0x24]
call fcn.00403bb0
mov ebx, dword [ebp - 0x24]
lea ecx, [ebp - 0x10]
push dword [ebx - 0xc]
push ebx
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [esi + 0x18]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [esi + 0x1c]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
push dword [esi + 4]
call fcn.00548346
add esp, 4
test eax, eax
jle 0x404d51
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 2
push 0x56bcd8
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 0
push dword [ebp - 0x60]
lea ecx, [ebp - 0x68]
call fcn.004038c0
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
lea esi, [eax + 8]
mov dword [ebp - 0x4c], esi
lea edx, [ecx - 0x10]
mov esi, dword [esi]
sub esi, 0x10
cmp edx, esi
je 0x404dee
cmp dword [esi + 0xc], 0
jl 0x404ddf
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x404ddf
push edx
call fcn.00402e20
add esp, 4
mov dword [ebp - 0x40], eax
or ecx, 0xffffffff
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404dd5
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x4c]
add eax, 0x10
mov dword [ecx], eax
jmp 0x404deb
push dword [ecx - 0xc]
push ecx
mov ecx, dword [ebp - 0x4c]
call fcn.004042c0
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x60]
test ecx, ecx
je 0x404df9
mov dword [ecx], eax
jmp 0x404dfc
mov dword [ebp - 0x64], eax
push 0
push 0
push dword [ebp - 0x34]
mov dword [ebp - 0x60], eax
push dword [ebp - 0x38]
call sub.OLEAUT32.dll_VarCyCmpR8
cmp eax, 1
jne 0x404ef7
push 6
push str.6000
lea ecx, [ebp - 0x14]
call fcn.004042c0
cmp word [ebp - 0x2c], 1
jne 0x404e4c
cmp word [ebp - 0x28], 1
jne 0x404e43
cmp dword [ebp - 0x5c], 1
jne 0x404e43
push 2
push 0x56bd88
jmp 0x404e61
push 2
push 0x56bd8c
jmp 0x404e61
cmp word [ebp - 0x28], 1
push 2
jne 0x404e5c
push 0x56bd90
jmp 0x404e61
push 0x56bd94
lea ecx, [ebp - 0x14]
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x14]
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x14]
call fcn.004024c0
push 1
push 0x56bd7c
lea ecx, [ebp - 0x14]
call fcn.004024c0
push 2
push 0x56bcd8
lea ecx, [ebp - 0x14]
call fcn.004024c0
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 0x18]
push dword [edi - 0xc]
push edi
call fcn.004024c0
cmp dword [ebp - 0x5c], 0
mov esi, dword [ebp - 0x64]
mov dword [ebp - 0x40], 0
jle 0x404ee1
mov ebx, dword [ebp - 0x40]
mov eax, dword [esi + 8]
lea ecx, [ebp - 0x18]
mov esi, dword [esi]
push dword [eax - 0xc]
push eax
call fcn.004024c0
inc ebx
cmp ebx, dword [ebp - 0x5c]
jl 0x404ec7
mov ebx, dword [ebp - 0x24]
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
call fcn.00403b50
lea ecx, [ebp - 0x7c]
call fcn.0045b060
mov edx, dword [ebp - 0x10]
or eax, 0xffffffff
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404f1e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x1c]
inc esi
add dword [ebp - 0x3c], 0x20
mov dword [ebp - 0x30], esi
cmp esi, dword [eax + 0x14]
jb 0x404ae0
mov esi, dword [ebp - 0x18]
cmp dword [esi - 0xc], 0
je 0x404fa6
lea ecx, [ebp - 0x90]
call fcn.00408fad
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 4], 9
push dword [eax + 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x404f69
mov eax, dword [ebp - 0x1c]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x90]
push 0
push 0x1001
push dword [eax + 8]
call fcn.004094d5
push dword [esi - 0xc]
lea ecx, [ebp - 0x90]
push esi
call fcn.0040984c
lea ecx, [ebp - 0x90]
call fcn.004093bc
lea ecx, [ebp - 0x90]
call fcn.00408fde
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 0xa
mov dword [ebp - 0x68], vtable.CList_class_ATL::CStringT_char__class_StrTraitMFC_char__class_ATL::ChTraitsCRT_char_____class_ATL::CStringT_char__class_StrTraitMFC_char__class_ATL::ChTraitsCRT_char____const__.0
call fcn.00403b50
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 3
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404fd7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x404ff2
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40500e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00407175
int3