Function at 0x401330
Capabilities:
Get file version info

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x294
lea eax, [esp + 0x94]
push ebp
push esi
push edi
push 0x1ff
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x1c]
lea eax, [esp + 0xa0]
push edx
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
test esi, esi
jne 0x401373
pop edi
pop esi
pop ebp
add esp, 0x294
ret
push esi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
mov dword [esp + 0x20], edi
jne 0x401390
pop edi
pop esi
pop ebp
add esp, 0x294
ret
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esp + 0x1c]
mov ebp, eax
push ebp
push esi
lea edx, [esp + 0xa8]
push ecx
push edx
call sub.VERSION.dll_GetFileVersionInfoA
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0x4110c0
push ebp
call sub.VERSION.dll_VerQueryValueA
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2a8]
mov eax, dword [edx + 0x14]
lea edx, [esp + 0x10]
mov dword [ecx], eax
lea eax, [esp + 0xc]
push edx
push eax
push str.VarFileInfoTranslation
push ebp
mov dword [esp + 0x1c], 0
call sub.VERSION.dll_VerQueryValueA
mov eax, dword [esp + 0xc]
test eax, eax
je 0x401521
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
xor ecx, ecx
mov cx, word [eax]
lea edx, [esp + 0x24]
push ecx
push str._04x
push edx
call esi
mov ecx, dword [esp + 0x18]
xor eax, eax
add esp, 0xc
lea edx, [esp + 0x30]
mov ax, word [ecx + 2]
push eax
push str._04x
push edx
call esi
or ecx, 0xffffffff
mov edi, str.StringFileInfo_
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x3c]
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x24]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x3c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x3c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x411078
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x14], eax
and ecx, 3
lea eax, [esp + 0x10]
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x40]
push ecx
push edx
push ebp
call sub.VERSION.dll_VerQueryValueA
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x2b0]
mov edi, dword [esp + 0x2ac]
test eax, eax
je 0x401518
lea ecx, [esi - 1]
push ecx
push eax
push edi
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov byte [esi + edi - 1], 0
mov edi, dword [esp + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x294
ret