Function at 0x40d8c0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52d6e8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x57a438]
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
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x24]
mov ebx, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x28], ebx
push dword [edi]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x24], 0
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov esi, eax
test esi, esi
je 0x40db1b
push esi
call fcn.004acc39
add esp, 4
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x40db1b
push eax
push esi
push dword [ebp - 0x24]
push dword [edi]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x40db10
cmp dword [0x57c0c4], 0
je 0x40d9d4
push str.ntdll.dll
mov dword [ebp - 0x18], 0
xor edi, edi
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x40d9ca
push str.RtlGetNtVersionNumbers
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40d9a0
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x18]
push ecx
call eax
movzx eax, word [ebp - 0x14]
mov edi, 1
mov dword [ebp - 0x14], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
je 0x40d9ca
mov eax, dword [ebp - 0x18]
cmp eax, 6
jne 0x40d9bb
cmp dword [ebp - 0x1c], 4
je 0x40d9c0
jmp 0x40d9ca
cmp eax, 0xa
jb 0x40d9ca
mov dword [0x587bec], 1
mov dword [0x57c0c4], 0
cmp dword [0x587bec], 0
mov esi, dword [sym.imp.VERSION.dll_VerQueryValueW]
je 0x40dac0
call fcn.0040d740
test eax, eax
jne 0x40dac0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x30]
push eax
push str.VarFileInfoTranslation
push dword [ebp - 0x3c]
call esi
test eax, eax
je 0x40dac0
xor edi, edi
test dword [ebp - 0x14], 0xfffffffc
jbe 0x40dac0
call fcn.00407b40
mov ecx, eax
test ecx, ecx
je 0x40dca3
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x30]
lea ecx, [eax + edi*4]
movzx eax, word [ecx + 2]
push eax
movzx eax, word [ecx]
push eax
lea eax, [ebp - 0x1c]
push str.StringFileInfo_04x_04xFileVersion
push eax
call fcn.00407210
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
add esp, 0x10
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x2c]
push eax
push esi
push dword [ebp - 0x3c]
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x40db3a
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40daab
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x14]
inc edi
shr eax, 2
cmp edi, eax
jb 0x40da20
mov esi, dword [sym.imp.VERSION.dll_VerQueryValueW]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x28], 0
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x20], 0
push eax
push 0x560050
push dword [ebp - 0x3c]
call esi
test eax, eax
je 0x40db10
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 ebx
call fcn.00407210
add esp, 0x18
mov dword [ebp - 0x34], 1
push dword [ebp - 0x3c]
call fcn.004acc34
add esp, 4
mov eax, dword [ebp - 0x34]
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.004ac694
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x18]
mov ecx, ebx
push dword [ebp - 0x2c]
call fcn.00406d90
mov edx, dword [ebx]
xor cl, cl
xor eax, eax
mov dword [ebp - 0x34], 1
mov edi, dword [edx - 0xc]
test edi, edi
jle 0x40dbdb
nop
lea ebx, [eax + eax]
cmp word [ebx + edx], 0x2c
jne 0x40dba8
test cl, cl
jne 0x40db9f
mov byte [ebp - 0x35], 1
test edi, edi
js 0x40dcad
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x34]
mov edx, dword [eax]
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, edi
or eax, ecx
jge 0x40db9c
mov ecx, dword [ebp - 0x28]
push edi
call fcn.00407170
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
mov cl, byte [ebp - 0x35]
mov eax, 0x2e
mov word [ebx + edx], ax
lea eax, [ebx + 2]
sar eax, 1
cmp eax, edi
jl 0x40db60
test cl, cl
je 0x40dbd8
test edi, edi
js 0x40dcad
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
jg 0x40dcad
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebx]
mov word [eax + edi*2], cx
jmp 0x40dbdb
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebx]
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x20], edi
test edi, edi
js 0x40dcad
mov edx, dword [ebp - 0x34]
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, edi
or ecx, edx
jge 0x40dc04
push edi
mov ecx, ebx
call fcn.00407170
mov eax, dword [ebx]
lea ecx, [eax + edi*2]
mov edx, eax
mov dword [ebp - 0x34], ecx
cmp eax, ecx
jae 0x40dc4f
mov ebx, ecx
cmp word [eax], 0x20
lea ecx, [eax + 2]
mov dword [ebp - 0x40], ecx
je 0x40dc43
lea ebx, [edx + 2]
xor edi, edi
cmp edx, ebx
je 0x40dc40
cmp edi, 1
jae 0x40dc3d
mov cx, word [eax]
inc edi
mov word [edx], cx
add eax, 2
add edx, 2
cmp edx, ebx
jne 0x40dc27
mov ecx, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x34]
mov eax, ecx
cmp ecx, ebx
jb 0x40dc12
mov ebx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x20]
sub eax, edx
xor ecx, ecx
sar eax, 1
sub edi, eax
mov word [edx], cx
js 0x40dcad
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
jg 0x40dcad
mov dword [eax - 0xc], edi
add esi, 0xfffffff0
mov eax, dword [ebx]
mov dword [ebp - 0x34], 1
mov dword [ebp - 4], 0xffffffff
mov word [eax + edi*2], cx
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40dc92
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
jne 0x40db10
jmp 0x40daba
push 0x80004005
call fcn.00407c80
push 0x80070057
call fcn.00407c80
int3