Function at 0x40a510
Capabilities:
Get file version info
Resolve function by parsing pe exports
Write file on windows

Disassembly:
jmp 0x40a510
push 0xffffffffffffffff
push 0x4987d6
mov eax, dword fs:[0]
push eax
sub esp, 0x168
mov eax, dword [0x4c6dd4]
xor eax, esp
mov dword [esp + 0x164], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c6dd4]
xor eax, esp
push eax
lea eax, [esp + 0x17c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x190]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x28], ebp
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
xor ebx, ebx
push 0x4a310a
mov dword [esp + 0x18c], ebx
call fcn.004012d5
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push str..FileToEmail.cpp
mov byte [esp + 0x190], 1
call fcn.004012d5
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push str.CreateVerFile
mov byte [esp + 0x194], 2
call fcn.004012d5
lea ecx, [esp + 0x54]
mov byte [esp + 0x190], bl
call fcn.0040130c
push 0x4a36ec
lea ecx, [esp + 0x24]
mov byte [esp + 0x188], 3
call fcn.004012d5
mov esi, dword [esp + 0x18c]
push str.HpVerInfo
push esi
push str._s_s.txt
push ebp
mov byte [esp + 0x194], 4
call fcn.0040105f
add esp, 0x10
lea ecx, [esp + 0x5c]
call fcn.00419801
mov eax, dword [ebp]
push ebx
push eax
lea ecx, [esp + 0x64]
mov byte [esp + 0x18c], 5
call fcn.0041988d
test eax, eax
je 0x40a64d
mov eax, dword [esp + 0x20]
push eax
push str.HpVerInfo
push esi
push str._s_s_s.txt
push ebp
call fcn.0040105f
add esp, 0x14
push 1
push 0x4a36ec
lea ecx, [esp + 0x28]
call fcn.004010ff
mov eax, dword [ebp]
push ebx
push eax
lea ecx, [esp + 0x64]
call fcn.0041988d
test eax, eax
jne 0x40a612
xor edi, edi
call fcn.004141fe
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40a669
push 0x80004005
call fcn.004013ed
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
mov byte [esp + 0x184], 6
call fcn.004141fe
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40a69b
push 0x80004005
call fcn.004013ed
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
mov byte [esp + 0x184], 7
add edi, 1
push edi
lea ecx, [esp + 0x28]
push 0x4a36b0
push ecx
mov dword [esp + 0x3c], edi
call fcn.0040105f
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x40]
add esp, 0xc
push str.ERROR
push edx
push str.Version
lea eax, [esp + 0x50]
push eax
call fcn.00419143
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
mov byte [esp + 0x184], 8
je 0x40a749
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40a73b
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40a73b
push eax
call fcn.00401140
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40a72e
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x28]
jmp 0x40a749
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401032
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov byte [esp + 0x184], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a771
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
call fcn.0040115e
lea ecx, [esp + 0x14]
call fcn.004012f8
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x38]
call fcn.004012d0
mov esi, dword [esp + 0x14]
push str.ERROR
push esi
call fcn.00451abe
add esp, 8
test eax, eax
setne al
test al, al
je 0x40a9f4
cmp dword [esi - 0xc], 0
je 0x40a9f4
test ebx, ebx
jne 0x40a7e2
mov eax, dword [ebp]
push ebx
push 0x80
push 1
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40aa18
call fcn.004141fe
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40a65f
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
push esi
lea ecx, [esp + 0x20]
push str._r_n_s
push ecx
mov byte [esp + 0x190], 9
call fcn.0040105f
mov eax, dword [esp + 0x28]
mov ecx, dword [eax - 0xc]
add esp, 0xc
push 0
lea edx, [esp + 0x40]
push edx
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a856
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Trouble_writing_strFileToCheck_string
call fcn.004012d5
lea ecx, [esp + 0x4c]
call fcn.00401253
call fcn.004141fe
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40a65f
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea edx, [esp + 0x74]
mov byte [esp + 0x184], 0xa
mov dword [esp + 0x2c], 0
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [eax + edx], cl
add eax, 1
test cl, cl
jne 0x40a892
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x78]
push edx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
jne 0x40a8c8
push 0x32
push str.No_version_info_available__GetFileVersionInfoSize_
lea ecx, [esp + 0x20]
call fcn.00401032
jmp 0x40a95c
push edi
call fcn.004121b7
add esp, 4
mov ebp, eax
push ebp
push edi
push 0
lea eax, [esp + 0x80]
push eax
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40a8fa
push 0x2e
push str.No_version_info_available__GetFileVersionInfo_
lea ecx, [esp + 0x20]
call fcn.00401032
jmp 0x40a94f
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0x4a33c8
push ebp
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x40a925
push 0x29
push str.No_version_info_available__VerQueryValue_
lea ecx, [esp + 0x20]
call fcn.00401032
jmp 0x40a94f
mov eax, dword [esp + 0x38]
movzx ecx, word [eax + 0xc]
movzx edx, word [eax + 0xe]
push ecx
movzx ecx, word [eax + 8]
push edx
movzx edx, word [eax + 0xa]
push ecx
push edx
lea eax, [esp + 0x28]
push str._Version__u._u._u._u
push eax
call fcn.0040105f
add esp, 0x18
test ebp, ebp
je 0x40a95c
push ebp
call fcn.004121bc
add esp, 4
mov ebp, dword [esp + 0x18]
push ebp
lea ecx, [esp + 0x20]
push str._r_n_t_s
push ecx
call fcn.0040105f
mov edi, dword [esp + 0x28]
mov eax, dword [edi - 0xc]
add esp, 0xc
push 0
lea edx, [esp + 0x40]
push edx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a9a8
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push str.Trouble_writing_strFileVersion_string
call fcn.004012d5
lea ecx, [esp + 0x4c]
call fcn.00401253
lea eax, [ebp - 0x10]
mov byte [esp + 0x184], 9
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a9cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x184], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a9f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x28]
push str.ERROR
push esi
call fcn.00451abe
add esp, 8
test eax, eax
setne al
test al, al
je 0x40aaff
mov edi, dword [esp + 0x30]
jmp 0x40a6b3
push 0xffffffffffffffff
push ecx
mov ecx, esp
mov dword [esp + 0x48], esp
push str.Ver_info_file_creation_failed
call fcn.004012d5
lea ecx, [esp + 0x50]
call fcn.0040104b
lea eax, [esi - 0x10]
mov byte [esp + 0x184], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aa58
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x184], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aa80
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x184], 4
call fcn.00419825
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x184], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aab9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x184], 0
call fcn.004013f2
mov eax, dword [esp + 0x18c]
add eax, 0xfffffff0
mov dword [esp + 0x184], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aaf8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x40abd0
test ebx, ebx
je 0x40ab0a
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
mov byte [esp + 0x184], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab2e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x184], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x184], 4
call fcn.00419825
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x184], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab8f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x184], 0
call fcn.004013f2
mov eax, dword [esp + 0x18c]
add eax, 0xfffffff0
mov dword [esp + 0x184], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40abce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x17c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x164]
xor ecx, esp
call fcn.0045162d
add esp, 0x174
ret 8