Function at 0x4045a0
Capabilities:
Get file version info
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416778
push 0x407eec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xfffffdb8
mov eax, dword [0x41b2c0]
mov dword [ebp - 0x30], eax
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x28], 1
mov byte [ebp - 0x250], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x24f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x20], 0
push 0x104
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x138]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edx, [ebp - 0x138]
mov dword [ebp - 0x1c], edx
push 0
lea eax, [ebp - 0x144]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00407800
add esp, 4
push eax
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [ebp - 0x144]
push ecx
push 0x4163b0
call fcn.00407800
add esp, 4
push eax
push 0x4163b4
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x144]
push eax
push 2
push 0x4163b8
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00408378
add esp, 4
mov dword [ebp - 4], 0
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x250]
push ecx
push 0x104
push 0
mov edx, dword [ebp - 0x1c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x258], 0
jne 0x4046ce
push 0
push 0
push 0
push 0xe0000101
call dword [sym.imp.KERNEL32.dll_RaiseException]
lea eax, [ebp - 0x140]
push eax
lea ecx, [ebp - 0x250]
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 0
jne 0x404701
push 0
push 0
push 0
push 0xe0000101
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov edx, dword [ebp - 0x254]
push edx
push 1
call fcn.004082b8
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x40472c
push 0
push 0
push 0
push 0xe0000001
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x254]
push ecx
mov edx, dword [ebp - 0x20]
push edx
lea eax, [ebp - 0x250]
push eax
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40475c
push 0
push 0
push 0
push 0xe0000101
call dword [sym.imp.KERNEL32.dll_RaiseException]
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x13c]
push edx
push str.StringFileInfo040904E4ProductVersion
mov eax, dword [ebp - 0x2c]
push eax
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x40478a
push 0
push 0
push 0
push 0xe0000101
call dword [sym.imp.KERNEL32.dll_RaiseException]
push 0
lea ecx, [ebp - 0x144]
push ecx
mov edx, dword [ebp - 0x13c]
push edx
call fcn.00407800
add esp, 4
push eax
mov eax, dword [ebp - 0x13c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 0x144]
push edx
push 2
push 0x4163e4
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], 0xffffffff
jmp 0x4047ee
cmp dword [ebp - 0x28], 0
jne 0x404834
push 0
lea ecx, [ebp - 0x144]
push ecx
push 0x4163e8
call fcn.00407800
add esp, 4
push eax
push 0x4163ec
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x144]
push eax
push 2
push 0x4163f0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x2c], 0
je 0x40484d
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00408242
add esp, 4
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x30]
call fcn.00407d96
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret