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

Disassembly:
push 0xffffffffffffffff
push 0x42a128
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
lea eax, [esp + 0x1c]
push edi
xor edi, edi
push eax
push ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], edi
mov ebx, 1
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
cmp esi, edi
je 0x4080d4
push esi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esp + 0x20]
mov edi, eax
push edi
push esi
push ecx
push ebp
call sub.VERSION.dll_GetFileVersionInfoA
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
push edx
push eax
push str.VarFileInfoTranslation
push edi
call sub.VERSION.dll_VerQueryValueA
cmp dword [esp + 0x18], 4
jne 0x4080c8
lea ecx, [esp + 0x3c]
call fcn.0041d7bd
xor esi, esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], esi
call fcn.0041d7bd
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x3c]
mov byte [esp + 0x34], bl
mov edx, dword [ecx]
push edx
push str._08x
push eax
call fcn.00418d12
add esp, 0xc
lea ecx, [esp + 0x28]
push 4
push ecx
lea ecx, [esp + 0x44]
call fcn.00418978
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x38], 2
call fcn.0041da01
lea ecx, [esp + 0x28]
mov byte [esp + 0x34], bl
call fcn.0041d908
lea edx, [esp + 0x28]
push 4
push edx
lea ecx, [esp + 0x44]
call fcn.004189f5
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x38], 3
call fcn.0041dc2d
lea ecx, [esp + 0x28]
mov byte [esp + 0x34], bl
call fcn.0041d908
push str.StringFileInfo_
lea ecx, [esp + 0x40]
call fcn.0041da50
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x3c]
push eax
call fcn.0041dc2d
push str.FileVersion
lea ecx, [esp + 0x40]
call fcn.0041dbf1
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push edx
push eax
push edi
call sub.VERSION.dll_VerQueryValueA
cmp dword [esp + 0x18], ebx
jae 0x4080a5
mov dword [esp + 0x10], esi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x34], 0
call fcn.0041d908
lea ecx, [esp + 0x3c]
mov dword [esp + 0x34], 0xffffffff
call fcn.0041d908
xor edi, edi
jmp 0x4080e1
mov dword [esp + 0x10], 0
xor edi, edi
jmp 0x4080e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4080e1
xor ebx, ebx
lea ecx, [esp + 0x14]
call fcn.0041d7bd
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], 4
cmp eax, edi
je 0x40813e
push eax
call fcn.0040a7d0
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, edx
cmp byte [ecx - 1], 0x31
lea eax, [ecx - 1]
jge 0x408129
dec ecx
mov byte [eax], 0
cmp byte [ecx - 1], 0x31
lea eax, [ecx - 1]
jl 0x40811c
push edx
lea ecx, [esp + 0x18]
call fcn.0041da50
lea ecx, [esp + 0x14]
call fcn.0041dd1c
jmp 0x40814c
push 0x439344
lea ecx, [esp + 0x18]
call fcn.0041da50
mov edi, dword [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x40]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
test esi, esi
je 0x408185
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea ecx, [esp + 0x14]
mov dword [esp + 0x34], 0xffffffff
call fcn.0041d908
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
mov eax, ebx
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x28
ret 8