Function at 0x40c010
Capabilities:
Get common file path
Get file version info
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57737c
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x5daf20]
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 ebx, dword [ebp + 8]
mov dword [ebp - 4], 0
mov dword [ebp - 0x250], ebx
mov dword [ebp - 0x24c], 0
call fcn.00427841
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x40c074
push 0x80004005
call fcn.004017e0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x24c], 1
mov dword [ebp - 0x238], 0
call fcn.00427841
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x40c0b5
push 0x80004005
call fcn.004017e0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x21c], eax
push 0x104
lea eax, [ebp - 0x218]
push eax
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x22c]
call fcn.004050a0
push 0xd
push str.kernel32.dll
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 2
call fcn.00404c80
lea eax, [ebp - 0x230]
push eax
push dword [ebp - 0x22c]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
or esi, 0xffffffff
mov dword [ebp - 0x228], eax
test eax, eax
je 0x40c5ab
inc eax
push eax
call fcn.00548a85
add esp, 4
mov edi, eax
push edi
push dword [ebp - 0x228]
push dword [ebp - 0x230]
push dword [ebp - 0x22c]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x40c59e
push 0x18
push str.VarFileInfoTranslation
lea ecx, [ebp - 0x21c]
call fcn.00401610
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x238]
push eax
push dword [ebp - 0x21c]
push edi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x40c1e0
cmp dword [ebp - 0x230], 4
jne 0x40c1e0
push 4
push dword [ebp - 0x238]
lea eax, [ebp - 0x248]
push 4
push eax
call fcn.00547a19
mov ecx, dword [ebp - 0x248]
mov eax, ecx
shr eax, 0x10
and eax, 0xff
push eax
mov eax, ecx
shr eax, 0x18
push eax
movzx eax, cl
push eax
shr ecx, 8
and ecx, 0xff
push ecx
lea eax, [ebp - 0x21c]
push str.StringFileInfo_02X_02X_02X_02XFileVersion
push eax
call fcn.00405c70
add esp, 0x28
jmp 0x40c1fe
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
push eax
lea eax, [ebp - 0x21c]
push str.StringFileInfo_04X04B0FileVersion
push eax
call fcn.00405c70
add esp, 0xc
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x238]
push eax
push dword [ebp - 0x21c]
push edi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x40c59e
mov edx, dword [ebp - 0x238]
test edx, edx
jne 0x40c22f
xor ecx, ecx
jmp 0x40c253
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x228], eax
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c240
sub ecx, dword [ebp - 0x228]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x21c]
call fcn.00401610
lea eax, [ebp - 0x234]
push eax
push 0x5b0174
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x234], 0
call fcn.00419290
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x224]
push 0x5b017c
push eax
mov byte [ebp - 4], 3
call fcn.00404a00
push 0x5b0178
push eax
lea eax, [ebp - 0x220]
push eax
mov byte [ebp - 4], 4
call fcn.00404b80
add esp, 0x18
mov byte [ebp - 4], 5
mov eax, dword [eax]
mov ecx, ebx
push dword [eax - 0xc]
push eax
call fcn.00404c80
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c2f1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c314
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x234]
push eax
push 0x5b0174
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00419290
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x220]
push str._KernelMinorVersion___
push eax
mov byte [ebp - 4], 6
call fcn.00404a00
push 0x5b0178
push eax
lea eax, [ebp - 0x224]
push eax
mov byte [ebp - 4], 7
call fcn.00404b80
add esp, 0x18
mov byte [ebp - 4], 8
mov eax, dword [eax]
mov ecx, ebx
push dword [eax - 0xc]
push eax
call fcn.00404c80
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c39b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c3be
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x234]
push eax
push 0x5b0174
lea eax, [ebp - 0x240]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00419290
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x220]
push str._KernelBuildNum___
push eax
mov byte [ebp - 4], 9
call fcn.00404a00
push 0x5b0178
push eax
lea eax, [ebp - 0x224]
push eax
mov byte [ebp - 4], 0xa
call fcn.00404b80
add esp, 0x18
mov byte [ebp - 4], 0xb
mov eax, dword [eax]
mov ecx, ebx
push dword [eax - 0xc]
push eax
call fcn.00404c80
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c445
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c468
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x234]
push eax
push 0x5b001c
lea eax, [ebp - 0x244]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00419290
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x220]
push str._KernelReleaseNum___
push eax
mov byte [ebp - 4], 0xc
call fcn.00404a00
push 0x5b0178
push eax
lea eax, [ebp - 0x224]
push eax
mov byte [ebp - 4], 0xd
call fcn.00404b80
add esp, 0x18
mov byte [ebp - 4], 0xe
mov eax, dword [eax]
mov ecx, ebx
push dword [eax - 0xc]
push eax
call fcn.00404c80
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c4ef
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c512
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x244]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c535
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c558
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x23c]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c57b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x228]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c59e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x40c5ab
push edi
call fcn.00548bb7
add esp, 4
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x22c]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c5ce
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edi, dword [ebp - 0x21c]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x40c5ef
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
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.00547a0a
mov esp, ebp
pop ebp
ret 4