Function at 0x40ce00
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55aa16
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [0x5b4450]
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
xor ebx, ebx
push ebx
lea eax, [ebp - 0x124]
mov edi, edx
push str.Tool_GetFileVersion
push eax
mov esi, ecx
mov dword [ebp - 0x134], edi
call fcn.0040ac70
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push edx
push edi
push esi
push str.lpszFile___s__lpszVersion___s__dwVersionLen___d__bDriver___d
lea eax, [ebp - 0x124]
push 1
push eax
mov dword [ebp - 4], ebx
call fcn.0040aed0
add esp, 0x1c
lea ecx, [ebp - 0x130]
push ecx
push esi
mov dword [ebp - 0x130], ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov edi, eax
test edi, edi
jne 0x40cebc
push eax
push str.return___08x
push 2
lea edx, [ebp - 0x124]
push edx
call fcn.0040aed0
add esp, 0x10
lea ecx, [ebp - 0x124]
mov dword [ebp - 4], 0xffffffff
call fcn.0040ae50
xor eax, eax
jmp 0x40d0ec
lea eax, [edi + 0x64]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x128], eax
test eax, eax
jne 0x40cee3
push eax
push str.return___08x
push 2
lea ecx, [ebp - 0x124]
push ecx
jmp 0x40ce9b
push eax
push edi
push 0
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x40d0b4
mov edi, dword [ebp - 0x128]
mov esi, dword [sym.imp.VERSION.dll_VerQueryValueW]
lea edx, [ebp - 0x11c]
push edx
lea eax, [ebp - 0x114]
push eax
push str.VarFileInfoTranslation
push edi
call esi
cmp dword [ebp - 0x11c], 4
jne 0x40cf51
mov eax, dword [ebp - 0x114]
movzx ecx, byte [eax + 2]
movzx edx, byte [eax + 3]
push ecx
movzx ecx, byte [eax]
push edx
movzx edx, byte [eax + 1]
push ecx
push edx
lea eax, [ebp - 0x110]
push str.StringFileInfo_02x_02x_02x_02x_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
jmp 0x40cf63
push str.StringFileInfo040904e4_
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x58bf68
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x114]
push ecx
lea edx, [ebp - 0x110]
push edx
push edi
call esi
cmp dword [ebp - 0x11c], 0
je 0x40d0b4
cmp dword [ebp + 0xc], 1
jne 0x40cfcc
mov eax, dword [ebp - 0x114]
push 0x2e
push eax
call fcn.00534181
add esp, 8
test eax, eax
je 0x40cfcc
add eax, 2
push 0x2e
push eax
call fcn.00534181
add esp, 8
test eax, eax
je 0x40cfcc
xor ecx, ecx
mov word [eax], cx
lea ecx, [ebp - 0x118]
call fcn.004011e0
mov byte [ebp - 4], 1
mov edi, dword [ebp - 0x114]
mov eax, edi
xor esi, esi
lea edx, [eax + 2]
jmp 0x40cff0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cff0
sub eax, edx
sar eax, 1
je 0x40d053
mov bl, byte [edi + esi*2]
movzx edx, bl
push edx
mov byte [ebp - 0x12c], bl
call fcn.005363cc
add esp, 4
test eax, eax
jne 0x40d01f
cmp bl, 0x2e
jne 0x40d031
mov eax, dword [ebp - 0x12c]
push eax
lea edi, [ebp - 0x118]
call fcn.00413890
mov edi, dword [ebp - 0x114]
mov eax, edi
inc esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d040
sub eax, edx
sar eax, 1
cmp esi, eax
jb 0x40d001
mov esi, dword [ebp - 0x118]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x40d07b
push 0
lea ecx, [ebp - 0x118]
call fcn.00401760
mov esi, dword [ebp - 0x118]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x134]
push esi
push ecx
push edx
call fcn.00535afa
lea eax, [esi - 0x10]
add esp, 0xc
mov ebx, 1
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d0b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x128]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
push str.return___08x
lea edx, [ebp - 0x124]
push 2
push edx
call fcn.0040aed0
add esp, 0x10
lea ecx, [ebp - 0x124]
mov dword [ebp - 4], 0xffffffff
call fcn.0040ae50
mov eax, ebx
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.005337cb
mov esp, ebp
pop ebp
ret