Function at 0x405040
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41ab96
mov eax, dword fs:[0]
push eax
sub esp, 0x150
mov eax, dword [0x422084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 0x154], edi
xor eax, eax
mov esi, ecx
mov dword [ebp - 0x118], 7
mov dword [ebp - 0x11c], edi
mov word [ebp - 0x12c], ax
mov dword [ebp - 4], edi
cmp dword [esi + 0x14], 8
jb 0x40509d
mov eax, dword [esi]
jmp 0x40509f
mov eax, esi
push edi
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
xor ecx, ecx
mov dword [ebp - 0x14c], eax
cmp eax, edi
ja 0x4050e6
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x14], 7
lea edi, [ebp - 0x12c]
mov esi, ebx
mov word [ebx], cx
call fcn.00406320
cmp dword [ebp - 0x118], 8
jb 0x4052a6
mov edx, dword [ebp - 0x12c]
push edx
jmp 0x40529e
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040b16c
mov edi, eax
mov eax, dword [ebp - 0x14c]
lea ecx, [eax + eax + 2]
push ecx
push 0
push edi
call fcn.004107d0
add esp, 0x10
cmp dword [esi + 0x14], 8
jb 0x40511d
mov eax, dword [esi]
jmp 0x40511f
mov eax, esi
mov edx, dword [ebp - 0x14c]
push edi
push edx
xor esi, esi
push esi
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
cmp eax, 1
je 0x405174
push edi
call fcn.0040bb97
mov dword [ebx + 0x10], esi
xor eax, eax
mov dword [ebx + 0x14], 7
add esp, 4
lea edi, [ebp - 0x12c]
mov esi, ebx
mov word [ebx], ax
call fcn.00406320
cmp dword [ebp - 0x118], 8
jb 0x4052a6
mov ecx, dword [ebp - 0x12c]
push ecx
jmp 0x40529e
lea edx, [ebp - 0x15c]
push edx
lea eax, [ebp - 0x158]
push eax
push str.VarFileInfoTranslation
mov dword [ebp - 0x15c], esi
mov esi, dword [sym.imp.VERSION.dll_VerQueryValueW]
push edi
call esi
cmp eax, 1
jne 0x405265
mov eax, dword [ebp - 0x158]
test eax, eax
je 0x405265
movzx ecx, word [eax + 2]
movzx edx, word [eax]
push ecx
push edx
lea eax, [ebp - 0x110]
push str.StringFileInfo_04x_04xFileVersion
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x110]
lea ecx, [ebp - 0x148]
call fcn.00406dd0
xor eax, eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x134], 8
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x154], eax
mov eax, dword [ebp - 0x148]
jae 0x405203
lea eax, [ebp - 0x148]
lea ecx, [ebp - 0x154]
push ecx
lea edx, [ebp - 0x150]
push edx
push eax
push edi
call esi
cmp eax, 1
jne 0x40523b
mov eax, dword [ebp - 0x150]
test eax, eax
je 0x40523b
lea ecx, [ebp - 0x12c]
push ecx
call fcn.00406240
lea esi, [ebp - 0x12c]
call fcn.004052d0
push edi
call fcn.0040bb97
add esp, 4
lea edi, [ebp - 0x12c]
mov eax, ebx
call fcn.00406220
lea esi, [ebp - 0x148]
call fcn.004068a0
mov esi, edi
call fcn.004068a0
jmp 0x4052a6
push edi
call fcn.0040bb97
xor edx, edx
mov dword [ebx + 0x14], 7
mov dword [ebx + 0x10], 0
add esp, 4
lea edi, [ebp - 0x12c]
mov esi, ebx
mov word [ebx], dx
call fcn.00406320
cmp dword [ebp - 0x118], 8
jb 0x4052a6
mov eax, dword [ebp - 0x12c]
push eax
call fcn.0040b23d
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040b177
mov esp, ebp
pop ebp
ret