Function at 0x4057f0
Capabilities:
Check if file exists
Get file version info

Disassembly:
push 0xffffffffffffffff
push 0x443978
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x458640]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov edi, dword [esp + 0x40]
lea eax, [esp + 0x20]
xor ebx, ebx
push eax
push edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 1
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
cmp esi, ebx
je 0x405a54
push esi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esp + 0x20]
mov ebp, eax
push ebp
push esi
push ecx
push edi
call sub.VERSION.dll_GetFileVersionInfoA
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push eax
push str.VarFileInfoTranslation
push ebp
call sub.VERSION.dll_VerQueryValueA
mov eax, dword [esp + 0x18]
cmp eax, 1
jae 0x4058a4
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
push str.StringFileInfo040904b0FileVersion
push ebp
call sub.VERSION.dll_VerQueryValueA
mov eax, dword [esp + 0x18]
cmp eax, 4
jne 0x405a49
call fcn.00411614
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4058c7
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], ebx
call fcn.00411614
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4058f5
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
push edx
lea eax, [esp + 0x44]
push str._08x
push eax
mov byte [esp + 0x44], 1
call fcn.00404a50
add esp, 0xc
push 4
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x48]
call fcn.00401880
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c], 2
call fcn.00401a50
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x38], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405967
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 4
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x48]
call fcn.00401900
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x40], 3
call fcn.004045e0
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x38], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4059b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x10
push str.StringFileInfo_
lea ecx, [esp + 0x48]
call fcn.00401700
mov esi, dword [esp + 0x1c]
mov eax, dword [esi - 0xc]
push eax
push esi
lea ecx, [esp + 0x48]
call fcn.004045e0
push 0xc
push str.FileVersion
lea ecx, [esp + 0x48]
call fcn.004045e0
mov edi, dword [esp + 0x40]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
push edi
push ebp
call sub.VERSION.dll_VerQueryValueA
cmp dword [esp + 0x18], 1
jae 0x405a03
mov dword [esp + 0x14], ebx
lea eax, [esi - 0x10]
mov byte [esp + 0x38], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a23
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x38], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a63
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x405a63
cmp eax, 1
jae 0x405a63
mov dword [esp + 0x14], ebx
jmp 0x405a63
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x405a63
mov dword [esp + 0x28], ebx
call fcn.00411614
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x405a7d
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov dword [esp + 0x38], 4
je 0x405b01
push eax
call fcn.0042dce0
mov ecx, eax
add esp, 4
lea esi, [ecx + 1]
jmp 0x405ab0
mov dl, byte [ecx]
add ecx, 1
cmp dl, bl
jne 0x405ab0
sub ecx, esi
cmp byte [ecx + eax - 1], 0x31
lea ecx, [ecx + eax - 1]
jge 0x405ad0
mov byte [ecx], bl
sub ecx, 1
cmp byte [ecx], 0x31
jl 0x405ac6
cmp eax, ebx
jne 0x405ad8
xor ecx, ecx
jmp 0x405aeb
mov ecx, eax
lea esi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
add ecx, 1
cmp dl, bl
jne 0x405ae0
sub ecx, esi
push ecx
push eax
lea ecx, [esp + 0x48]
call fcn.00401700
lea ecx, [esp + 0x40]
call fcn.00404500
jmp 0x405b10
push ebx
push 0x44796c
lea ecx, [esp + 0x48]
call fcn.00401700
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov eax, esi
sub edx, esi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
cmp cl, bl
jne 0x405b20
mov edi, dword [esp + 0x24]
cmp edi, ebx
je 0x405b42
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea eax, [esi - 0x10]
mov dword [esp + 0x38], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b66
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 8