Function at 0x405270
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 0x4052e0
sub ecx, edx
cmp ecx, 0xff
jbe 0x405317
push 0x100
push str._DatabaseCustomURL:_URL_must_be_shorter_than__lu_n
call fcn.00409d50
add esp, 8
mov eax, 0x46
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a436
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 0x4055f2
push 0x100
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 0x40536d
push str._DatabaseCustomURL:_Incorrect_URL_n
jmp 0x405965
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 0x4055e8
mov ecx, edi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4053a0
sub ecx, edx
cmp ecx, 4
jb 0x4055e8
push str.HTTPProxyServer
push dword [ebp - 0x15c]
call sub.libav.dll_Ordinal_44283
add esp, 8
cmp dword [eax + 0x18], 0
je 0x405482
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 0x4053f2
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 0x405432
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 0x40545f
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 0x40544f
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x16c], eax
push esi
push str.Connecting_via__s_n
call fcn.00409d50
add esp, 8
jmp 0x405488
push str.HTTPProxyUsername_requires_HTTPProxyPassword_n
call fcn.00409d50
add esp, 4
mov eax, 0x38
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a436
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 0x4054a5
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 0x4054fd
push dword [ebp - 0x134]
lea eax, [ebp - 0x28]
push dword [ebp - 0x138]
push eax
call fcn.004023d0
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.00403b40
mov ebx, eax
add esp, 0x4c
cmp ebx, 1
jne 0x40559a
push edi
push str._s_is_up_to_date__version:_custom_database__n
call fcn.00409d50
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.0040a436
mov esp, ebp
pop ebp
ret
jle 0x405696
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.00409d50
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.0040a436
mov esp, ebp
pop ebp
ret
push str.DatabaseCustomURL:_Incorrect_URL_n
jmp 0x405965
push 7
push str.file:__
push esi
call ebx
add esp, 0xc
test eax, eax
jne 0x405960
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 0x4055e8
mov ecx, edi
inc edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405622
sub ecx, edx
cmp ecx, 5
jb 0x4055e8
push 0x413ba0
call sub.libav.dll_Ordinal_44203
mov esi, eax
add esp, 4
test esi, esi
je 0x405672
push edi
push str.Downloading__s____0____r
call fcn.00409d50
push esi
push ebx
call sub.libav.dll_Ordinal_44268
add esp, 0x10
cmp eax, 0xffffffff
jne 0x405688
push ebx
push str.DatabaseCustomURL:_Cant_copy_file__s_into_database_directory_n
call fcn.00409d50
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.0040a436
mov esp, ebp
pop ebp
ret
push edi
push str.Downloading__s__100____n
call fcn.00409d50
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 0x40582e
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4056b8
sub ecx, edx
cmp ecx, 4
jbe 0x40582e
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4056d0
sub ecx, edx
mov edx, edi
lea ebx, [edx + 1]
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x4056e0
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 0x405723
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.0040a436
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 0x405740
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 0x405754
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 0x4057be
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.00409d50
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.0040a436
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.004050c0
add esp, 0x18
test eax, eax
je 0x405824
push str._Failed_to_load_new_database_n
call fcn.00409d50
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.0040a436
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 0x40587b
push edi
call ebx
add esp, 4
test eax, eax
je 0x40587b
push edi
push str._Cant_unlink__s._Please_fix_the_problem_manually_and_try_again._n
call fcn.00409d50
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.0040a436
mov esp, ebp
pop ebp
ret
push edi
push esi
call dword [sym.imp.MSVCR110.dll_rename]
add esp, 8
cmp eax, 0xffffffff
jne 0x4058c8
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.00409d50
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.0040a436
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 0x405919
push str..cvd
push edi
call sub.libav.dll_Ordinal_44258
add esp, 8
test eax, eax
jne 0x405919
push str..cbc
push edi
call sub.libav.dll_Ordinal_44258
add esp, 8
test eax, eax
je 0x40590c
mov ebx, 1
jmp 0x405936
push edi
call fcn.004098d0
add esp, 4
mov ebx, eax
jmp 0x405936
push edi
call sub.libav.dll_Ordinal_3
add esp, 4
test eax, eax
je 0x405934
mov ebx, dword [eax + 8]
push eax
call sub.libav.dll_Ordinal_2
add esp, 4
jmp 0x405936
xor ebx, ebx
push ebx
push edi
push str._s_updated__version:_custom_database__sigs:__u__n
call fcn.00409d50
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.0040a436
mov esp, ebp
pop ebp
ret
push str._DatabaseCustomURL:_Not_supported_protocol_n
call fcn.00409d50
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop ebx
mov eax, 0x46
pop esi
call fcn.0040a436
mov esp, ebp
pop ebp
ret