Function at 0x404706
Capabilities:
Check if file exists
Get file version info
Impersonate file version information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
push esi
xor esi, esi
cmp dword [ebp + 8], esi
push edi
je 0x404975
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x404975
lea eax, [ebp - 0x20]
mov dword [ebp - 0x10], esi
push eax
mov dword [ebp - 0x20], esi
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
cmp edi, esi
mov dword [ebp - 0x28], edi
jbe 0x404975
push ebx
push edi
call sub.MFC42u.DLL_operatornew
mov ebx, eax
push edi
push esi
push ebx
mov dword [ebp - 0x30], ebx
call sub.MSVCRT.dll_memset
add esp, 0x10
push ebx
push edi
push dword [ebp - 0x20]
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x404964
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
cmp eax, esi
mov dword [ebp - 0x18], eax
je 0x404964
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x41b9f4
push ebx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x404964
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x41b9f0
push ebx
mov dword [ebp - 0x2c], esi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x404858
push dword [ebp + 0xc]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x446]
mov ebx, dword [ebp - 0x1c]
mov word [ebp - 0x448], si
rep stosd dword es:[edi], eax
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
stosw word es:[edi], ax
call dword [sym.imp.MSVCRT.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x448]
push dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x448]
push str._d___d___d___d
push eax
call dword [sym.imp.MSVCRT.dll_swscanf]
movzx eax, word [ebp - 8]
movzx ecx, word [ebp - 4]
shl eax, 0x10
or eax, ecx
add esp, 0x18
mov dword [ebx + 0xc], eax
movzx eax, word [ebp - 8]
movzx ecx, word [ebp - 4]
shl eax, 0x10
or eax, ecx
mov dword [ebx + 0x14], eax
mov ebx, dword [ebp - 0x30]
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x23e]
mov word [ebp - 0x240], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], esi
mov dword [ebp - 0x14], esi
mov edi, dword [sym.imp.MSVCRT.dll_swprintf]
movzx ecx, word [eax + 2]
movzx eax, word [eax]
push ecx
push eax
lea eax, [ebp - 0x240]
push str.StringFileInfo_04x_04xFileVersion
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x240]
push eax
push ebx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x4048ce
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.MSVCRT.dll_memcpy
add esp, 0x10
push 0x208
lea eax, [ebp - 0x240]
push esi
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp - 0xc]
add esp, 0xc
movzx ecx, word [eax + 2]
movzx eax, word [eax]
push ecx
push eax
lea eax, [ebp - 0x240]
push str.StringFileInfo_04x_04xProductVersion
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x240]
push eax
push ebx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x404935
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.MSVCRT.dll_memcpy
add esp, 0x10
mov eax, dword [ebp - 0xc]
push dword [ebp - 0x28]
mov ax, word [eax]
push ebx
push eax
push 1
pop edi
push edi
push 0x10
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
test eax, eax
je 0x404964
push esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
test eax, eax
je 0x404964
mov dword [ebp - 0x10], edi
cmp ebx, esi
je 0x40496f
push ebx
call sub.MFC42u.DLL_operatordelete
pop ecx
mov eax, dword [ebp - 0x10]
pop ebx
jmp 0x404977
xor eax, eax
pop edi
pop esi
leave
ret 8