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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5675a6
mov eax, dword fs:[0]
push eax
sub esp, 0x838
mov eax, dword [0x5df7e4]
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
push str.IsNewer
call fcn.004c1030
xorps xmm0, xmm0
lea eax, [ebp - 0x820]
push eax
movlpd qword [ebp - 0x844], xmm0
movlpd qword [ebp - 0x828], xmm0
call fcn.0050c720
add esp, 8
mov dword [ebp - 4], 0
push dword [ebp - 0x820]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x50d956
lea eax, [ebp - 0x834]
push eax
push dword [ebp - 0x820]
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
mov dword [ebp - 0x82c], 0
test ebx, ebx
je 0x50d7c6
push ebx
push 2
mov dword [ebp - 0x82c], 0
call esi
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
push esi
push ebx
push dword [ebp - 0x834]
push dword [ebp - 0x820]
call sub.VERSION.dll_GetFileVersionInfoW
lea eax, [ebp - 0x82c]
push eax
lea eax, [ebp - 0x838]
push eax
push 0x5be298
push esi
call sub.VERSION.dll_VerQueryValueW
mov eax, dword [ebp - 0x838]
push edi
mov si, word [eax + 0x16]
movzx ecx, word [eax + 0x12]
mov bx, word [eax + 0x10]
mov word [ebp - 0x812], si
mov si, word [eax + 0x14]
mov dword [ebp - 0x83c], ecx
mov word [ebp - 0x814], si
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x83c]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
movzx eax, ax
mov dword [ebp - 0x82c], eax
jmp 0x50d7f6
mov ax, word [ebp - 0x822]
mov bx, word [ebp - 0x826]
mov word [ebp - 0x814], ax
mov ax, word [ebp - 0x824]
mov word [ebp - 0x812], ax
mov ax, word [ebp - 0x828]
mov dword [ebp - 0x83c], eax
push 0x800
lea eax, [ebp - 0x810]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x834]
push eax
lea eax, [ebp - 0x810]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov dword [ebp - 0x81c], eax
mov dword [ebp - 0x824], 0
test eax, eax
je 0x50d8d1
push eax
push 2
mov dword [ebp - 0x824], 0
call esi
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
lea eax, [ebp - 0x810]
push esi
push dword [ebp - 0x81c]
push dword [ebp - 0x834]
push eax
call sub.VERSION.dll_GetFileVersionInfoW
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0x838]
push eax
push 0x5be298
push esi
call sub.VERSION.dll_VerQueryValueW
mov eax, dword [ebp - 0x838]
push edi
movzx ecx, word [eax + 0x12]
mov si, word [eax + 0x10]
mov dword [ebp - 0x81c], ecx
mov cx, word [eax + 0x16]
mov ax, word [eax + 0x14]
mov word [ebp - 0x82e], cx
mov word [ebp - 0x816], ax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x81c]
mov di, word [ebp - 0x82e]
movzx eax, ax
mov dword [ebp - 0x824], eax
jmp 0x50d8fa
mov ax, word [ebp - 0x83e]
mov di, word [ebp - 0x840]
mov si, word [ebp - 0x842]
mov word [ebp - 0x816], ax
mov ax, word [ebp - 0x844]
mov dword [ebp - 0x81c], eax
push str.IsNewer_over
call fcn.004c1030
mov eax, dword [ebp - 0x81c]
add esp, 4
cmp ax, word [ebp - 0x83c]
ja 0x50d956
mov eax, dword [ebp - 0x824]
cmp ax, word [ebp - 0x82c]
jne 0x50d952
cmp si, bx
ja 0x50d956
mov ax, word [ebp - 0x812]
jne 0x50d952
cmp di, ax
ja 0x50d956
cmp si, bx
jne 0x50d952
cmp di, ax
jne 0x50d952
mov ax, word [ebp - 0x814]
cmp word [ebp - 0x816], ax
ja 0x50d956
xor bl, bl
jmp 0x50d958
mov bl, 1
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov eax, dword [ebp - 0x820]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x50d97d
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
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.005121be
mov esp, ebp
pop ebp
ret