Function at 0x405310
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x180
mov eax, dword [0x413080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x17c], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x15c], eax
mov eax, dword [ebp + 0x14]
mov ecx, esi
mov dword [ebp - 0x180], eax
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x164], 0
mov dword [ebp - 0x168], 0
mov dword [ebp - 0x174], 0
mov dword [ebp - 0x170], 0
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405380
sub ecx, edx
cmp ecx, 0xff
jbe 0x4053b7
push pe_nt_image_headers32
push str._DatabaseCustomURL:_URL_must_be_shorter_than__lu_n
call fcn.00409df0
add esp, 8
mov eax, 0x46
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [sym.imp.MSVCR110.dll__strnicmp]
push edi
push 7
push str.http:__
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x405692
push pe_nt_image_headers32
lea eax, [ebp - 0x128]
push esi
push eax
call dword [sym.imp.MSVCR110.dll_strncpy]
lea eax, [ebp - 0x121]
push 0x2f
push eax
mov byte [ebp - 0x29], 0
call dword [sym.imp.MSVCR110.dll_strchr]
mov ecx, eax
add esp, 0x14
test ecx, ecx
jne 0x40540d
push str._DatabaseCustomURL:_Incorrect_URL_n
jmp 0x405a05
lea edx, [ebp - 0x128]
mov eax, esi
sub eax, edx
inc eax
add eax, ecx
push 0x2f
push esi
mov byte [ecx], 0
mov dword [ebp - 0x160], eax
call dword [sym.imp.MSVCR110.dll_strrchr]
mov edi, eax
add esp, 8
inc edi
je 0x405688
mov ecx, edi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405440
sub ecx, edx
cmp ecx, 4
jb 0x405688
push str.HTTPProxyServer
push dword [ebp - 0x15c]
call sub.libav.dll_Ordinal_44283
add esp, 8
cmp dword [eax + 0x18], 0
je 0x405522
mov esi, dword [eax + 8]
push 7
push str.http:__
push esi
mov dword [ebp - 0x164], esi
call ebx
add esp, 0xc
test eax, eax
jne 0x405492
add esi, 7
mov dword [ebp - 0x164], esi
mov ebx, dword [ebp - 0x15c]
push str.HTTPProxyUsername
push ebx
call sub.libav.dll_Ordinal_44283
add esp, 8
cmp dword [eax + 0x18], 0
je 0x4054d2
mov eax, dword [eax + 8]
push str.HTTPProxyPassword
push ebx
mov dword [ebp - 0x168], eax
call sub.libav.dll_Ordinal_44283
add esp, 8
cmp dword [eax + 0x18], 0
je 0x4054ff
mov eax, dword [eax + 8]
mov dword [ebp - 0x174], eax
push str.HTTPProxyPort
push ebx
call sub.libav.dll_Ordinal_44283
add esp, 8
cmp dword [eax + 0x18], 0
je 0x4054ef
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x16c], eax
push esi
push str.Connecting_via__s_n
call fcn.00409df0
add esp, 8
jmp 0x405528
push str.HTTPProxyUsername_requires_HTTPProxyPassword_n
call fcn.00409df0
add esp, 4
mov eax, 0x38
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x15c]
push str.HTTPUserAgent
push ebx
call sub.libav.dll_Ordinal_44283
add esp, 8
cmp dword [eax + 0x18], 0
je 0x405545
mov eax, dword [eax + 8]
mov dword [ebp - 0x170], eax
push str.ConnectTimeout
push ebx
call sub.libav.dll_Ordinal_44283
mov ebx, dword [eax + 0x10]
push str.ReceiveTimeout
push dword [ebp - 0x15c]
call sub.libav.dll_Ordinal_44283
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x178], eax
lea eax, [ebp - 0x158]
push eax
push edi
mov byte [ebp - 0x28], 0
call sub.libav.dll_Ordinal_44339
add esp, 0x18
cmp eax, 0xffffffff
je 0x40559d
push dword [ebp - 0x134]
lea eax, [ebp - 0x28]
push dword [ebp - 0x138]
push eax
call fcn.00402470
add esp, 0xc
push 0x413ba0
call sub.libav.dll_Ordinal_44203
push 1
push dword [ebp - 0x15c]
xor ecx, ecx
cmp byte [ebp - 0x28], cl
mov esi, eax
lea eax, [ebp - 0x28]
cmove eax, ecx
push eax
push ecx
push dword [ebp + 0x18]
lea eax, [ebp - 0x121]
push ecx
push dword [ebp - 0x178]
push ebx
push dword [ebp - 0x170]
push dword [ebp - 0x174]
push dword [ebp - 0x168]
push dword [ebp - 0x16c]
push dword [ebp - 0x164]
push dword [ebp - 0x180]
push ecx
push eax
push esi
push dword [ebp - 0x160]
call fcn.00403be0
mov ebx, eax
add esp, 0x4c
cmp ebx, 1
jne 0x40563a
push edi
push str._s_is_up_to_date__version:_custom_database__n
call fcn.00409df0
push esi
call dword [sym.imp.MSVCR110.dll__unlink]
push esi
call dword [sym.imp.MSVCR110.dll_free]
add esp, 0x10
mov eax, ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
jle 0x405736
cmp dword [ebp + 0x18], 0
lea eax, [ebp - 0x121]
push eax
mov ecx, 0x21
mov eax, 0x5e
push edi
cmovne eax, ecx
push eax
push str._cCant_download__s_from__s_n
call fcn.00409df0
push esi
call dword [sym.imp.MSVCR110.dll__unlink]
push esi
call dword [sym.imp.MSVCR110.dll_free]
add esp, 0x18
mov eax, ebx
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
push str.DatabaseCustomURL:_Incorrect_URL_n
jmp 0x405a05
push 7
push str.file:__
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x405a00
lea ebx, [esi + 7]
push 0x5c
push ebx
call dword [sym.imp.MSVCR110.dll_strrchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x405688
mov ecx, edi
inc edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4056c2
sub ecx, edx
cmp ecx, 5
jb 0x405688
push 0x413ba0
call sub.libav.dll_Ordinal_44203
mov esi, eax
add esp, 4
test esi, esi
je 0x405712
push edi
push str.Downloading__s____0____r
call fcn.00409df0
push esi
push ebx
call sub.libav.dll_Ordinal_44268
add esp, 0x10
cmp eax, 0xffffffff
jne 0x405728
push ebx
push str.DatabaseCustomURL:_Cant_copy_file__s_into_database_directory_n
call fcn.00409df0
push esi
call dword [sym.imp.MSVCR110.dll_free]
add esp, 0xc
pop edi
pop ebx
mov eax, 0x46
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
push edi
push str.Downloading__s__100____n
call fcn.00409df0
add esp, 8
push str.TestDatabases
push dword [ebp - 0x15c]
call sub.libav.dll_Ordinal_44283
add esp, 8
cmp dword [eax + 0x18], 0
je 0x4058ce
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405758
sub ecx, edx
cmp ecx, 4
jbe 0x4058ce
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405770
sub ecx, edx
mov edx, edi
lea ebx, [edx + 1]
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x405780
sub edx, ebx
lea eax, [ecx + 1]
add eax, edx
push eax
call dword [sym.imp.MSVCR110.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4057c3
push esi
call dword [sym.imp.MSVCR110.dll__unlink]
push esi
call dword [sym.imp.MSVCR110.dll_free]
add esp, 8
lea eax, [ebx + 0x37]
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
push edi
push esi
push str._s_s
push ebx
call dword [sym.imp.MSVCR110.dll_sprintf]
mov ecx, esi
add esp, 0x10
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4057e0
sub ecx, edx
mov edx, edi
lea eax, [edx + 1]
mov dword [ebp - 0x160], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x4057f4
sub edx, dword [ebp - 0x160]
push ebx
push esi
lea eax, [edx + ecx]
mov byte [eax + ebx], 0
call dword [sym.imp.MSVCR110.dll_rename]
add esp, 8
cmp eax, 0xffffffff
jne 0x40585e
call dword [sym.imp.MSVCR110.dll__errno]
push dword [eax]
call sub.libav.dll_Ordinal_44341
push eax
push ebx
push esi
push str._Cant_rename__s_to__s:__s_n
call fcn.00409df0
push esi
call dword [sym.imp.MSVCR110.dll__unlink]
push esi
mov esi, dword [sym.imp.MSVCR110.dll_free]
call esi
push ebx
call esi
add esp, 0x20
mov eax, 0x39
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.MSVCR110.dll_free]
push str.Bytecode
push dword [ebp - 0x15c]
mov esi, ebx
mov dword [0x413004], 0
call sub.libav.dll_Ordinal_44283
mov eax, dword [eax + 0x18]
push eax
push edi
push ebx
call fcn.00405160
add esp, 0x18
test eax, eax
je 0x4058c4
push str._Failed_to_load_new_database_n
call fcn.00409df0
push ebx
call dword [sym.imp.MSVCR110.dll__unlink]
push ebx
call dword [sym.imp.MSVCR110.dll_free]
add esp, 0xc
mov eax, 0x37
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
mov dword [0x413004], 1
push 4
push edi
call sub.libav.dll_Ordinal_44340
mov ebx, dword [sym.imp.MSVCR110.dll__unlink]
add esp, 8
test eax, eax
jne 0x40591b
push edi
call ebx
add esp, 4
test eax, eax
je 0x40591b
push edi
push str._Cant_unlink__s._Please_fix_the_problem_manually_and_try_again._n
call fcn.00409df0
push esi
call ebx
push esi
call dword [sym.imp.MSVCR110.dll_free]
add esp, 0x10
mov eax, 0x35
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
push edi
push esi
call dword [sym.imp.MSVCR110.dll_rename]
add esp, 8
cmp eax, 0xffffffff
jne 0x405968
call dword [sym.imp.MSVCR110.dll__errno]
push dword [eax]
call sub.libav.dll_Ordinal_44341
push eax
push edi
push esi
push str._Cant_rename__s_to__s:__s_n
call fcn.00409df0
push esi
call ebx
push esi
call dword [sym.imp.MSVCR110.dll_free]
add esp, 0x1c
mov eax, 0x39
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.MSVCR110.dll_free]
push str..cld
push edi
call sub.libav.dll_Ordinal_44258
add esp, 0xc
test eax, eax
jne 0x4059b9
push str..cvd
push edi
call sub.libav.dll_Ordinal_44258
add esp, 8
test eax, eax
jne 0x4059b9
push str..cbc
push edi
call sub.libav.dll_Ordinal_44258
add esp, 8
test eax, eax
je 0x4059ac
mov ebx, 1
jmp 0x4059d6
push edi
call fcn.00409970
add esp, 4
mov ebx, eax
jmp 0x4059d6
push edi
call sub.libav.dll_Ordinal_3
add esp, 4
test eax, eax
je 0x4059d4
mov ebx, dword [eax + 8]
push eax
call sub.libav.dll_Ordinal_2
add esp, 4
jmp 0x4059d6
xor ebx, ebx
push ebx
push edi
push str._s_updated__version:_custom_database__sigs:__u__n
call fcn.00409df0
mov eax, dword [ebp - 0x17c]
add esp, 0xc
add dword [eax], ebx
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret
push str._DatabaseCustomURL:_Not_supported_protocol_n
call fcn.00409df0
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop ebx
mov eax, 0x46
pop esi
call fcn.0040a4d6
mov esp, ebp
pop ebp
ret