Function at 0x42cb20
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5dcd10
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x66c0e0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [esi + 0x54], ebx
cmp dword [esi + 0x60], ebx
jne 0x42cb6b
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x8c]
cmp eax, ebx
je 0x42cc19
mov eax, dword [esi + 0x9c]
mov ebx, 1
add eax, ebx
push eax
lea ecx, [esi + 0x80]
call fcn.00569307
test eax, eax
je 0x42cbdb
mov eax, dword [eax + 8]
add dword [esi + 0x9c], ebx
test eax, eax
je 0x42cbdb
and dword [esi + 0x4c], 0xfffffffe
mov dword [esi + 0x60], eax
mov ecx, dword [esi + 0x9c]
push ecx
lea ecx, [esi + 0x80]
call fcn.00569307
test eax, eax
je 0x42cbce
mov eax, dword [eax + 8]
mov dword [esi + 0x60], eax
mov dword [ebp - 0x14], ebx
jmp 0x42cfc3
xor eax, eax
mov dword [esi + 0x60], eax
mov dword [ebp - 0x14], ebx
jmp 0x42cfc3
mov eax, dword [esi + 0x4c]
test al, 1
je 0x42cbed
and eax, 0xfffffffe
mov dword [esi + 0x4c], eax
jmp 0x42cfc3
mov eax, dword [esi]
cmp dword [eax + 8], 4
jne 0x42cfc3
movzx edx, word [eax + 0xe]
push edx
call fcn.0044f090
add esp, 4
test al, al
je 0x42cfc3
or dword [esi + 0x4c], ebx
mov dword [ebp - 0x14], ebx
jmp 0x42cfc3
mov eax, dword [esi + 0x4c]
test al, 2
je 0x42cc55
test al, 1
jne 0x42cbe2
mov eax, dword [esi]
cmp dword [eax + 8], 4
jne 0x42cfc3
movzx eax, word [eax + 0xe]
push eax
call fcn.0044f090
add esp, 4
test al, al
je 0x42cfc3
mov eax, 1
or dword [esi + 0x4c], eax
mov dword [ebp - 0x14], eax
jmp 0x42cfc3
call fcn.004b5c24
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x42cc6f
push 0x80004005
call fcn.004047e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
and dword [esi + 0x4c], 0xfffffffe
mov edi, dword [esi]
cmp dword [edi + 8], 4
mov ecx, dword [esi + 0x4c]
mov dword [ebp - 4], ebx
jne 0x42cf9d
movzx eax, word [edi + 0xc]
mov dword [ebp - 0x14], 1
cmp eax, 2
jne 0x42cce5
mov ecx, dword [edi + 0x158]
mov eax, dword [esi + 0x60]
push ecx
mov ecx, dword [eax]
lea edx, [edi + 0x11c]
push edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
push edx
push eax
push 1
mov ecx, esi
call fcn.004299b0
test eax, eax
jne 0x42cf9d
movzx ecx, word [edi + 0xe]
push ecx
mov ecx, esi
call fcn.00424cb0
mov dword [ebp - 0x14], eax
jmp 0x42cf9d
cmp eax, 3
jne 0x42ce31
lea ecx, [ebp - 0x10]
call fcn.00405ef0
lea ebx, [edi + 0x14]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push str..doc
push eax
call fcn.005bcdf4
add esp, 8
test eax, eax
jne 0x42cd66
cmp dword [edi + 0x168], eax
je 0x42cd66
push 1
lea edx, [ebp - 0x18]
push ebx
push edx
call fcn.0042a3d0
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00406510
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call fcn.004273a0
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
je 0x42cd66
lea ecx, [ebp - 0x10]
call fcn.0040d3c0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x42cd66
lea ecx, [ebp - 0x10]
call fcn.00405ef0
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jne 0x42cd78
push ebx
lea ecx, [ebp - 0x10]
call fcn.00415540
lea ecx, [ebp - 0x10]
call fcn.0040d3c0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push str..rtf
push eax
call fcn.005bcdf4
add esp, 8
test eax, eax
mov eax, dword [esi + 0x60]
jne 0x42cdea
cmp dword [edi + 0x164], 0
mov edx, dword [edi + 0x1f4]
push edx
setne cl
movzx edx, cl
mov ecx, dword [eax]
push edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
push edx
push eax
push 1
lea ecx, [ebp - 0x10]
call fcn.0040d3c0
push eax
mov ecx, esi
call fcn.00427ff0
test eax, eax
jne 0x42cf9d
movzx ecx, word [edi + 0xe]
push ecx
mov ecx, esi
call fcn.00424cb0
mov dword [ebp - 0x14], eax
jmp 0x42cf9d
cmp dword [edi + 0x164], 0
setne dl
movzx ecx, dl
mov edx, dword [eax]
push ecx
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 4]
push ecx
push edx
push 1
lea ecx, [ebp - 0x10]
call fcn.0040d3c0
push eax
mov ecx, esi
call fcn.0042c430
test eax, eax
jne 0x42cf9d
movzx eax, word [edi + 0xe]
push eax
mov ecx, esi
call fcn.00424cb0
mov dword [ebp - 0x14], eax
jmp 0x42cf9d
cmp eax, 6
jne 0x42cebc
mov eax, dword [edi + 0x1fc]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x42ceb1
movzx ecx, word [eax]
mov edx, dword [edi + 0x15c]
mov ebx, dword [esi + 0x60]
push edx
movzx edx, byte [eax + 2]
movzx eax, word [edi + 0xe]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + 0x1f4]
push ecx
push edx
push eax
call fcn.0041b260
mov edx, dword [ebx]
add esp, 4
movzx ecx, al
mov eax, dword [ebx + 8]
push ecx
mov ecx, dword [ebx + 4]
push 0
push edx
mov edx, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x1c]
push ecx
push 1
push edx
add eax, 3
push eax
mov ecx, esi
call fcn.00428260
test eax, eax
jne 0x42cf9d
movzx ecx, word [edi + 0xe]
push ecx
mov ecx, esi
call fcn.00424cb0
mov dword [ebp - 0x14], eax
jmp 0x42cf9d
or ecx, 2
mov dword [esi + 0x4c], ecx
jmp 0x42cf9d
cmp eax, 7
jne 0x42cf02
lea edx, [edi + 0x14]
push edx
lea ecx, [ebp - 0x10]
call fcn.00415540
cmp dword [edi + 0x164], ebx
mov eax, dword [esi + 0x60]
setne cl
movzx edx, cl
movzx ecx, word [edi + 0x11a]
push edx
mov edx, dword [eax]
push ecx
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0x10]
push ecx
push edx
push 1
push eax
mov ecx, esi
call fcn.00428990
jmp 0x42cf95
cmp eax, 8
jne 0x42cf3c
mov ecx, dword [edi + 0x1f4]
mov eax, dword [esi + 0x60]
mov edx, dword [eax]
push ecx
mov ecx, dword [eax + 8]
push ebx
push edx
mov edx, dword [eax + 4]
push ecx
push edx
push 1
push ebx
mov ecx, esi
call fcn.00427ff0
test eax, eax
jne 0x42cf9d
movzx eax, word [edi + 0xe]
push eax
mov ecx, esi
call fcn.00424cb0
mov dword [ebp - 0x14], eax
jmp 0x42cf9d
cmp eax, 4
jne 0x42cf9d
lea ebx, [edi + 0x14]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push 0x5fa97c
push eax
call fcn.0044f9a0
add esp, 8
lea ecx, [ebp - 0x10]
test al, al
je 0x42cf6c
push ecx
push ebx
call fcn.0041da90
add esp, 8
jmp 0x42cf72
push ebx
call fcn.00415540
movzx edx, word [edi + 0x11a]
mov eax, dword [esi + 0x60]
mov ecx, dword [eax]
push edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
mov ecx, dword [ebp - 0x10]
push edx
push eax
push 1
push ecx
mov ecx, esi
call fcn.00428bb0
test eax, eax
jne 0x42cf9d
or dword [esi + 0x4c], 2
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42cfc3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret