Function at 0x40824a
Capabilities:
Check if file exists
Check mutex on windows
Read .ini file

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x43c
push ebx
push esi
push edi
push str.lsupdate_mutex
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [ebp + 0x58], eax
je 0x4082a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov esi, dword [sym.imp.USER32.dll_FindWindowW]
jne 0x408321
push 0x411a14
push ebx
call esi
mov edi, eax
cmp edi, ebx
je 0x4082aa
push 9
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
push edi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
xor eax, eax
jmp 0x4086b1
mov eax, dword [0x414050]
mov dword [ebp + 0x64], eax
push 0xff
lea eax, [ebp - 0x3d4]
push eax
push dword [ebp + 0x70]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ecx
lea eax, [ebp - 0x3d4]
mov ecx, esp
push eax
call fcn.00403310
lea eax, [ebp + 0x60]
push eax
call fcn.004034a9
pop ecx
pop ecx
push eax
lea ecx, [ebp + 0x64]
call fcn.00402aa1
lea ecx, [ebp + 0x60]
call fcn.00401894
mov eax, dword [ebp + 0x64]
cmp dword [eax - 8], ebx
jne 0x408307
push str.lvsupdate.exe
lea ecx, [ebp + 0x64]
call fcn.00402af1
push ecx
lea eax, [ebp + 0x64]
mov ecx, esp
push eax
call fcn.004032dd
call fcn.00403501
pop ecx
lea ecx, [ebp + 0x64]
call fcn.00401894
lea eax, [ebp + 0x4c]
push eax
mov dword [ebp + 0x4c], 8
mov dword [ebp + 0x50], 4
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push ebx
push dword [ebp + 0x78]
mov edi, 0x414d90
push dword [ebp + 0x70]
mov ecx, edi
push ebx
call fcn.004077de
test al, al
jne 0x408369
push dword [ebp + 0x58]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
call fcn.00402a2d
or eax, 0xffffffff
jmp 0x4086b1
push ebx
push str.LVSEIE_MainWnd
call esi
push str._setting.ini
mov dword [ebp + 0x70], eax
mov esi, 0x414dd4
push esi
lea eax, [ebp + 0x60]
push eax
call fcn.0040345d
push dword [ebp + 0x60]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call edi
test eax, eax
jne 0x40839e
xor esi, esi
jmp 0x4086a7
push str.update.ini
push esi
lea eax, [ebp + 0x64]
push eax
call fcn.0040345d
push dword [ebp + 0x64]
call edi
test eax, eax
jne 0x4083ce
push dword [ebp + 0x70]
push dword [ebp + 0x7c]
push dword [ebp + 0x78]
call fcn.0040310b
add esp, 0xc
xor esi, esi
jmp 0x40868c
mov eax, dword [0x414dcc]
cmp eax, ebx
jne 0x408495
push dword [ebp + 0x60]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x64
lea eax, [ebp - 0x10c]
push eax
mov ebx, 0x411954
push ebx
mov esi, 0x41194c
push esi
push 0x4119c4
call edi
push dword [ebp + 0x64]
lea eax, [ebp - 0x1d4]
push 0x64
push eax
push ebx
push esi
push str.update
call edi
lea eax, [ebp - 0x1d4]
push eax
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp + 0x5c]
call fcn.00403310
push eax
call fcn.00401a1f
lea ecx, [ebp + 0x5c]
mov bl, al
call fcn.00401894
test bl, bl
push dword [ebp + 0x70]
push dword [ebp + 0x7c]
push dword [ebp + 0x78]
je 0x408457
call fcn.0040310b
add esp, 0xc
mov esi, eax
jmp 0x408687
call fcn.00403085
mov esi, eax
add esp, 0xc
cmp esi, 1
jne 0x408687
push dword [ebp + 0x70]
push dword [ebp + 0x7c]
push dword [ebp + 0x78]
call fcn.00407564
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x408687
push dword [ebp + 0x70]
push dword [ebp + 0x7c]
push dword [ebp + 0x78]
call fcn.00403191
jmp 0x40844d
cmp eax, 1
jne 0x408684
lea ecx, [ebp - 0x44]
call fcn.00406cd9
lea ecx, [ebp + 0x30]
call fcn.00407125
push ecx
mov edi, esp
push ecx
mov ecx, esp
push 0x414dd8
call fcn.004032dd
push edi
call fcn.00402009
pop ecx
mov ecx, esp
push esi
call fcn.004032dd
push ecx
mov ecx, esp
mov edi, 0x414dd0
push edi
call fcn.004032dd
lea ecx, [ebp + 0x30]
call fcn.00407dfc
lea ecx, [ebp + 0x3c]
mov dword [ebp + 0x7c], ebx
call fcn.004014e4
test eax, eax
jle 0x408577
mov eax, dword [ebp + 0x40]
mov dword [ebp + 0x78], eax
push ecx
mov ecx, esp
push dword [ebp + 0x78]
call fcn.004032dd
lea eax, [ebp + 0x54]
push eax
call fcn.004034a9
pop ecx
pop ecx
push eax
push 0x411c44
push edi
lea eax, [ebp + 0x5c]
push eax
call fcn.0040345d
push eax
lea eax, [ebp + 0x70]
push eax
call fcn.0040341c
lea ecx, [ebp + 0x5c]
call fcn.00401894
lea ecx, [ebp + 0x54]
call fcn.00401894
push ecx
lea eax, [ebp + 0x70]
mov ecx, esp
push eax
call fcn.004032dd
push ecx
mov ecx, esp
push dword [ebp + 0x78]
call fcn.004032dd
lea ecx, [ebp - 0x44]
call fcn.00407c4d
lea ecx, [ebp + 0x70]
call fcn.00401894
inc dword [ebp + 0x7c]
add dword [ebp + 0x78], 0x10
lea ecx, [ebp + 0x3c]
call fcn.004014e4
cmp dword [ebp + 0x7c], eax
jl 0x4084fc
lea ecx, [ebp + 0x3c]
call fcn.004014e4
test eax, eax
jle 0x408674
push ebx
lea ecx, [ebp - 0x44]
call fcn.0040297d
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4085a4
lea ecx, [ebp - 0x40]
call fcn.004024a4
test al, al
jne 0x4085ba
push 0x14
call ebx
lea ecx, [ebp - 0x40]
call fcn.00402513
test al, al
je 0x408598
mov byte [ebp + 0x7b], 1
jmp 0x4085be
mov byte [ebp + 0x7b], 0
push ecx
mov ebx, esp
push ecx
mov ecx, esp
push 0x414dd8
call fcn.004032dd
push ebx
call fcn.004034a9
pop ecx
pop ecx
call fcn.00401a7a
test eax, eax
pop ecx
jl 0x408674
cmp byte [ebp + 0x7b], 0
je 0x408674
lea ecx, [ebp + 0x14]
call fcn.00407125
push ecx
mov ebx, esp
push ecx
mov ecx, esp
push 0x414dd8
call fcn.004032dd
push ebx
call fcn.00402009
pop ecx
mov ecx, esp
push esi
call fcn.004032dd
push ecx
mov ecx, esp
push edi
call fcn.004032dd
lea ecx, [ebp + 0x14]
call fcn.00407dfc
push 0
lea ecx, [ebp + 0x14]
call fcn.004079c9
test eax, eax
jl 0x40866c
push dword [ebp + 0x64]
lea eax, [ebp - 0x10c]
push 0x64
push eax
push 0x411954
mov esi, 0x41194c
push esi
push str.update
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push dword [ebp + 0x60]
lea eax, [ebp - 0x10c]
push eax
push esi
push 0x4119c4
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebp + 0x14]
call fcn.00406a11
lea ecx, [ebp + 0x30]
call fcn.00406a11
lea ecx, [ebp - 0x44]
call fcn.00407393
mov esi, dword [ebp + 0x78]
call fcn.00401c37
push dword [ebp + 0x58]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x414d90
call fcn.00402a2d
lea ecx, [ebp + 0x64]
call fcn.00401894
lea ecx, [ebp + 0x60]
call fcn.00401894
mov eax, esi
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret 0x10