Function at 0x40a219
Capabilities:
Check if file exists
Check mutex on windows
Get user security identifier
Read .ini file

Disassembly:
mov eax, 0x41dc9c
call fcn.0041abb0
sub esp, 0x5ec
mov eax, dword [0x42b530]
push ebx
xor eax, ebp
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push edi
mov dword [ebp - 0x5c4], ecx
push eax
lea ecx, [ebp - 0x550]
mov dword [ebp - 0x5c8], eax
mov dword [ebp - 0x5d0], esi
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
xor ebx, ebx
mov dword [ebp - 4], ebx
push str.TPAutoUpdate
lea ecx, [ebp - 0x550]
call dword [0x420230]
push esi
lea ecx, [ebp - 0x550]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [ebp - 0x550]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40a389
lea ecx, [ebp - 0x550]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push ebx
push str.starttimes
mov esi, str.update
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov edx, eax
cmp edx, ebx
jbe 0x40a2fc
push 7
pop ecx
xor eax, eax
mov word [ebp - 0x30], bx
lea edi, [ebp - 0x2e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0xa
lea eax, [ebp - 0x30]
inc edx
push eax
push edx
call dword [sym.imp.MSVCR71.dll__ultow]
add esp, 0xc
lea ecx, [ebp - 0x550]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea eax, [ebp - 0x30]
push eax
push str.starttimes
push esi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebp - 0x550]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push eax
push ebx
push str.lastquit
mov esi, str.tpquit
push esi
call edi
cmp eax, ebx
lea ecx, [ebp - 0x550]
je 0x40a371
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push ebx
push 0x421574
push esi
call edi
mov edx, eax
cmp edx, ebx
jbe 0x40a389
push 7
pop ecx
xor eax, eax
mov word [ebp - 0x30], bx
lea edi, [ebp - 0x2e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0xa
lea eax, [ebp - 0x30]
inc edx
push eax
push edx
call dword [sym.imp.MSVCR71.dll__ultow]
add esp, 0xc
lea ecx, [ebp - 0x550]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea eax, [ebp - 0x30]
push eax
jmp 0x40a37d
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push 0x421570
push 0x421574
push esi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, dword [ebp - 0x5c4]
add eax, 0x14
push eax
lea ecx, [ebp - 0x56c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [ebp - 4], 1
push str._tp_auto_updating
lea ecx, [ebp - 0x56c]
call dword [0x420230]
lea eax, [ebp - 0x56c]
push eax
call fcn.00412a90
pop ecx
push 1
lea eax, [ebp - 0x5f8]
push eax
mov dword [ebp - 0x5d4], 0x64
mov dword [ebp - 0x5cc], 0x50
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 2
push 0x400
lea eax, [ebp - 0x534]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
lea eax, [ebp - 0x5e4]
push eax
lea eax, [ebp - 0x5cc]
push eax
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x5d4]
push eax
lea eax, [ebp - 0x94]
push eax
push str.everyone
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea eax, [ebp - 0x94]
push eax
push 0x10000000
push 2
lea eax, [ebp - 0x534]
push eax
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
push ebx
lea eax, [ebp - 0x534]
push eax
push 1
lea eax, [ebp - 0x5f8]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push dword [ebp - 0x5c8]
lea eax, [ebp - 0x5f8]
lea ecx, [ebp - 0x588]
mov dword [ebp - 0x5e0], 0xc
mov dword [ebp - 0x5dc], eax
mov dword [ebp - 0x5d8], ebx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [ebp - 4], 2
push str._tp_auto_update_alive_mutex
lea ecx, [ebp - 0x588]
call dword [0x420230]
lea eax, [ebp - 0x588]
push eax
call fcn.00412a90
pop ecx
lea ecx, [ebp - 0x588]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push ebx
lea eax, [ebp - 0x5e0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
cmp edi, ebx
jne 0x40a4d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40a696
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
push edi
jne 0x40a520
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
lea ecx, [ebp - 0x56c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push ebx
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov edi, eax
cmp edi, ebx
jne 0x40a50f
push ebx
jmp 0x40a570
push 0xea60
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call esi
jmp 0x40a50c
call fcn.00411050
pop ecx
lea ecx, [ebp - 0x56c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push ebx
push ebx
lea eax, [ebp - 0x5e0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [ebp - 0x5c4], eax
jne 0x40a558
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40a696
call esi
cmp eax, 0xb7
jne 0x40a577
push dword [ebp - 0x5c4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
jmp 0x40a696
lea ecx, [ebp - 0x5c0]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov byte [ebp - 4], 3
lea eax, [ebp - 0x5c0]
push eax
call fcn.00413a90
pop ecx
mov ecx, dword [ebp - 0x5c8]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea ecx, [ebp - 0x5c0]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsSameRootW]
test eax, eax
je 0x40a669
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov byte [ebp - 4], 4
lea eax, [ebp - 0x2c]
push eax
call fcn.00413560
pop ecx
push dword [ebp - 0x5c8]
lea ecx, [ebp - 0x5a4]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [ebp - 4], 5
push str.auto_update.dll
lea ecx, [ebp - 0x5a4]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::append_wchar_t_const__]
lea ecx, [ebp - 0x5a4]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
je 0x40a64c
push str.StartAutoUpdate
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x40a64c
mov ecx, dword [ebp - 0x5d0]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
mov ecx, dword [ebp - 0x5c8]
push eax
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call esi
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x5a4]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push dword [ebp - 0x5c4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp - 0x5c4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5c0]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x588]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x56c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x550]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ac61
leave
ret 8