Function at 0x403ca0
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e3c1
mov eax, dword fs:[0]
push eax
sub esp, 0x47c
mov eax, dword [0x41d034]
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 esi, ecx
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
mov edx, str.cfgiSafeUpdate.ini
lea ecx, [ebp - 0x420]
call fcn.00403bd0
test eax, eax
je 0x4040b7
cmp word [ebp - 0x420], 0
je 0x4040b1
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4040b1
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call sub.MSVCR110.dll_memset
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
add esp, 0xc
lea eax, [ebp - 0x420]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
push str.updated
push str.selfupdate
call ebx
test eax, eax
jne 0x403d79
mov dword [esi + 0x61c], eax
mov edi, dword [sym.imp.MSVCR110.dll__wcsicmp]
lea eax, [ebp - 0x218]
push str.TRUE
push eax
call edi
add esp, 8
test eax, eax
je 0x403da9
lea eax, [ebp - 0x218]
push 0x411090
push eax
call edi
add esp, 8
test eax, eax
jne 0x403db3
mov dword [esi + 0x61c], 1
lea eax, [ebp - 0x420]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
push 0x411094
push str.selfupdate
call ebx
test eax, eax
jne 0x403dde
mov dword [esi + 0x624], eax
lea eax, [ebp - 0x218]
push str.TRUE
push eax
call edi
add esp, 8
test eax, eax
je 0x403e08
lea eax, [ebp - 0x218]
push 0x411090
push eax
call edi
add esp, 8
test eax, eax
jne 0x403e12
mov dword [esi + 0x624], 1
lea eax, [ebp - 0x420]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
push str.incup
push str.selfupdate
call ebx
test eax, eax
jne 0x403e3d
mov dword [esi + 0x620], eax
lea eax, [ebp - 0x218]
push str.TRUE
push eax
call edi
add esp, 8
test eax, eax
je 0x403e67
lea eax, [ebp - 0x218]
push 0x411090
push eax
call edi
add esp, 8
test eax, eax
jne 0x403e71
mov dword [esi + 0x620], 1
lea eax, [ebp - 0x420]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
push str.self
push str.Settings
call ebx
test eax, eax
je 0x4040b1
lea eax, [ebp - 0x218]
push str.TRUE
push eax
call edi
add esp, 8
test eax, eax
je 0x403ec4
lea eax, [ebp - 0x218]
push 0x411090
push eax
call edi
add esp, 8
test eax, eax
jne 0x403eca
mov dword [esi], 1
lea eax, [ebp - 0x420]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
push str.whiteaddr
push str.Settings
call ebx
mov edi, dword [sym.imp.MSVCR110.dll_wcscpy_s]
test eax, eax
je 0x403f53
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x43c]
call fcn.00403140
lea edx, [ebp - 0x43c]
lea ecx, [ebp - 0x454]
mov dword [ebp - 4], 0
call fcn.00407030
cmp dword [eax + 0x14], 8
jb 0x403f27
mov eax, dword [eax]
push eax
lea eax, [esi + 4]
push 0x104
push eax
call edi
add esp, 0xc
lea ecx, [ebp - 0x454]
call fcn.00401dc0
lea ecx, [ebp - 0x43c]
mov dword [ebp - 4], 0xffffffff
call fcn.00401dc0
lea eax, [ebp - 0x420]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
push str.popularaddr
push str.Settings
call ebx
test eax, eax
je 0x403fd9
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x43c]
call fcn.00403140
lea edx, [ebp - 0x43c]
lea ecx, [ebp - 0x454]
mov dword [ebp - 4], 1
call fcn.00407030
cmp dword [eax + 0x14], 8
jb 0x403faa
mov eax, dword [eax]
push eax
lea eax, [esi + 0x20c]
push 0x104
push eax
call edi
add esp, 0xc
lea ecx, [ebp - 0x454]
call fcn.00401dc0
lea ecx, [ebp - 0x43c]
mov dword [ebp - 4], 0xffffffff
call fcn.00401dc0
lea eax, [ebp - 0x420]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
push str.fulladdr
push str.Settings
call ebx
test eax, eax
je 0x404058
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x46c]
call fcn.00403140
lea edx, [ebp - 0x46c]
lea ecx, [ebp - 0x484]
mov dword [ebp - 4], 2
call fcn.00407030
cmp dword [eax + 0x14], 8
jb 0x404030
mov eax, dword [eax]
push eax
lea eax, [esi + 0x414]
push 0x104
push eax
call edi
add esp, 0xc
lea ecx, [ebp - 0x484]
call fcn.00401dc0
lea ecx, [ebp - 0x46c]
call fcn.00401dc0
lea ecx, [esi + 4]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404060
sub ecx, edx
sar ecx, 1
jne 0x4040b7
lea ecx, [esi + 0x20c]
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404080
sub ecx, edx
sar ecx, 1
jne 0x4040b7
lea ecx, [esi + 0x414]
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4040a0
sub ecx, edx
sar ecx, 1
jne 0x4040b7
mov dword [esi], 0
mov eax, 1
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.0040c4b2
mov esp, ebp
pop ebp
ret