Function at 0x40b680
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x648947
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x218]
push ecx
xor esi, esi
push 0x104
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x22c], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x21c]
call fcn.004023d0
push 0x10
push str.REI_Booster.exe
lea ecx, [ebp - 0x21c]
mov dword [ebp - 4], esi
call fcn.00406a10
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40b80e
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x220]
call fcn.004023d0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x220]
push 0x5c
push eax
call fcn.00522004
add esp, 8
cmp eax, esi
jne 0x40b758
or eax, 0xffffffff
jmp 0x40b760
sub eax, dword [ebp - 0x220]
sar eax, 1
push eax
lea ecx, [ebp - 0x238]
push ecx
lea ecx, [ebp - 0x220]
call fcn.004067f0
push str.REI_Booster.exe
push eax
lea edx, [ebp - 0x230]
mov bl, 2
push edx
mov byte [ebp - 4], bl
call fcn.00402600
add esp, 0xc
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 3
call fcn.00402930
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b7c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x238]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b7e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b80e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0041a80c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b828
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x228], esi
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x21c]
push ecx
push edx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov edi, eax
test edi, edi
jne 0x40b893
mov edi, dword [ebp - 0x224]
push 0x6cbc40
mov ecx, edi
call fcn.004023d0
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b957
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40b957
push edi
call fcn.00419fa3
mov ecx, dword [ebp - 0x234]
mov edx, dword [ebp - 0x21c]
add esp, 4
mov ebx, eax
push ebx
push edi
push ecx
push edx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x40b8c3
push ebx
call fcn.00419f98
add esp, 4
jmp 0x40b858
lea ecx, [ebp - 0x23c]
push ecx
lea edx, [ebp - 0x22c]
push edx
push 0x6cc1e0
push ebx
xor esi, esi
xor edi, edi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
cmp eax, 1
jne 0x40b8f2
mov eax, dword [ebp - 0x22c]
mov esi, dword [eax + 8]
mov edi, dword [eax + 0xc]
push ebx
call fcn.00419f98
movzx edx, si
mov eax, esi
movzx esi, di
push esi
mov ecx, edi
shr ecx, 0x10
push ecx
push edx
shr eax, 0x10
push eax
lea eax, [ebp - 0x228]
push str._d._d._d._d
push eax
call fcn.00402d30
mov esi, dword [ebp - 0x228]
add esi, 0xfffffff0
push esi
call fcn.00402be0
mov edi, dword [ebp - 0x224]
add eax, 0x10
add esp, 0x20
mov dword [edi], eax
mov byte [ebp - 4], 0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b957
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b980
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 4