Function at 0x40f520
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4da428
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push esi
push edi
mov eax, dword [0x5194b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
push dword [edi]
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0x40f96f
push esi
call fcn.0046964c
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40f96f
push eax
push esi
push dword [ebp - 0x20]
push dword [edi]
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x40f963
cmp dword [0x518004], 0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x40f633
push str.ntdll.dll
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x24], 0
mov dword [ebp + 8], 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x40f629
push str.RtlGetNtVersionNumbers
push esi
call edi
test eax, eax
je 0x40f5fd
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x14]
push ecx
call eax
movzx eax, word [ebp + 8]
mov dword [ebp + 8], eax
mov dword [ebp - 0x18], 1
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x18], 0
je 0x40f629
mov eax, dword [ebp - 0x14]
cmp eax, 6
jne 0x40f61a
cmp dword [ebp - 0x24], 4
je 0x40f61f
jmp 0x40f629
cmp eax, 0xa
jb 0x40f629
mov dword [0x51bdf0], 1
mov dword [0x518004], 0
cmp dword [0x51bdf0], 0
je 0x40f90a
cmp dword [section..data], 0
je 0x40f702
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.GetNativeSystemInfo
push str.kernel32.dll
call esi
push eax
call edi
test eax, eax
je 0x40f6f8
xorps xmm0, xmm0
mov dword [ebp - 0x34], 0
lea ecx, [ebp - 0x54]
push ecx
movups xmmword [ebp - 0x54], xmm0
movups xmmword [ebp - 0x44], xmm0
call eax
mov ax, word [ebp - 0x54]
cmp ax, 9
je 0x40f6ee
cmp ax, 6
je 0x40f6ee
cmp ax, 0xc
je 0x40f6ee
push str.IsWow64Process2
push 0x4ea724
mov dword [ebp - 0x24], 0
mov dword [ebp + 8], 0
call esi
push eax
call edi
mov esi, eax
test esi, esi
je 0x40f6e5
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x40f6e5
xor eax, eax
mov ecx, 0xaa64
cmp word [ebp + 8], cx
sete al
mov dword [0x51bdec], eax
jmp 0x40f6f8
xor eax, eax
mov dword [0x51bdec], eax
jmp 0x40f6f8
mov dword [0x51bdec], 1
mov dword [section..data], 0
cmp dword [0x51bdec], 0
mov edi, dword [ebp - 0x10]
jne 0x40f90d
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x2c]
push eax
push str.VarFileInfoTranslation
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40f90d
xor esi, esi
test dword [ebp - 0x18], 0xfffffffc
jbe 0x40f90d
lea ecx, [ebp - 0x14]
call fcn.0040ec00
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 4], 0
lea ecx, [eax + esi*4]
movzx eax, word [ecx + 2]
push eax
movzx eax, word [ecx]
push eax
lea eax, [ebp - 0x14]
push str.StringFileInfo_04x_04xFileVersion
push eax
call fcn.0040f370
add esp, 0x10
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x14]
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
jne 0x40f7b4
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.0040ef50
mov eax, dword [ebp - 0x18]
inc esi
shr eax, 2
cmp esi, eax
jb 0x40f743
jmp 0x40f90d
push dword [ebp - 0x24]
mov ecx, dword [ebp + 0xc]
push dword [ebp - 0x28]
call fcn.00410390
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov byte [ebp + 0xb], 0
mov edx, dword [ecx]
mov esi, dword [edx - 0xc]
test esi, esi
jle 0x40f847
lea edi, [eax + eax]
cmp word [edi + edx], 0x2c
jne 0x40f81a
cmp byte [ebp + 0xb], 0
jne 0x40f811
mov byte [ebp + 0xb], 1
test esi, esi
js 0x40f983
mov edx, dword [ecx]
mov ecx, 1
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
mov ecx, dword [ebp + 0xc]
jge 0x40f811
push esi
call fcn.00410250
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov eax, 0x2e
mov word [edi + edx], ax
lea eax, [edi + 2]
sar eax, 1
cmp eax, esi
jl 0x40f7d4
cmp byte [ebp + 0xb], 0
je 0x40f847
test esi, esi
js 0x40f983
mov eax, dword [ecx]
cmp esi, dword [eax - 8]
jg 0x40f983
mov dword [eax - 0xc], esi
xor edx, edx
mov eax, dword [ecx]
mov word [eax + esi*2], dx
mov ecx, dword [ecx]
mov edi, dword [ecx - 0xc]
mov dword [ebp - 0x30], edi
test edi, edi
js 0x40f983
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
sub eax, edi
or eax, edx
jge 0x40f875
mov esi, dword [ebp + 0xc]
mov ecx, esi
push edi
call fcn.00410250
mov ecx, dword [esi]
lea eax, [ecx + edi*2]
mov edx, ecx
mov dword [ebp + 8], eax
cmp ecx, eax
jae 0x40f8bd
mov esi, eax
cmp word [ecx], 0x20
lea eax, [ecx + 2]
mov dword [ebp - 0x1c], eax
je 0x40f8b4
lea edi, [edx + 2]
xor esi, esi
cmp edx, edi
je 0x40f8b1
cmp esi, 1
jae 0x40f8ae
mov ax, word [ecx]
inc esi
mov word [edx], ax
add ecx, 2
add edx, 2
cmp edx, edi
jne 0x40f898
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp + 8]
mov ecx, eax
cmp eax, esi
jb 0x40f883
mov edi, dword [ebp - 0x30]
sub ecx, edx
xor eax, eax
sar ecx, 1
sub edi, ecx
mov word [edx], ax
js 0x40f983
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x40f983
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [esi]
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0xffffffff
mov word [eax + edi*2], cx
lea ecx, [ebp - 0x14]
call fcn.0040ef50
mov eax, dword [esi]
mov edi, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jne 0x40f966
jmp 0x40f910
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x28], 0
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x30], 0
push eax
push 0x4ea6dc
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40f966
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
push str._d._d._d._d
push esi
call fcn.0040f370
add esp, 0x18
mov dword [ebp - 0x1c], 1
jmp 0x40f966
mov edi, dword [ebp - 0x10]
push edi
call fcn.00469655
add esp, 4
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.0040f1b0
int3