Function at 0x4157c0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x563d06
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [0x5c0490]
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 - 0x128]
mov edi, edx
push str.Tool_GetFileVersion
push eax
mov esi, ecx
mov dword [ebp - 0x134], edi
call fcn.00401190
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 - 0x128]
push 1
push eax
mov dword [ebp - 4], ebx
call fcn.00401410
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 0x41587c
push eax
push str.return___08x
push 2
lea edx, [ebp - 0x128]
push edx
call fcn.00401410
add esp, 0x10
lea ecx, [ebp - 0x128]
mov dword [ebp - 4], 0xffffffff
call fcn.00401370
xor eax, eax
jmp 0x415acc
lea eax, [edi + 0x64]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x120], eax
test eax, eax
jne 0x4158a3
push eax
push str.return___08x
push 2
lea ecx, [ebp - 0x128]
push ecx
jmp 0x41585b
push eax
push edi
push 0
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x415a94
xor edi, edi
push pe_nt_image_headers32
lea edx, [ebp - 0x110]
push edi
push edx
mov dword [ebp - 0x114], edi
mov dword [ebp - 0x118], edi
call fcn.00541d20
mov edx, dword [ebp - 0x120]
mov esi, dword [sym.imp.VERSION.dll_VerQueryValueW]
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x114]
push ecx
push str.VarFileInfoTranslation
push edx
call esi
cmp dword [ebp - 0x118], 4
jne 0x415934
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 0x415946
push str.StringFileInfo040904e4_
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x596d70
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x118]
push eax
mov eax, dword [ebp - 0x120]
lea ecx, [ebp - 0x114]
push ecx
lea edx, [ebp - 0x110]
push edx
push eax
call esi
cmp dword [ebp - 0x118], edi
je 0x415a94
cmp dword [ebp + 0xc], 1
jne 0x4159b4
mov ecx, dword [ebp - 0x114]
push 0x2e
push ecx
call fcn.0053d8a3
add esp, 8
cmp eax, edi
je 0x4159b4
add eax, 2
push 0x2e
push eax
call fcn.0053d8a3
add esp, 8
cmp eax, edi
je 0x4159b4
xor edx, edx
mov word [eax], dx
lea ecx, [ebp - 0x11c]
call fcn.00406370
mov byte [ebp - 4], 1
mov edi, dword [ebp - 0x114]
mov eax, edi
xor esi, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4159d0
sub eax, edx
sar eax, 1
je 0x415a33
mov bl, byte [edi + esi*2]
movzx eax, bl
push eax
mov byte [ebp - 0x12c], bl
call fcn.0053f7a7
add esp, 4
test eax, eax
jne 0x4159ff
cmp bl, 0x2e
jne 0x415a11
mov ecx, dword [ebp - 0x12c]
push ecx
lea edi, [ebp - 0x11c]
call fcn.0041c570
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 0x415a20
sub eax, edx
sar eax, 1
cmp esi, eax
jb 0x4159e1
mov esi, dword [ebp - 0x11c]
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x415a5b
push 0
lea ecx, [ebp - 0x11c]
call fcn.00405520
mov esi, dword [ebp - 0x11c]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x134]
push esi
push edx
push eax
call fcn.0053e407
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 0x415a94
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
push str.return___08x
lea edx, [ebp - 0x128]
push 2
push edx
call fcn.00401410
add esp, 0x10
lea ecx, [ebp - 0x128]
mov dword [ebp - 4], 0xffffffff
call fcn.00401370
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.0053ca73
mov esp, ebp
pop ebp
ret