Function at 0x4ec390
Capabilities:
Check if file exists
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x576b28
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5b3074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], edx
mov ebx, ecx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], 0
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4ec3dc
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ec3ee
lock inc dword [ecx + 0x14]
lea esi, [ecx + 8]
jmp 0x4ec3f3
call dword [eax + 0xc]
mov esi, eax
lea edi, [esi + 0x10]
mov dword [ebp - 0x30], edi
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], 0
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
je 0x4ec792
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ec792
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4ec433
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ec448
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4ec44a
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov ecx, 0x58cca0
mov byte [ebp - 4], 1
or ebx, 0xffffffff
test ecx, 0xffff0000
jne 0x4ec530
movzx ecx, cx
call fcn.00408f5a
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4ec595
mov edx, 0x58cca0
movzx ecx, dx
shr ecx, 4
inc ecx
push 6
movzx ecx, cx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edx, eax
test edx, edx
je 0x4ec595
mov ecx, 0x58cca0
movzx eax, cx
mov ecx, dword [ebp - 0x1c]
push eax
call fcn.00408f9e
add esp, 4
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4ec595
movzx edx, word [eax]
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
mov dword [ebp - 0x1c], edx
jge 0x4ec4e3
push edx
lea ecx, [ebp - 0x10]
call fcn.00409225
mov esi, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
movzx ecx, word [eax]
add eax, 2
push ecx
push eax
push edx
push esi
call fcn.0051e916
add esp, 0x10
cmp eax, 0x50
ja case.0x4ec508.1
movzx eax, byte [eax + 0x4ec80c]
jmp dword [eax*4 + 0x4ec7fc]
push 0x8007000e
call fcn.0040b4a2
mov eax, dword [ebp - 0x1c]
cmp eax, dword [esi - 8]
jg case.0x4ec508.20
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
jmp 0x4ec595
push 0
push 0
push 0xffffffffffffffff
push 0x58cca0
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ebx, [eax - 1]
test ebx, ebx
jle 0x4ec618
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x4ec56d
push ebx
lea ecx, [ebp - 0x10]
call fcn.00409225
mov esi, dword [ebp - 0x10]
push ebx
push esi
push 0xffffffffffffffff
push 0x58cca0
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp ebx, dword [esi - 8]
jg case.0x4ec508.20
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
or ebx, 0xffffffff
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 2
push 0
mov dword [ebp - 0x24], 0x34
push dword [eax]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4ec77b
push eax
call fcn.00510d4b
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4ec714
mov ecx, dword [ebp - 0x14]
push 0x5894e4
call fcn.0040941c
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4ec6b5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ec6b3
mov eax, dword [ecx + 4]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call esi
jmp 0x4ec6bb
cmp dword [esi - 0xc], 0
lea ecx, [esi - 0x10]
mov eax, dword [ecx]
mov dword [ebp - 0x20], eax
je 0x4ec592
cmp dword [ecx + 0xc], 0
lea edx, [ecx + 0xc]
jge 0x4ec654
cmp dword [esi - 8], 0
jge 0x4ec643
push 0x80070057
call fcn.0040b4a2
xor eax, eax
mov dword [esi - 0xc], 0
mov word [esi], ax
jmp 0x4ec592
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4ec685
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ec681
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4ec685
mov ecx, edx
call esi
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ec6a6
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
jmp 0x4ec595
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
jmp 0x4ec595
call edx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4ec6ff
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ec6fd
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call esi
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
call edx
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
push eax
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
push 0
push dword [eax]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x4ec76e
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x58cbb4
push dword [ebp - 0x1c]
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x4ec76e
mov ecx, dword [ebp - 0x28]
movzx eax, word [ecx + 0xc]
push eax
movzx eax, word [ecx + 0xe]
push eax
movzx eax, word [ecx + 8]
push eax
movzx eax, word [ecx + 0xa]
push eax
lea eax, [ebp - 0x10]
push str._d._d._d._d
push eax
call fcn.00418437
mov esi, dword [ebp - 0x10]
add esp, 0x18
push 1
push dword [ebp - 0x1c]
call fcn.0051022a
add esp, 8
add esi, 0xfffffff0
mov ecx, esi
call fcn.00408e8d
mov ecx, dword [ebp - 0x14]
add eax, 0x10
mov dword [ecx], eax
jmp 0x4ec5dc
mov ecx, esi
call fcn.00408e8d
add eax, 0x10
mov dword [ebp - 4], 0xffffffff
mov dword [ebx], eax
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4ec7e8
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ec7e6
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
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 edx
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret