Function at 0x405042
Capabilities:
Create directory
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x78
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x74], eax
push ebx
push ebp
mov ebp, dword [sym.imp.libav.dll_Ordinal_44283]
push esi
push edi
mov esi, ecx
xor ebx, ebx
and dword [esp + 0x14], ebx
and dword [esp + 0x10], ebx
push str.MaxAttempts
push esi
mov dword [esp + 0x24], edx
call ebp
pop ecx
xor edx, edx
pop ecx
mov ecx, dword [esp + 0x8c]
inc edx
cmp dword [eax + 0x10], ecx
jne 0x40508e
cmp dword [eax + 0x14], ebx
jne 0x40508e
mov dword [esp + 0x18], edx
jmp 0x405092
and dword [esp + 0x18], ebx
push 0x410780
call dword [sym.imp.libav.dll_Ordinal_44203]
mov edi, eax
pop ecx
test edi, edi
jne 0x4050ac
push 0x39
pop eax
jmp 0x4054ef
push 0x200
push edi
push 0x410580
call dword [sym.imp.MSVCR110.dll_strncpy]
add esp, 0xc
mov byte [0x41077f], bl
push edi
call dword [sym.imp.MSVCR110.dll_free]
mov dword [esp], 0x410580
call dword [sym.imp.MSVCR110.dll__mkdir]
pop ecx
test eax, eax
jne 0x4050a4
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.MSVCR110.dll__time64]
mov dword [esp], str.LocalIPAddress
push esi
call ebp
xor edi, edi
pop ecx
pop ecx
cmp dword [eax + 0x18], edi
je 0x405104
mov eax, dword [eax + 8]
mov dword [esp + 0x10], eax
push str.HTTPProxyServer
push esi
call ebp
pop ecx
pop ecx
cmp dword [eax + 0x18], edi
jne 0x40513d
push str.PrivateMirror
push esi
call ebp
pop ecx
pop ecx
cmp dword [eax + 0x18], edi
jne 0x40513d
push 9
pop ecx
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x30], 1
call fcn.00405522
jmp 0x40514c
push 9
xor eax, eax
pop ecx
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov byte [esp + 0x30], al
push 0x2e
lea eax, [esp + 0x58]
push 0
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
push str.DatabaseCustomURL
push esi
call ebp
mov edi, eax
pop ecx
pop ecx
cmp dword [edi + 0x18], ebx
je 0x4051a2
mov ebp, dword [esp + 0x18]
mov ecx, dword [edi + 8]
push ebp
push dword [esp + 0x14]
lea edx, [esp + 0x1c]
push esi
call fcn.00404aad
mov edi, dword [edi + 0x28]
add esp, 0xc
test eax, eax
push 1
mov dword [esp + 0x24], eax
pop eax
cmove ebx, eax
test edi, edi
jne 0x405172
mov ebp, dword [sym.imp.libav.dll_Ordinal_44283]
jmp 0x4051aa
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
push str.update_db
push esi
call ebp
cmp dword [eax + 0x18], 0
pop ecx
pop ecx
mov dword [esp + 0x24], eax
je 0x40528f
mov edi, dword [eax + 8]
push 7
push str.custom
push edi
call sub.MSVCR110.dll_memcmp
add esp, 0xc
test eax, eax
je 0x405263
push dword [esp + 0x8c]
mov edx, dword [esp + 0x20]
push ecx
push dword [esp + 0x20]
lea eax, [esp + 0x3c]
push eax
push ecx
push dword [esp + 0x24]
lea eax, [esp + 0x2c]
push ecx
push esi
push eax
lea eax, [esp + 0x78]
push eax
mov ecx, edi
call fcn.0040422e
mov edi, eax
add esp, 0x28
cmp edi, 0x32
jg 0x405487
push 1
test edi, edi
pop eax
cmove ebx, eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x4051c2
lea eax, [esp + 0x30]
push eax
call fcn.00405a77
pop ecx
lea ecx, [esp + 0x30]
call fcn.00405505
push 0x410580
call dword [sym.imp.libav.dll_Ordinal_44210]
pop ecx
call fcn.004040a4
test eax, eax
jns 0x4054ab
push 0x40
jmp 0x4050a6
push str.DatabaseCustomURL
push esi
call ebp
mov edi, dword [esp + 0x28]
mov esi, dword [sym.imp.MSVCR110.dll_free]
push 0x38
xor ebx, ebx
cmp dword [eax + 0x18], ebx
pop ecx
push ebx
cmove edi, ecx
call esi
add esp, 0xc
push ebx
call esi
pop ecx
jmp 0x405487
push dword [esp + 0x8c]
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push ecx
push edi
lea eax, [esp + 0x3c]
push eax
push ecx
push dword [esp + 0x24]
lea eax, [esp + 0x2c]
push ecx
push esi
push eax
lea eax, [esp + 0x78]
push eax
mov ecx, str.main
call fcn.0040422e
add esp, 0x28
cmp eax, 0x32
jg 0x405485
push 1
mov edx, dword [esp + 0x20]
test eax, eax
pop eax
push dword [esp + 0x8c]
cmove ebx, eax
push ecx
push edi
lea eax, [esp + 0x3c]
push eax
push ecx
push dword [esp + 0x24]
lea eax, [esp + 0x2c]
push ecx
push esi
push eax
lea eax, [esp + 0x78]
push eax
mov ecx, str.daily
call fcn.0040422e
add esp, 0x28
cmp eax, 0x32
jg 0x405485
push 1
test eax, eax
pop eax
push str.SafeBrowsing
push esi
cmove ebx, eax
call ebp
cmp dword [eax + 0x18], 0
pop ecx
pop ecx
jne 0x4053a2
push 4
mov edi, str.safebrowsing.cvd
push edi
call dword [sym.imp.libav.dll_Ordinal_44340]
pop ecx
pop ecx
test eax, eax
je 0x40534d
push 4
mov edi, str.safebrowsing.cld
push edi
call dword [sym.imp.libav.dll_Ordinal_44340]
pop ecx
pop ecx
test eax, eax
jne 0x405355
push edi
call dword [sym.imp.MSVCR110.dll__unlink]
pop ecx
mov edi, dword [esp + 0x18]
push str.Bytecode
push esi
call ebp
cmp dword [eax + 0x18], 0
pop ecx
pop ecx
jne 0x4053e8
push 4
mov edi, str.bytecode.cvd
push edi
call dword [sym.imp.libav.dll_Ordinal_44340]
pop ecx
pop ecx
test eax, eax
je 0x405395
push 4
mov edi, str.bytecode.cld
push edi
call dword [sym.imp.libav.dll_Ordinal_44340]
pop ecx
pop ecx
test eax, eax
jne 0x405425
push edi
call dword [sym.imp.MSVCR110.dll__unlink]
pop ecx
jmp 0x405425
push dword [esp + 0x8c]
mov edx, dword [esp + 0x20]
push ecx
push edi
lea eax, [esp + 0x3c]
push eax
push ecx
push dword [esp + 0x24]
lea eax, [esp + 0x2c]
push ecx
push esi
push eax
lea eax, [esp + 0x78]
push eax
mov ecx, str.safebrowsing
call fcn.0040422e
add esp, 0x28
cmp eax, 0x32
jg 0x405485
test eax, eax
push 1
pop eax
cmove ebx, eax
jmp 0x405359
push dword [esp + 0x8c]
mov edx, dword [esp + 0x20]
push ecx
push edi
lea eax, [esp + 0x3c]
push eax
push ecx
push dword [esp + 0x24]
lea eax, [esp + 0x2c]
push ecx
push esi
push eax
lea eax, [esp + 0x78]
push eax
mov ecx, str.bytecode
call fcn.0040422e
add esp, 0x28
cmp eax, 0x32
jg 0x405485
test eax, eax
push 1
pop eax
cmove ebx, eax
push str.ExtraDatabase
push esi
call ebp
mov edi, eax
pop ecx
cmp dword [edi + 0x18], 0
pop ecx
je 0x40522f
push dword [esp + 0x8c]
mov edx, dword [esp + 0x20]
push ecx
push dword [esp + 0x20]
lea eax, [esp + 0x3c]
push eax
push ecx
push dword [esp + 0x24]
lea eax, [esp + 0x2c]
push ecx
mov ecx, dword [edi + 8]
push esi
push eax
lea eax, [esp + 0x78]
push eax
call fcn.0040422e
add esp, 0x28
cmp eax, 0x32
jg 0x405485
mov edi, dword [edi + 0x28]
test eax, eax
push 1
pop eax
cmove ebx, eax
test edi, edi
jne 0x40543b
jmp 0x40522f
mov edi, eax
lea eax, [esp + 0x30]
push eax
call fcn.00405a77
pop ecx
lea ecx, [esp + 0x30]
call fcn.00405505
push 0x410580
call dword [sym.imp.libav.dll_Ordinal_44210]
pop ecx
mov eax, edi
jmp 0x4054ef
test ebx, ebx
je 0x4054ed
push str.HTTPProxyServer
push esi
call ebp
push str.NotifyClamd
push esi
call ebp
add esp, 0x10
cmp dword [eax + 0x1c], 0
je 0x4054d0
mov ecx, dword [eax + 8]
call fcn.004061e9
mov edi, str.OnUpdateExecute
push edi
push esi
call ebp
cmp dword [eax + 0x18], 0
pop ecx
pop ecx
je 0x4054ed
mov edx, dword [eax + 8]
push esi
mov ecx, edi
call fcn.0040105d
pop ecx
xor eax, eax
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407bf7
add esp, 0x78
ret