Function at 0x504120
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x510798
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x56f8f4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x14], 0x53647c
push 0
mov eax, dword [ebp - 0x14]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jbe 0x504325
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0043014d
add esp, 4
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
push 0
mov edx, dword [ebp - 0x14]
push edx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x504313
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x18]
push ecx
push 0x536498
mov edx, dword [ebp - 0x20]
push edx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x504313
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
shr ecx, 0x10
and ecx, 0xffff
movzx edx, cx
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
and ecx, 0xffff
movzx edx, cx
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x28], 5
jne 0x504221
cmp dword [ebp - 0x24], 0
jle 0x504221
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.00506c40
add esp, 8
mov ecx, dword [ebp - 0x70]
or ecx, 1
mov dword [ebp - 0x70], ecx
mov eax, dword [ebp + 8]
jmp 0x50433f
cmp dword [ebp - 0x28], 6
jne 0x5042f1
cmp dword [ebp - 0x24], 2
jge 0x504260
push 1
lea edx, [ebp - 0x4c]
push edx
call fcn.00506c40
add esp, 8
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x7c], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x70]
or ecx, 2
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x7c]
mov dword [ebp - 0x80], edx
jmp 0x504299
push 2
lea eax, [ebp - 0x68]
push eax
call fcn.00506c40
add esp, 8
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x88], ecx
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x70]
or edx, 4
mov dword [ebp - 0x70], edx
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
push edx
mov ecx, dword [ebp + 8]
call fcn.00403d30
mov eax, dword [ebp - 0x70]
or eax, 1
mov dword [ebp - 0x70], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x70]
and ecx, 4
je 0x5042cf
and dword [ebp - 0x70], 0xfffffffb
lea ecx, [ebp - 0x68]
call fcn.00403d70
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x70]
and edx, 2
je 0x5042ea
and dword [ebp - 0x70], 0xfffffffd
lea ecx, [ebp - 0x4c]
call fcn.00403d70
mov eax, dword [ebp + 8]
jmp 0x50433f
cmp dword [ebp - 0x28], 0xa
jne 0x504313
push 3
mov eax, dword [ebp + 8]
push eax
call fcn.00506c40
add esp, 8
mov ecx, dword [ebp - 0x70]
or ecx, 1
mov dword [ebp - 0x70], ecx
mov eax, dword [ebp + 8]
jmp 0x50433f
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x6c]
push eax
call fcn.004c3a96
add esp, 4
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.00506c40
add esp, 8
mov edx, dword [ebp - 0x70]
or edx, 1
mov dword [ebp - 0x70], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4