Function at 0x10006940
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x214]
sub esp, 0x230
mov dword [esp + 8], 0x104
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
sub esp, 0xc
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.version.dll_GetFileVersionInfoSizeW]
sub esp, 8
test eax, eax
jne 0x100069c0
xor esi, esi
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
mov dword [esp + 4], 0x5c
call dword [sym.imp.ucrtbase.dll_wcsrchr]
lea edx, [eax + 2]
test eax, eax
cmovne ebx, edx
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll__wcsdup]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
mov edi, eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
test eax, eax
je 0x10006986
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.version.dll_GetFileVersionInfoW]
sub esp, 0x10
test eax, eax
je 0x10006988
lea eax, [ebp - 0x224]
mov dword [esp + 4], str.VarFileInfoTranslation
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x21c]
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [sym.imp.version.dll_VerQueryValueW]
sub esp, 0x10
test eax, eax
je 0x10006988
cmp dword [ebp - 0x224], 3
jbe 0x10006988
call dword [sym.imp.kernel32.dll_GetThreadLocale]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x224]
mov ecx, eax
shr ecx, 2
je 0x10006988
mov dword [ebp - 0x22c], esi
xor edi, edi
mov esi, eax
jmp 0x10006a6c
mov eax, esi
add edi, 1
shr eax, 2
cmp eax, edi
jbe 0x10006ab8
mov eax, dword [ebp - 0x21c]
lea eax, [eax + edi*4]
movzx ecx, word [eax]
mov edx, ecx
cmp ecx, dword [ebp - 0x228]
jne 0x10006a60
movzx ecx, word [eax + 2]
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
lea eax, [ebp - 0x218]
mov dword [esp], eax
mov eax, dword [ebp - 0x22c]
call sym._query_productname.isra.0
test eax, eax
jne 0x10006b98
mov esi, dword [ebp - 0x224]
jmp 0x10006a60
mov ecx, esi
mov esi, dword [ebp - 0x22c]
test eax, eax
je 0x10006988
xor edi, edi
mov esi, ecx
jmp 0x10006adc
mov eax, esi
add edi, 1
shr eax, 2
cmp eax, edi
jbe 0x10006b30
mov eax, dword [ebp - 0x21c]
movzx ecx, word [ebp - 0x228]
lea eax, [eax + edi*4]
movzx edx, word [eax]
xor ecx, edx
test cx, 0x3ff
jne 0x10006ad0
movzx ecx, word [eax + 2]
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
lea eax, [ebp - 0x218]
mov dword [esp], eax
mov eax, dword [ebp - 0x22c]
call sym._query_productname.isra.0
test eax, eax
jne 0x10006b98
mov esi, dword [ebp - 0x224]
jmp 0x10006ad0
mov ecx, esi
mov esi, dword [ebp - 0x22c]
test eax, eax
je 0x10006988
xor edi, edi
jmp 0x10006b54
mov eax, ecx
add edi, 1
shr eax, 2
cmp eax, edi
jbe 0x10006bd0
mov eax, dword [ebp - 0x21c]
lea eax, [eax + edi*4]
movzx edx, word [eax]
test dx, 0x3ff
jne 0x10006b48
movzx ecx, word [eax + 2]
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
lea eax, [ebp - 0x218]
mov dword [esp], eax
mov eax, esi
call sym._query_productname.isra.0
test eax, eax
jne 0x10006b9e
mov ecx, dword [ebp - 0x224]
jmp 0x10006b48
mov esi, dword [ebp - 0x22c]
mov eax, dword [ebp - 0x218]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [esp], esi
mov dword [ebp - 0x228], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x228]
jmp 0x100069b3
test eax, eax
je 0x10006988
xor edi, edi
jmp 0x10006bf4
mov eax, dword [ebp - 0x224]
add edi, 1
shr eax, 2
cmp eax, edi
jbe 0x10006988
mov eax, dword [ebp - 0x21c]
lea edx, [ebp - 0x220]
lea eax, [eax + edi*4]
movzx ecx, word [eax + 2]
mov dword [esp + 4], edx
lea edx, [ebp - 0x218]
mov dword [esp], edx
movzx edx, word [eax]
mov eax, esi
call sym._query_productname.isra.0
test eax, eax
je 0x10006be0
jmp 0x10006b9e