Function at 0x10059971
Capabilities:
Get common file path
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x340
push edi
mov byte [ebp - 0x334], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x333]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x114], 0
mov ecx, 0x44
xor eax, eax
lea edi, [ebp - 0x113]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
mov byte [ebp - 0x224], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x223]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x9c
push 0
mov eax, dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [ecx], 0x9c
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [ebp - 0x338], eax
cmp dword [ebp - 0x338], 0
jne 0x10059a2b
mov eax, dword [ebp + 8]
mov dword [eax], 0x94
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x10059a2b
xor eax, eax
jmp 0x10059bdc
push 0x104
lea edx, [ebp - 0x334]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x1013c780
lea eax, [ebp - 0x334]
push eax
push 0x1013c790
push 0x111
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea edx, [ebp - 0x120]
push edx
lea eax, [ebp - 0x114]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
jbe 0x10059a9a
mov ecx, dword [ebp - 0x22c]
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0
je 0x10059ba9
mov edx, dword [ebp - 0x228]
push edx
mov eax, dword [ebp - 0x22c]
push eax
push 0
lea ecx, [ebp - 0x114]
push ecx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x10059ba9
mov word [ebp - 0x230], 0x409
mov word [ebp - 0x22e], 0x4b0
lea edx, [ebp - 0x33c]
push edx
lea eax, [ebp - 0x118]
push eax
push 0x1013c798
mov ecx, dword [ebp - 0x228]
push ecx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x10059b17
cmp dword [ebp - 0x33c], 4
jb 0x10059b17
mov edx, dword [ebp - 0x118]
mov eax, dword [edx]
mov dword [ebp - 0x230], eax
mov ecx, dword [ebp - 0x22e]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x230]
and edx, 0xffff
push edx
push str.StringFileInfo_04x_04xFileVersion
push 0x103
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea ecx, [ebp - 0x33c]
push ecx
lea edx, [ebp - 0x118]
push edx
lea eax, [ebp - 0x224]
push eax
mov ecx, dword [ebp - 0x228]
push ecx
call sub.VERSION.dll_VerQueryValueA
mov edx, dword [ebp - 0x118]
movsx eax, byte [edx]
sub eax, 0x30
mov dword [ebp - 0x11c], eax
mov ecx, dword [ebp - 0x118]
movsx edx, byte [ecx + 2]
sub edx, 0x30
mov dword [ebp - 0x340], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x11c]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x340]
mov dword [edx + 8], eax
cmp dword [ebp - 0x228], 0
je 0x10059bd7
mov ecx, dword [ebp - 0x22c]
push ecx
push 0
mov edx, dword [ebp - 0x228]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret