Function at 0x401bb6
Capabilities:
Check if file exists
Check mutex and terminate process on windows
Check mutex on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x36c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x368], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0xff
lea eax, [esp + 0x75]
push ebx
push eax
mov edi, edx
mov esi, ecx
mov byte [esp + 0x7c], bl
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [esp + 0x171]
push 0xff
push ebx
push eax
mov byte [esp + 0x17c], bl
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [esp + 0x271]
push 0xff
push ebx
push eax
mov byte [esp + 0x27c], bl
call sub.MSVCR110.dll_memset
add esp, 0xc
push 0x34
pop eax
mov dword [esp + 0x18], eax
call fcn.004085c0
test eax, eax
je 0x401c42
push 0x28
call dword [sym.imp.MSVCR110.dll_exit]
push ebx
call dword [sym.imp.libav.dll_Ordinal_17]
pop ecx
test eax, eax
je 0x401c6a
push eax
call dword [sym.imp.libav.dll_Ordinal_27]
pop ecx
push eax
push str._Cant_initialize_libclamav:__s_n
call fcn.00408771
pop ecx
pop ecx
push 0x28
jmp 0x40236f
push ebx
push ebx
push 2
xor eax, eax
inc eax
push eax
push edi
push esi
push ebx
call dword [sym.imp.libav.dll_Ordinal_44284]
mov esi, eax
add esp, 0x1c
mov dword [esp + 0x14], esi
test esi, esi
jne 0x401c94
push str._Cant_parse_command_line_options_n
call fcn.00408771
jmp 0x401c62
push str.help
push esi
call dword [sym.imp.libav.dll_Ordinal_44283]
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401cbb
call fcn.00402734
push esi
call dword [sym.imp.libav.dll_Ordinal_44285]
pop ecx
xor eax, eax
jmp 0x402370
lea eax, [esp + 0x70]
push eax
push ecx
push ecx
call fcn.004023bf
neg eax
sbb eax, eax
and eax, 7
lea edx, [eax + 0x1c]
call fcn.00408311
mov edi, dword [sym.imp.MSVCR110.dll_strcat_s]
add esp, 0xc
mov esi, 0x100
push 0x40c8f4
lea eax, [esp + 0x74]
push esi
push eax
call edi
add esp, 0xc
call fcn.004028e9
push eax
lea eax, [esp + 0x74]
push esi
push eax
call edi
add esp, 0xc
lea eax, [esp + 0x70]
push eax
push esi
mov esi, dword [sym.imp.MSVCR110.dll_strcpy_s]
lea eax, [esp + 0x178]
push eax
call esi
add esp, 0xc
lea eax, [esp + 0x170]
push str.PCAU.conf
push 0x100
push eax
call edi
add esp, 0xc
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x274]
push 0x100
push eax
call esi
add esp, 0xc
lea eax, [esp + 0x270]
push str.RPCAU.log
push 0x100
push eax
call edi
add esp, 0xc
lea eax, [esp + 0x70]
push eax
push 0x100
push 0x410780
call esi
add esp, 0xc
push str.database
push 0x100
push 0x410780
call edi
add esp, 0xc
lea eax, [esp + 0x170]
push eax
call dword [sym.imp.MSVCR110.dll__strdup]
pop ecx
push dword [esp + 0x14]
mov esi, eax
push ebx
xor eax, eax
push 2
inc eax
push eax
push ebx
lea eax, [esp + 0x184]
push ebx
push eax
call dword [sym.imp.libav.dll_Ordinal_44284]
add esp, 0x1c
mov edi, eax
mov dword [esp + 0x14], edi
push esi
test edi, edi
jne 0x401de9
push str.ERROR:_Cant_open_parse_the_config_file__s_n
call dword [sym.imp.MSVCR110.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
push esi
call dword [sym.imp.MSVCR110.dll_free]
jmp 0x401c62
call dword [sym.imp.MSVCR110.dll_free]
mov esi, dword [sym.imp.libav.dll_Ordinal_44283]
mov dword [esp], str.version
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401e1d
push str.DatabaseDirectory
push edi
call esi
pop ecx
pop ecx
mov ecx, dword [eax + 8]
call fcn.00408618
jmp 0x402216
push str.stats_host_id
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401ed1
push str.stats_host_id
push edi
call esi
mov eax, dword [eax + 8]
push 8
push str.default
push eax
mov dword [esp + 0x20], eax
call sub.MSVCR110.dll_memcmp
add esp, 0x14
test eax, eax
je 0x401ebd
push 0xa
push str.anonymous
push dword [esp + 0x14]
call sub.MSVCR110.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x401e86
push 9
pop ecx
mov esi, str.5b585e8f_3be5_11e3_bf0b_18037319526c
mov edi, 0x410540
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x14]
mov esi, dword [sym.imp.libav.dll_Ordinal_44283]
jmp 0x401ed1
mov ecx, dword [esp + 0xc]
mov edx, ecx
lea eax, [edx + 1]
mov dword [esp + 0x14], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x401e93
sub edx, dword [esp + 0x14]
cmp edx, 0x24
jbe 0x401eaa
push 0x28
jmp 0x402215
mov edx, 0x410540
sub edx, ecx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x401eb1
jmp 0x401ed1
mov eax, dword [str.default]
mov dword [0x410540], eax
mov eax, dword [0x40c978]
mov dword [0x410544], eax
mov ecx, edi
call fcn.00401a8c
push str.HTTPProxyPassword
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401f08
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x174]
push eax
call dword [sym.imp.libav.dll_Ordinal_44339]
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x401f08
push 0x38
jmp 0x402215
push str.Debug
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
jne 0x401f26
push str.debug
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401f2c
call dword [sym.imp.libav.dll_Ordinal_6]
push str.verbose
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401f44
xor eax, eax
inc eax
mov word [0x41051c], ax
push str.quiet
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401f5c
xor eax, eax
inc eax
mov word [0x410508], ax
push str.no_warnings
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401f7a
xor eax, eax
inc eax
mov word [0x410518], ax
mov word [0x41050c], ax
push str.stdout
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x401f94
xor eax, eax
inc eax
mov word [0x410500], ax
jmp 0x401f97
xor eax, eax
inc eax
cmp word [0x41051c], bx
jne 0x401fae
push str.LogVerbose
push edi
call esi
mov ax, word [eax + 0x18]
pop ecx
pop ecx
push str.LogTime
push edi
mov word [0x410510], ax
call esi
mov ax, word [eax + 0x18]
push str.LogFileMaxSize
push edi
mov word [0x410514], ax
call esi
mov eax, dword [eax + 0x10]
add esp, 0x10
mov dword [0x410520], eax
test eax, eax
je 0x401ff1
push str.LogRotate
push edi
call esi
mov ax, word [eax + 0x18]
pop ecx
pop ecx
mov word [0x410524], ax
push str.UpdateLogFile
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x402036
lea eax, [esp + 0x270]
push str._______________________________________n
mov dword [0x410504], eax
call fcn.004089d4
pop ecx
test eax, eax
je 0x40203c
lea eax, [esp + 0x270]
push eax
push str._Problem_with_internal_logger__UpdateLogFile___s_._n
call fcn.00408771
pop ecx
pop ecx
push 0x3e
jmp 0x402215
mov dword [0x410504], ebx
push 0x4026ae
call dword [sym.imp.libav.dll_Ordinal_33]
mov dword [esp], 0x410780
call dword [sym.imp.MSVCR110.dll__chdir]
pop ecx
test eax, eax
je 0x402060
push 0x32
jmp 0x402215
push str.list_mirrors
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x4020ac
xor eax, eax
inc eax
push eax
lea edx, [esp + 0x20]
call fcn.00406326
pop ecx
cmp eax, 0xffffffff
jne 0x402095
push str.Cant_read_mirrors.dat_n
call dword [sym.imp.MSVCR110.dll_printf]
pop ecx
push 0x37
jmp 0x402215
lea ecx, [esp + 0x1c]
call fcn.00406423
lea ecx, [esp + 0x1c]
call fcn.00406406
jmp 0x402216
push str.PrivateMirror
push edi
call esi
pop ecx
pop ecx
mov dword [esp + 0xc], eax
cmp dword [eax + 0x18], ebx
je 0x4021d6
push str.DatabaseMirror
push edi
call esi
pop ecx
pop ecx
xor ecx, ecx
inc ecx
mov dword [esp + 0x10], eax
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov eax, dword [esp + 0xc]
push str..clamav.net
push dword [eax + 8]
call dword [sym.imp.libav.dll_Ordinal_44258]
pop ecx
pop ecx
test eax, eax
jne 0x402225
mov eax, dword [esp + 0x10]
cmp dword [eax + 8], ebx
je 0x402109
push dword [eax + 8]
call dword [sym.imp.MSVCR110.dll_free]
pop ecx
mov eax, dword [esp + 0xc]
push dword [eax + 8]
call dword [sym.imp.MSVCR110.dll__strdup]
pop ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 8], eax
test eax, eax
je 0x40216d
lea eax, [ecx + 0x28]
mov dword [esp + 0x14], eax
cmp dword [eax], ebx
jne 0x40214d
xor eax, eax
inc eax
push 0x38
push eax
call dword [sym.imp.MSVCR110.dll_calloc]
pop ecx
pop ecx
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
test eax, eax
je 0x40216d
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
lea edx, [ecx]
mov ecx, dword [eax]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], ecx
mov eax, dword [eax + 0x28]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x4020de
mov dword [edx + 0x28], ebx
jmp 0x4021b0
push 0x4b
jmp 0x402215
push dword [ecx]
call dword [sym.imp.MSVCR110.dll_free]
mov eax, dword [esp + 0x14]
pop ecx
push dword [eax + 4]
call dword [sym.imp.MSVCR110.dll_free]
mov eax, dword [esp + 0x14]
pop ecx
push dword [eax + 8]
call dword [sym.imp.MSVCR110.dll_free]
pop ecx
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x14], ecx
call dword [sym.imp.MSVCR110.dll_free]
pop ecx
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x402174
push str.no_dns
push edi
call esi
xor ecx, ecx
inc ecx
push str.ScriptedUpdates
push edi
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
call esi
add esp, 0x10
mov dword [eax + 0x18], ebx
mov dword [eax + 0x1c], ebx
push 0x4028ba
push 2
mov byte [0x410580], bl
call dword [sym.imp.MSVCR110.dll_signal]
push str.daemon
push edi
call esi
add esp, 0x10
cmp dword [eax + 0x18], ebx
je 0x4022b8
push str.Checks
push edi
call esi
pop ecx
pop ecx
mov ecx, dword [eax + 0x10]
test ecx, ecx
jle 0x402213
cmp ecx, 0x32
jle 0x402229
push 0x29
pop ebx
push edi
call dword [sym.imp.libav.dll_Ordinal_44285]
pop ecx
mov eax, ebx
jmp 0x402370
push 0x2d
jmp 0x402215
mov eax, 0x15180
cdq
idiv ecx
push str.PidFile
push edi
mov dword [esp + 0x14], eax
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x402251
mov eax, dword [eax + 8]
mov dword [0x4103f0], eax
call fcn.00402868
mov dword [0x410980], ebx
cmp word [0x4103f4], bx
jne 0x40231c
mov eax, dword [esp + 0xc]
imul eax, eax, 0x3e8
mov dword [esp + 0xc], eax
mov ecx, edi
call fcn.004026af
mov dword [esp + 0x18], eax
cmp eax, 1
jle 0x4022a4
push str.OnErrorExecute
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x4022a4
mov edx, dword [eax + 8]
test edx, edx
je 0x4022a4
push edi
mov ecx, str.OnErrorExecute
call fcn.0040196f
pop ecx
mov ecx, dword [esp + 0xc]
call fcn.004082c6
cmp word [0x4103f4], bx
je 0x402272
jmp 0x402315
push str.GlobalAweAPCPDBUpdMutex
push ebx
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
je 0x4022db
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x30
jmp 0x40236f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4022d4
call fcn.00402433
test eax, eax
je 0x40236d
push ecx
call fcn.00407f55
pop ecx
mov ecx, edi
mov esi, eax
call fcn.004026af
mov dword [esp + 0x18], eax
call fcn.004025a0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.libav.dll_Ordinal_44283]
cmp dword [esp + 0x18], 1
jle 0x40233a
push str.OnErrorExecute
push edi
call esi
pop ecx
pop ecx
cmp dword [eax + 0x18], ebx
je 0x40233a
mov edx, dword [eax + 8]
push edi
mov ecx, str.OnErrorExecute
call fcn.0040196f
pop ecx
mov eax, dword [0x4103f0]
test eax, eax
je 0x40234b
push eax
call dword [sym.imp.MSVCR110.dll__unlink]
pop ecx
push edi
call dword [sym.imp.libav.dll_Ordinal_44285]
pop ecx
call dword [sym.imp.libav.dll_Ordinal_49]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x402370
cmp dword [0x4104fc], ebx
je 0x402370
push 2
jmp 0x40236f
push 0x31
pop eax
mov ecx, dword [esp + 0x374]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401000
mov esp, ebp
pop ebp
ret