Function at 0x405780
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x98
mov eax, dword [0x40f1f4]
xor eax, esp
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xa0]
push ebx
push ebp
push esi
mov esi, dword [esp + 0xa8]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x18]
mov ebx, dword [esi + 0xc]
push edi
push dword [esi + 0x38]
mov edi, dword [esi + 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], 0
mov ebp, 0xc
mov dword [esp + 0x34], 0
call fcn.00406ef0
add esp, 4
test eax, eax
je 0x405812
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je case.0x405872.6
push eax
call dword [sym.imp.MSVCR110.dll__close]
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0xa4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00408f44
add esp, 0x98
ret
push dword [esp + 0x1c]
call fcn.004077a0
push 0x40
lea eax, [esp + 0x3c]
push 0
push eax
mov dword [esp + 0x3c], eax
call sub.MSVCR110.dll_memset
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 4]
mov dword [esp + 0x5c], eax
mov eax, dword [esi + 0x38]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x70], eax
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x78], eax
mov eax, dword [esi]
add eax, 0xfffffffb
add esp, 0x10
mov dword [esp + 0x38], ebx
mov dword [esp + 0x50], esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x54], ecx
cmp eax, 0x10
ja case.0x405872.6
jmp dword [eax*4 + 0x405cd4]
push str.SCAN
push 0
call fcn.004077d0
jmp 0x405b63
push str.SCANH
push 0
call fcn.004077d0
jmp 0x405b63
lea eax, [esp + 0x74]
push eax
push ecx
call sub.libav.dll_Ordinal_44339
add esp, 8
test eax, eax
jne 0x4058d0
test dword [esp + 0x7a], 0x4000
jne 0x4058d0
push str.CONTSCAN
push 0
call fcn.004077d0
add esp, 8
mov ebx, 1
jmp 0x405b68
push dword [esi + 0x2c]
call sub.libav.dll_Ordinal_44297
mov ecx, dword [esi + 0x2c]
add esp, 4
mov eax, dword [ecx + 0x2c]
inc eax
cmp eax, dword [ecx + 0x1c]
jge 0x4058ec
mov dword [ecx + 0x2c], eax
jmp 0x4058f4
mov dword [esp + 0x18], 0xffffffff
push dword [esi + 0x2c]
call sub.libav.dll_Ordinal_44298
add esp, 4
cmp dword [esp + 0x18], 0
je 0x405921
push str.ERROR
push str.Not_enough_threads_for_multiscan._Increase_MaxThreads.
push dword [esi + 4]
push esi
call fcn.00405d20
add esp, 0x10
jmp case.0x405872.6
push str.MULTISCAN
push 0
mov ebp, 8
call fcn.004077d0
add esp, 8
lea ebx, [ebp - 6]
call fcn.00406f40
mov dword [esp + 0x30], eax
mov dword [esp + 0x6c], eax
test eax, eax
jne 0x405b68
push str.ExitOnOOM
push edi
call fcn.00408060
xor ecx, ecx
add esp, 8
cmp dword [eax + 0x18], ecx
sete cl
lea eax, [ecx*2 - 1]
jmp 0x4057f9
push str.MULTISCANFILE
push 0
call fcn.004077d0
mov eax, dword [esi + 4]
lea ecx, [esp + 0x34]
push ecx
push 0
push eax
push eax
push 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x84], 0
call fcn.00402c90
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x5c]
add esp, 0x1c
mov dword [esi + 4], 0
mov dword [edi], ecx
cmp eax, 0x16
jne 0x4059d2
push dword [esi + 0x38]
call fcn.00406fc0
jmp 0x4057f1
mov ecx, dword [esp + 0x44]
xor eax, eax
test ecx, ecx
cmovg eax, ecx
jmp 0x4057f9
push str.FILDES
push 0
call fcn.004077d0
push str.FILDES_support_not_compiled_in.
push esi
call fcn.00405e20
push dword [esi + 8]
call dword [sym.imp.MSVCR110.dll__close]
add esp, 0x14
xor eax, eax
jmp 0x4057f9
push str.STATS
push 0
call fcn.004077d0
add esp, 8
cmp dword [esi + 0x38], 0
je 0x405a32
push dword [esi + 0x30]
push str._u:
push ebx
call fcn.00408810
add esp, 0xc
movzx eax, byte [esi + 0x28]
push eax
push ebx
call fcn.00407490
add esp, 8
xor eax, eax
jmp 0x4057f9
push str.STREAM
push 0
call fcn.004077d0
movzx eax, byte [esi + 0x28]
push eax
push edi
push dword [esp + 0x34]
push dword [esp + 0x30]
push 0
push ebx
call fcn.004035f0
add esp, 0x20
cmp eax, 1
jne 0x405a7e
mov edi, dword [esp + 0x10]
mov dword [edi], eax
xor eax, eax
jmp 0x4057f9
cmp eax, 0x14
jne 0x405a05
jmp 0x40594d
push str.INSTREAM
push 0
call fcn.004077d0
push 1
push ebx
push edi
push dword [esp + 0x38]
push dword [esp + 0x34]
push 0
push esi
call fcn.00403390
add esp, 0x24
cmp eax, 1
jne 0x405ae5
mov edi, dword [esp + 0x10]
mov dword [edi], eax
xor ebx, ebx
push 0
push dword [esi + 8]
call dword [sym.imp.MSVCR110.dll__chsize]
push dword [esi + 8]
call dword [sym.imp.MSVCR110.dll__close]
push dword [esi + 4]
mov dword [esi + 8], 0xffffffff
call sub.libav.dll_Ordinal_44219
add esp, 0x10
mov eax, ebx
jmp 0x4057f9
cmp eax, 0x14
jne 0x405b09
push str.ExitOnOOM
push edi
call fcn.00408060
xor ebx, ebx
add esp, 8
cmp dword [eax + 0x18], ebx
sete bl
lea ebx, [ebx*2 - 1]
jmp 0x405ab8
cmp eax, 0x15
jne 0x405ab6
push dword [esi + 0x38]
call fcn.00406fc0
add esp, 4
mov ebx, 1
jmp 0x405ab8
push str.AllowAllMatchScan
push edi
call fcn.00408060
add esp, 8
cmp dword [eax + 0x18], 0
jne 0x405b4f
push str.ERROR
push str.ALLMATCHSCAN_command_disabled_by_clamd_configuration.
push dword [esi + 4]
push esi
call fcn.00405d20
add esp, 0x10
jmp case.0x405872.6
push str.ALLMATCHSCAN
push 0
call fcn.004077d0
or dword [esp + 0x64], 0x200000
add esp, 8
xor ebx, ebx
push str.MaxDirectoryRecursion
push edi
mov dword [esp + 0x44], ebx
call fcn.00408060
mov eax, dword [eax + 0x10]
push str.FollowDirectorySymlinks
push edi
mov dword [esp + 0x28], eax
call fcn.00408060
add esp, 0x10
cmp dword [eax + 0x18], 0
je 0x405b95
or ebp, 2
push str.FollowFileSymlinks
push edi
call fcn.00408060
add esp, 8
cmp dword [eax + 0x18], 0
je 0x405bac
or ebp, 1
push str.CrossFilesystems
push edi
call fcn.00408060
add esp, 8
cmp dword [eax + 0x18], 0
jne 0x405bdf
lea eax, [esp + 0x74]
push eax
push dword [esi + 4]
call sub.libav.dll_Ordinal_44339
mov ecx, dword [esp + 0x78]
add esp, 8
test eax, eax
cmove ecx, dword [esp + 0x74]
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x18]
push 0x4032c0
lea eax, [esp + 0x30]
push eax
test ecx, ecx
push fcn.00402c90
mov eax, Ordinal_2
cmovne eax, ecx
push eax
push ebp
push dword [esi + 4]
call sub.libav.dll_Ordinal_44221
mov ebp, eax
add esp, 0x18
cmp ebp, 0x14
je 0x40594d
cmp dword [esp + 0x6c], 0
je 0x405c5f
cmp ebx, 2
jne 0x405c5f
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x3c]
call fcn.00406ff0
push dword [esi + 0x2c]
call sub.libav.dll_Ordinal_44297
mov eax, dword [esi + 0x2c]
dec dword [eax + 0x2c]
push dword [esi + 0x2c]
call sub.libav.dll_Ordinal_44298
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x38]
add esp, 0x18
jmp 0x405c7b
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
mov edi, ecx
sub edi, edx
sub edi, dword [esp + 0x40]
mov dword [esp + 0x14], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], edi
lea eax, [edi + edx]
cmp eax, ecx
jne 0x405cae
cmp edx, ecx
je 0x405cae
push 0x40be3c
push dword [esi + 4]
push esi
call fcn.00405e60
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x2c]
add esp, 0xc
mov ecx, 0x15
cmp eax, 0xffffffff
cmove ebp, ecx
mov ecx, dword [esp + 0x28]
sub ecx, edi
mov edi, dword [esp + 0x10]
sub ecx, edx
mov dword [edi], ecx
cmp ebp, 0x15
jne 0x405ccc
push dword [esi + 0x38]
call fcn.00406fc0
mov edx, dword [esp + 0x18]
add esp, 4
mov eax, edx
jmp 0x4057f9