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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cfba6
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x5053a4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x230], ebx
mov dword [ebp - 0x23c], 0
call fcn.00408990
mov ecx, eax
test ecx, ecx
jne 0x40eccb
push 0x80004005
call fcn.00408740
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
push 0x104
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ed00
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x220]
call fcn.004085d0
call fcn.00408990
mov ecx, eax
test ecx, ecx
jne 0x40ed37
push 0x80004005
call fcn.00408740
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x21c], edi
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x220]
cmp dword [esi - 0xc], 0
jle 0x40eefc
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40eefc
mov dword [ebp - 0x22c], 0
mov ecx, 1
sub ecx, dword [esi - 4]
mov eax, dword [esi - 8]
or eax, ecx
jge 0x40ed94
push 0
lea ecx, [ebp - 0x220]
call fcn.00408460
mov esi, dword [ebp - 0x220]
lea eax, [ebp - 0x224]
push eax
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x230], eax
test eax, eax
jne 0x40edfd
lea eax, [ebp - 0x21c]
mov ecx, ebx
push eax
call fcn.00408090
lea edx, [edi - 0x10]
mov byte [ebp - 4], 0
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40edd8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x40ef44
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x40ef44
inc eax
push eax
call fcn.004a4c07
add esp, 4
mov dword [ebp - 0x234], eax
test eax, eax
je 0x40eefc
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
or eax, ecx
jge 0x40ee37
push 0
lea ecx, [ebp - 0x220]
call fcn.00408460
mov esi, dword [ebp - 0x220]
mov edi, dword [ebp - 0x234]
push edi
push dword [ebp - 0x230]
push 0
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x40ee83
push edi
call fcn.004a4c10
add esp, 4
lea eax, [ebp - 0x21c]
mov ecx, ebx
push eax
call fcn.00408090
lea ecx, [ebp - 0x21c]
call fcn.004064e0
lea ecx, [ebp - 0x220]
call fcn.004064e0
jmp 0x40ef44
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x22c]
push eax
push 0x4f609c
push edi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x40ee51
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax + 8]
mov ebx, dword [eax + 0xc]
mov eax, ecx
shr eax, 0x10
mov dword [ebp - 0x230], eax
mov eax, dword [ebp - 0x234]
push eax
movzx edi, cx
shr ebx, 0x10
call fcn.004a4c10
mov eax, 0x51eb851f
mul ebx
lea eax, [ebp - 0x21c]
shr edx, 5
push edx
push edi
push dword [ebp - 0x230]
push str._04d_04d_02d
push eax
call fcn.00407520
mov edi, dword [ebp - 0x21c]
add esp, 0x18
mov ebx, dword [ebp - 0x238]
lea eax, [ebp - 0x21c]
mov ecx, ebx
push eax
call fcn.00408090
lea edx, [edi - 0x10]
mov byte [ebp - 4], 0
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ef28
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x40ef44
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a4bf6
mov esp, ebp
pop ebp
ret