Function at 0x404c50
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [ecx + 0x24]
mov esi, ecx
mov dword [ebp - 0x18], ecx
test eax, eax
mov dword [ebp - 0x20], eax
je 0x404ecc
mov edx, dword [esi + 0x2c]
test edx, edx
je 0x404ea0
mov eax, dword [ebp - 0x18]
mov ebx, dword [eax + 0x20]
movdqa xmm0, xmmword [ebx]
lea esi, [ebx + 0x10]
pmovmskb eax, xmm0
not eax
jmp 0x404c9f
mov ecx, dword [ebp - 0x24]
lea eax, [ecx - 1]
and eax, ecx
dec edx
je 0x404ea0
test ax, ax
jne 0x404cca
nop word cs:[eax + eax]
nop
movdqa xmm0, xmmword [esi]
add ebx, 0xfffff100
add esi, 0x10
pmovmskb eax, xmm0
cmp eax, 0xffff
je 0x404cb0
not eax
mov dword [ebp - 0x24], eax
tzcnt eax, eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x28], ebx
neg eax
imul eax, eax, 0xf0
cmp dword [ebx + eax - 0xd8], 0
lea edi, [ebx + eax]
je 0x404cff
push dword [edi - 0xd4]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
mov ebx, dword [edi - 0x30]
mov eax, dword [edi - 0x34]
mov dword [ebp - 0x14], edi
test ebx, ebx
mov dword [ebp - 0x10], eax
je 0x404d40
mov eax, dword [ebp - 0x10]
lea edi, [eax + 4]
jmp 0x404d26
add edi, 0x10
dec ebx
je 0x404d40
cmp dword [edi - 4], 0
je 0x404d20
push dword [edi]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
jmp 0x404d20
mov edi, dword [ebp - 0x14]
cmp dword [edi - 0x38], 0
je 0x404d59
push dword [ebp - 0x10]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
test dword [edi - 0xc8], 0x7fffffff
jne 0x404e00
test dword [edi - 0x20], 0x7fffffff
jne 0x404e20
mov ebx, dword [edi - 0x24]
mov eax, dword [edi - 0x28]
test ebx, ebx
mov dword [ebp - 0x10], eax
je 0x404db0
mov eax, dword [ebp - 0x10]
lea edi, [eax + 4]
jmp 0x404d96
add edi, 0x10
dec ebx
je 0x404db0
cmp dword [edi - 4], 0
je 0x404d90
push dword [edi]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
jmp 0x404d90
mov edi, dword [ebp - 0x14]
cmp dword [edi - 0x2c], 0
je 0x404dc9
push dword [ebp - 0x10]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
test dword [edi - 0xb8], 0x7fffffff
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x28]
jne 0x404e40
test dword [edi - 0xa8], 0x7fffffff
jne 0x404e62
mov eax, dword [edi - 0x10]
test eax, eax
jne 0x404e83
jmp 0x404c90
push dword [edi - 0xc4]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
test dword [edi - 0x20], 0x7fffffff
je 0x404d76
push dword [edi - 0x1c]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
jmp 0x404d76
push dword [edi - 0xb4]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
mov edx, dword [ebp - 0x1c]
test dword [edi - 0xa8], 0x7fffffff
je 0x404de7
push dword [edi - 0xa4]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
mov edx, dword [ebp - 0x1c]
mov eax, dword [edi - 0x10]
test eax, eax
je 0x404c90
lock dec dword [eax]
jne 0x404c90
mov eax, dword [ebp - 0x14]
mov edi, edx
mov ecx, dword [eax - 0x10]
call fcn.004062d0
mov edx, edi
jmp 0x404c90
mov esi, dword [ebp - 0x20]
mov ecx, 0xf0
lea eax, [esi + 1]
mul ecx
add esi, eax
cmp esi, 0xffffffef
mov esi, dword [ebp - 0x18]
je 0x404ecc
mov ecx, dword [esi + 0x20]
sub ecx, eax
push dword [ecx - 4]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
test dword [esi + 0xc], 0x7fffffff
je 0x404ee5
push dword [esi + 0x10]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
mov eax, esi
mov esi, dword [esi + 4]
mov edi, dword [eax + 8]
test edi, edi
je 0x404f77
lea ebx, [esi + 0x34]
jmp 0x404f06
add ebx, 0x40
dec edi
je 0x404f77
cmp dword [ebx - 0x1c], 0
je 0x404f1c
push dword [ebx - 0x18]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
cmp dword [ebx - 0x10], 0
je 0x404f32
push dword [ebx - 0xc]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
test dword [ebx - 0x34], 0x7fffffff
jne 0x404f50
cmp dword [ebx - 4], 0
jne 0x404f66
jmp 0x404f00
push dword [ebx - 0x30]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
cmp dword [ebx - 4], 0
je 0x404f00
push dword [ebx]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
jmp 0x404f00
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0
je 0x404f8d
push esi
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
mov eax, dword [ebp - 0x18]
mov edi, dword [eax + 0x60]
test edi, edi
je 0x405116
mov eax, dword [eax + 0x6c]
test eax, eax
mov dword [ebp - 0x10], eax
je 0x405018
movdqa xmm0, xmmword [edi]
mov edx, dword [ebp - 0x10]
lea ebx, [edi + 0x10]
mov esi, edi
pmovmskb ecx, xmm0
not ecx
jmp 0x404fe6
lea eax, [ecx - 1]
and eax, ecx
mov dword [ebp - 0x14], eax
tzcnt eax, ecx
mov ecx, esi
shl eax, 4
sub ecx, eax
push dword [ecx - 4]
call sub.pdh.dll_PdhRemoveCounter
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
dec edx
mov ecx, eax
je 0x405018
test cx, cx
mov dword [ebp - 0x1c], edx
jne 0x404fc0
nop
movdqa xmm0, xmmword [ebx]
add esi, 0xffffff00
add ebx, 0x10
pmovmskb ecx, xmm0
cmp ecx, 0xffff
je 0x404ff0
mov edx, 0xfffffffe
sub edx, ecx
not ecx
mov eax, ecx
and eax, edx
jmp 0x404fc5
mov esi, dword [ebp - 0x18]
mov eax, dword [esi + 0x84]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x405033
push eax
call sub.kernel32.dll_CloseHandle
test eax, eax
je 0x40504d
mov eax, dword [esi + 0x80]
lea ecx, [eax + 1]
cmp ecx, 2
jae 0x405060
mov eax, dword [esi + 0x64]
test eax, eax
jne 0x405071
jmp 0x405116
call sub.kernel32.dll_GetLastError
mov eax, dword [esi + 0x80]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x405041
push eax
call sub.pdh.dll_PdhCloseQuery
mov eax, dword [esi + 0x64]
test eax, eax
je 0x405116
cmp dword [ebp - 0x10], 0
mov dword [ebp - 0x14], eax
je 0x4050ee
movdqa xmm0, xmmword [edi]
lea esi, [edi + 0x10]
pmovmskb ebx, xmm0
not ebx
jmp 0x40509c
lea eax, [ebx - 1]
and eax, ebx
dec dword [ebp - 0x10]
mov ebx, eax
je 0x4050ee
test bx, bx
jne 0x4050cb
nop word cs:[eax + eax]
nop dword [eax + eax]
movdqa xmm0, xmmword [esi]
add edi, 0xffffff00
add esi, 0x10
pmovmskb ebx, xmm0
cmp ebx, 0xffff
je 0x4050b0
not ebx
tzcnt ecx, ebx
mov eax, edi
shl ecx, 4
sub eax, ecx
cmp dword [eax - 0x10], 0
je 0x405090
push dword [eax - 0xc]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
jmp 0x405090
mov ecx, dword [ebp - 0x14]
mov eax, ecx
shl eax, 4
add ecx, eax
cmp ecx, 0xffffffdf
mov ecx, dword [ebp - 0x18]
je 0x405116
mov ecx, dword [ecx + 0x60]
neg eax
push dword [ecx + eax - 0x14]
push 0
push dword [0x4af0c0]
call sub.kernel32.dll_HeapFree
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret