Function at 0x42cfe0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5dcd40
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
mov edi, dword [ebp + 8]
cmp dword [edi + 8], 4
jne 0x42d07b
call fcn.004b5c24
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x42d02f
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 + 8], eax
movzx ecx, word [edi + 0xe]
push ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
call fcn.0044f060
add esp, 4
test al, al
jne 0x42d091
mov eax, dword [ebp + 8]
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 0x42d07b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x10
mov dword [esi], edi
movzx eax, word [edi + 0xc]
add eax, 0xfffffffe
cmp eax, 6
ja case.0x42d0a3.4
jmp dword [eax*4 + 0x42d4d8]
lea eax, [edi + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push 0x5fa974
push eax
call fcn.0044f9a0
add esp, 8
test al, al
je case.0x42d0a3.4
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
lea eax, [edi + 0x11c]
push eax
push ecx
push edx
lea eax, [edi + 0x14]
push eax
mov ecx, esi
call fcn.0042b8e0
test eax, eax
je case.0x42d0a3.4
cmp dword [esi + 0x10], ebx
je 0x42d3b8
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push 1
push eax
push ecx
push edx
lea ecx, [esi + 0x80]
call fcn.00426fb0
cmp eax, ebx
je 0x42d3b8
mov eax, dword [edi + 0x158]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push eax
lea eax, [edi + 0x11c]
push eax
mov eax, dword [ebp + 0xc]
push ecx
push edx
push eax
push ebx
mov ecx, esi
call fcn.004299b0
test eax, eax
je 0x42d3ad
cmp dword [esi + 0x10], ebx
jne 0x42d0f5
jmp 0x42d3b8
lea eax, [edi + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push str..doc
push eax
call fcn.005bcdf4
add esp, 8
test eax, eax
jne 0x42d1ab
cmp dword [edi + 0x168], ebx
je 0x42d1ab
push 1
lea eax, [edi + 0x14]
push eax
lea ecx, [ebp - 0x14]
push ecx
call fcn.0042a3d0
add esp, 0xc
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call fcn.00406510
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.004273a0
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], ebx
je 0x42d1ab
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x42d1b7
lea eax, [edi + 0x14]
push eax
lea ecx, [ebp + 8]
call fcn.00415540
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je case.0x42d0a3.4
mov eax, dword [ebp + 8]
push eax
mov dword [esi + 0x20], ebx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push str..rtf
push eax
call fcn.005bcdf4
add esp, 8
test eax, eax
jne 0x42d286
mov ecx, esi
call fcn.004270e0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [esi + 0x64]
call fcn.0048e310
test eax, eax
je case.0x42d0a3.4
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push 1
push edx
mov edx, dword [ebp + 0xc]
push eax
lea ecx, [esi + 0x80]
push edx
call fcn.00426fb0
cmp eax, ebx
je 0x42d3b8
jmp 0x42d230
cmp dword [edi + 0x164], ebx
mov eax, dword [edi + 0x1f4]
push eax
mov eax, dword [ebp + 0x14]
setne cl
movzx edx, cl
mov ecx, dword [ebp + 0x10]
push edx
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push ebx
push eax
mov ecx, esi
call fcn.00427ff0
test eax, eax
je 0x42d3ad
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push 1
push ecx
push edx
push eax
lea ecx, [esi + 0x80]
call fcn.00426fb0
cmp eax, ebx
jne 0x42d230
jmp 0x42d3b8
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push 1
push edx
mov edx, dword [ebp + 0xc]
push eax
lea ecx, [esi + 0x80]
push edx
call fcn.00426fb0
cmp eax, ebx
je 0x42d3b8
jmp 0x42d2b0
cmp dword [edi + 0x164], ebx
mov edx, dword [ebp + 0x14]
setne al
movzx ecx, al
mov eax, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0xc]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push ebx
push edx
mov ecx, esi
call fcn.0042c430
test eax, eax
je 0x42d3ad
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push 1
push eax
push ecx
push edx
lea ecx, [esi + 0x80]
call fcn.00426fb0
cmp eax, ebx
jne 0x42d2b0
jmp 0x42d3b8
cmp dword [edi + 0x1fc], ebx
je case.0x42d0a3.4
mov dword [esi + 0x20], ebx
mov eax, dword [edi + 0x1fc]
movzx ecx, word [eax]
mov dword [ebp - 0x1c], eax
movzx eax, byte [eax + 2]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], eax
cmp ecx, ebx
jle 0x42d3b8
lea esp, [esp]
push 0x28
call fcn.004a800e
add esp, 4
cmp eax, ebx
je 0x42d3b8
push eax
lea ecx, [esi + 0x80]
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], ebx
mov dword [eax + 0x18], ebx
mov dword [eax + 0x1c], ebx
mov dword [eax + 0x20], ebx
mov dword [eax + 0x24], ebx
call fcn.004ca52a
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x9c], ebx
mov ecx, dword [edi + 0x15c]
mov edx, dword [edi + 0x1f4]
push ecx
mov ecx, dword [ebp + 0x14]
push edx
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push 1
push ebx
push ecx
mov ecx, dword [ebp - 0x10]
push edx
mov edx, dword [ebp - 0x1c]
push eax
push ebx
push ecx
add edx, 3
push edx
mov ecx, esi
call fcn.00428260
test eax, eax
je 0x42d3ad
mov eax, dword [ebp - 0x10]
cmp dword [esi + 0x20], eax
jl 0x42d330
jmp 0x42d3b8
lea ecx, [esi + 0x80]
call fcn.004276f0
lea ecx, [esi + 0x80]
call fcn.00427020
mov dword [esi + 0x60], eax
mov esi, 1
jmp 0x42d49a
cmp dword [edi + 0x1fc], ebx
je case.0x42d0a3.4
mov ecx, esi
call fcn.004270e0
mov eax, dword [edi + 0x1fc]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je case.0x42d0a3.4
lea ecx, [esi + 4]
mov dword [esi + 0x20], ebx
call fcn.004c3db3
mov ecx, dword [esi + 0x64]
push 2
call fcn.0048df60
mov ecx, dword [edi + 0x15c]
push ecx
mov ecx, dword [esi + 0x64]
call fcn.0048df70
mov edx, dword [ebp - 0x1c]
mov ecx, dword [esi + 0x64]
add edx, 4
push edx
call fcn.0048fb40
test eax, eax
je case.0x42d0a3.4
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push 1
push eax
mov eax, dword [ebp + 0xc]
push edx
lea ecx, [esi + 0x80]
push eax
call fcn.00426fb0
cmp eax, ebx
je 0x42d3b8
lea esp, [esp]
mov ecx, dword [edi + 0x1f4]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0xc]
push ebx
push edx
push eax
push ecx
push ebx
push ebx
mov ecx, esi
call fcn.00427ff0
test eax, eax
je 0x42d3ad
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push 1
push edx
push eax
push ecx
lea ecx, [esi + 0x80]
call fcn.00426fb0
cmp eax, ebx
jne 0x42d450
jmp 0x42d3b8
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
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 0x42d4c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10