Function at 0x40add0
Capabilities:
Check if file exists
Get file size
Get file version info
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
push ebx
push esi
push edi
push 0x5c
push dword [ebp + 8]
call fcn.0044c2da
mov edi, eax
add esp, 8
test edi, edi
jne 0x40adf1
or edi, 0xffffffff
jmp 0x40adf6
sub edi, dword [ebp + 8]
sar edi, 1
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x40b7ca
mov eax, dword [ecx]
call dword [eax + 0xc]
or ebx, 0xffffffff
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
test edi, edi
jle 0x40ae57
mov eax, dword [ebp + 8]
lea ecx, [ebp + 8]
mov eax, dword [eax - 0xc]
sub eax, edi
dec eax
push eax
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004263e0
push eax
lea ecx, [ebp - 0x1c]
call fcn.00409a20
mov edx, dword [ebp - 0x30]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ae54
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x1c]
xor ecx, ecx
mov eax, 0x2aaaaaab
mov dword [ebp - 0x20], ecx
mov ecx, dword [0x4bbedc]
sub ecx, dword [0x4bbed8]
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40aeea
xor edi, edi
nop dword [eax]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40b7ca
push eax
mov eax, dword [0x4bbed8]
push dword [edi + eax + 8]
call fcn.0046b1da
add esp, 8
test eax, eax
jne 0x40aec2
test esi, esi
je 0x40b7ca
mov eax, dword [0x4bbed8]
push esi
push dword [edi + eax]
call fcn.0046b1da
add esp, 8
test eax, eax
je 0x40b77a
mov ecx, dword [0x4bbedc]
mov eax, 0x2aaaaaab
sub ecx, dword [0x4bbed8]
add edi, 0x30
inc dword [ebp - 0x20]
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 0x20], eax
jb 0x40ae80
mov edi, dword [ebp + 8]
add edi, 0xfffffff0
mov ecx, dword [edi]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x40af0b
cmp ecx, dword [edi]
jne 0x40af0b
lock inc dword [eax]
jmp 0x40af46
mov eax, dword [ecx]
push 2
push dword [edi + 4]
call dword [eax]
mov ecx, eax
mov dword [ebp - 0x30], ecx
test ecx, ecx
je 0x40b7d4
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
add ecx, 0x10
mov eax, dword [edi + 4]
lea edx, [eax*2 + 2]
push edx
lea eax, [edi + 0x10]
push eax
push edx
push ecx
call fcn.00437560
mov edi, dword [ebp - 0x30]
add esp, 0x10
push 0
push 1
push 3
push 0
push 0
lea eax, [edi + 0x10]
xorps xmm0, xmm0
push 1
push eax
mov dword [ebp - 0x30], eax
movlpd qword [ebp - 0x40], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40af95
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0
push eax
push edi
mov dword [ebp - 0x3c], 0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], eax
jmp 0x40afa1
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x20], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x30]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40afc2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 8]
cmp dword [eax - 4], 1
jle 0x40afd9
push dword [eax - 0xc]
lea ecx, [ebp + 8]
call fcn.00402190
mov eax, dword [ebp + 8]
push 0
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov ecx, dword [ebp + 8]
mov edi, eax
mov dword [ebp - 0x30], edi
push dword [ecx - 8]
push ecx
call fcn.00456760
add esp, 8
test eax, eax
js 0x40b81f
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx - 8]
jg 0x40b81f
mov dword [ecx - 0xc], eax
xor edx, edx
mov ecx, dword [ebp + 8]
mov word [ecx + eax*2], dx
test edi, edi
jne 0x40b1fc
mov ecx, dword [0x4bbedc]
mov eax, 0x2aaaaaab
sub ecx, dword [0x4bbed8]
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x40b77a
lea ecx, [ebp - 0x70]
call fcn.00408710
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 0x68]
add edi, 0xfffffff0
lea edx, [eax - 0x10]
cmp edx, edi
je 0x40b09d
cmp dword [edi + 0xc], 0
jl 0x40b091
mov ecx, dword [edx]
cmp ecx, dword [edi]
jne 0x40b091
push edx
call fcn.00403380
add esp, 4
mov dword [ebp - 0x30], eax
mov ecx, ebx
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b089
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x30]
add eax, 0x10
mov dword [ebp - 0x68], eax
jmp 0x40b09d
push dword [eax - 0xc]
lea ecx, [ebp - 0x68]
push eax
call fcn.00402620
push 0
push 0x4a1628
lea ecx, [ebp - 0x64]
call fcn.00402620
mov edi, dword [ebp - 0x70]
lea ecx, [esi - 0x10]
add edi, 0xfffffff0
cmp ecx, edi
je 0x40b0fe
cmp dword [edi + 0xc], 0
jl 0x40b0f2
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x40b0f2
push ecx
call fcn.00403380
add esp, 4
mov dword [ebp - 0x30], eax
mov ecx, ebx
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b0ea
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x30]
add eax, 0x10
mov dword [ebp - 0x70], eax
jmp 0x40b0fe
push dword [esi - 0xc]
lea ecx, [ebp - 0x70]
push esi
call fcn.00402620
push 0
push 0x4a1628
lea ecx, [ebp - 0x6c]
call fcn.00402620
push 0
push 0x4a1628
lea ecx, [ebp - 0x60]
call fcn.00402620
mov eax, dword [ebp - 0x20]
push dword [ebp + 8]
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne al
mov byte [ebp - 0x50], al
test al, al
je 0x40b1d9
test edi, edi
jg 0x40b1d9
jl 0x40b158
cmp dword [ebp - 0x20], 0xc350
jae 0x40b1d9
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
je 0x40b1d9
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 0
push ecx
push eax
mov dword [ebp - 0x34], 0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edi, dword [ebp - 0x38]
push edi
call fcn.00448f65
push edi
mov ebx, eax
push 0
push ebx
call fcn.0044c180
add esp, 0x10
lea eax, [ebp - 0x3c]
push 0
push eax
push edi
mov edi, dword [ebp - 0x30]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [ebp - 0x48]
call fcn.00409a90
push ebx
call fcn.00448f6e
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or ebx, 0xffffffff
mov eax, dword [0x4c1050]
mov ecx, 0x4bbed8
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x70]
push eax
call fcn.004369a0
lea ecx, [ebp - 0x70]
call fcn.00409820
jmp 0x40b77a
push edi
call fcn.004688da
mov edi, eax
add esp, 4
mov dword [ebp - 0x18], edi
test edi, edi
je 0x40b77a
mov ecx, dword [ebp + 8]
cmp dword [ecx - 4], 1
jle 0x40b229
push dword [ecx - 0xc]
lea ecx, [ebp + 8]
call fcn.00402190
mov ecx, dword [ebp + 8]
push edi
push dword [ebp - 0x30]
push 0
push ecx
call sub.VERSION.dll_GetFileVersionInfoW
mov eax, dword [ebp + 8]
push dword [eax - 8]
push eax
call fcn.00456760
mov edx, eax
add esp, 8
test edx, edx
js 0x40b81f
mov ecx, dword [ebp + 8]
cmp edx, dword [ecx - 8]
jg 0x40b81f
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp + 8]
mov word [eax + edx*2], cx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
mov dword [ebp - 8], ecx
push eax
push str.VarFileInfoTranslation
push edi
mov dword [ebp - 0x14], ecx
call sub.VERSION.dll_VerQueryValueW
cmp dword [ebp - 8], 0
je 0x40b77a
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x40b7d9
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 4], eax
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x40b7e3
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x40b7ed
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xc], eax
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x40b7f7
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x40b801
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x3c], eax
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x40b80b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x34], eax
call fcn.00402250
mov ecx, eax
test ecx, ecx
je 0x40b815
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
push eax
lea eax, [ebp - 0xc]
push str.000_x
push eax
call fcn.0041ad10
mov edi, dword [ebp - 0xc]
add esp, 0xc
mov eax, dword [edi - 0xc]
mov dword [ebp - 0x24], eax
cmp eax, 4
jg 0x40b379
add edi, 0xfffffff0
push edi
call fcn.00403380
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x24], edi
jmp 0x40b3ad
mov ecx, dword [edi - 0x10]
test ecx, ecx
je 0x40b389
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x40b395
call fcn.00402250
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x24]
add edi, 0xfffffff8
push 4
lea eax, [edi + eax*2]
push eax
call fcn.00407360
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x10]
call fcn.00409a20
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40b3d0
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 8]
movzx eax, word [eax + 2]
push eax
lea eax, [ebp - 0xc]
push str.000_x
push eax
call fcn.0041ad10
mov edi, dword [ebp - 0xc]
add esp, 0xc
mov eax, dword [edi - 0xc]
mov dword [ebp - 0x24], eax
cmp eax, 4
jg 0x40b408
add edi, 0xfffffff0
push edi
call fcn.00403380
add esp, 4
lea edi, [eax + 0x10]
jmp 0x40b43c
mov ecx, dword [edi - 0x10]
test ecx, ecx
je 0x40b418
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x40b424
call fcn.00402250
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x24]
add edi, 0xfffffff8
push 4
lea eax, [edi + eax*2]
push eax
call fcn.00407360
mov edi, dword [ebp - 0x24]
push dword [edi - 0xc]
lea ecx, [ebp - 0x10]
push edi
call fcn.00403910
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40b45f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x10]
lea eax, [ebp - 4]
push str.StringFileInfo_sProductName
push eax
call fcn.0041ad10
mov edi, dword [ebp - 4]
mov ecx, 1
add esp, 0xc
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x100
or ecx, eax
jge 0x40b49a
push 0x100
lea ecx, [ebp - 4]
call fcn.004024d0
mov edi, dword [ebp - 4]
cmp dword [edi - 8], 0x100
jl 0x40b81f
xor eax, eax
mov dword [edi - 0xc], 0x100
mov word [edi + 0x200], ax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp - 0x18]
call sub.VERSION.dll_VerQueryValueW
push dword [edi - 8]
push edi
call fcn.00456760
add esp, 8
test eax, eax
js 0x40b81f
cmp eax, dword [edi - 8]
jg 0x40b81f
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
lea eax, [ebp - 0xc]
push dword [ebp - 8]
push 0x4a4b34
push eax
call fcn.0041ad10
push dword [ebp - 0x10]
lea eax, [ebp - 4]
push str.StringFileInfo_sProductVersion
push eax
call fcn.0041ad10
mov edi, dword [ebp - 4]
mov ecx, 1
add esp, 0x18
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x100
or ecx, eax
jge 0x40b53a
push 0x100
lea ecx, [ebp - 4]
call fcn.004024d0
mov edi, dword [ebp - 4]
cmp dword [edi - 8], 0x100
jl 0x40b829
xor eax, eax
mov dword [edi - 0xc], 0x100
mov word [edi + 0x200], ax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp - 0x18]
call sub.VERSION.dll_VerQueryValueW
push dword [edi - 8]
push edi
call fcn.00456760
add esp, 8
test eax, eax
js 0x40b81f
cmp eax, dword [edi - 8]
jg 0x40b81f
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
lea eax, [ebp - 0x30]
push dword [ebp - 8]
push 0x4a4b34
push eax
call fcn.0041ad10
push dword [ebp - 0x10]
lea eax, [ebp - 4]
push str.StringFileInfo_sOriginalFileName
push eax
call fcn.0041ad10
mov edi, dword [ebp - 4]
mov ecx, 1
add esp, 0x18
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x100
or ecx, eax
jge 0x40b5da
push 0x100
lea ecx, [ebp - 4]
call fcn.004024d0
mov edi, dword [ebp - 4]
cmp dword [edi - 8], 0x100
jl 0x40b833
xor eax, eax
mov dword [edi - 0xc], 0x100
mov word [edi + 0x200], ax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp - 0x18]
call sub.VERSION.dll_VerQueryValueW
push dword [edi - 8]
push edi
call fcn.00456760
add esp, 8
test eax, eax
js 0x40b81f
cmp eax, dword [edi - 8]
jg 0x40b81f
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
lea eax, [ebp - 0x2c]
push dword [ebp - 8]
push 0x4a4b34
push eax
call fcn.0041ad10
push dword [ebp - 0x18]
call fcn.004688d5
add esp, 0x10
lea ecx, [ebp - 0x70]
call fcn.00408710
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x68]
call fcn.00409a20
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x64]
call fcn.00409a20
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x70]
call fcn.00409a20
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x6c]
call fcn.00409a20
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x60]
call fcn.00409a20
mov eax, dword [ebp - 0x20]
push dword [ebp + 8]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x54], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov ecx, 0x4bbed8
mov eax, dword [0x4c1050]
mov dword [ebp - 0x4c], eax
setne byte [ebp - 0x50]
lea eax, [ebp - 0x70]
push eax
call fcn.004369a0
lea ecx, [ebp - 0x70]
call fcn.00409820
mov edx, dword [ebp - 0x2c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b6e1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x34]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b6fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x3c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b715
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x30]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b72f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0xc]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b749
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x10]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b763
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40b77a
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40b791
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b7ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40b7c3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402080
call fcn.004026d0
push 0x80004005
call fcn.00402080
push 0x80004005
call fcn.00402080
push 0x80004005
call fcn.00402080
push 0x80004005
call fcn.00402080
push 0x80004005
call fcn.00402080
push 0x80004005
call fcn.00402080
push 0x80004005
call fcn.00402080
push 0x80070057
call fcn.00402080
push 0x80070057
call fcn.00402080
push 0x80070057
call fcn.00402080
int3