Function at 0x40a8c0
Capabilities:
Delete file
Get common file path
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x122c
call fcn.0042d8f0
mov eax, dword [0x43c040]
xor eax, esp
mov dword [esp + 0x1228], eax
push ebx
push esi
push edi
mov edi, ecx
push 0x200
push 0
lea eax, [edi + 0x1530]
push eax
call fcn.0041d2c0
mov ebx, dword [sym.imp.USER32.dll_PostMessageW]
add esp, 0xc
push 0
push 0
push 0x8008
push dword [edi + 8]
call ebx
push 0x100000
push 8
push dword [edi + 0x1c]
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x30], 0x100000
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40aed5
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x28]
push str.dlnowjson
push eax
call ebx
lea eax, [edi + 0xa0]
push eax
lea eax, [esp + 0x2c]
push eax
call ebx
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40aa29
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40aa1c
test ebx, ebx
je 0x40aa1c
push 0
push 0
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40a9d3
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call eax
jmp 0x40aa23
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push dword [esp + 0x14]
mov dword [esp + 0x14], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x10]
test esi, esi
je 0x40aa23
sub esp, 8
lea eax, [esp + 0x20]
mov edx, esi
push eax
push ecx
push ebx
mov ecx, edi
call fcn.00409020
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x40aa23
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp dword [edi + 0xa364], 0
jne 0x40aec0
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x230]
push 0x800
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.binyoutube_dl.exe
lea eax, [esp + 0x234]
push eax
call ebx
lea eax, [esp + 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
mov ecx, 0x800
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40aab5
add eax, 2
sub ecx, 1
jne 0x40aaa7
mov esi, 0x800
mov ebx, ecx
mov eax, esi
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40aae4
push ecx
push str.__j__i
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
cmp word [edi + 0x530], 0
lea edx, [edi + 0x530]
je 0x40ab7c
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40ab0f
add eax, 2
sub ecx, 1
jne 0x40ab01
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40ab3f
push ecx
push str.___proxy
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
lea edx, [edi + 0x530]
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40ab56
add eax, 2
sub ecx, 1
jne 0x40ab48
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40ab7c
push ecx
push edx
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
cmp word [edi + 0xf30], 0
lea edx, [edi + 0xf30]
je 0x40ac81
cmp word [edi + 0x1130], 0
je 0x40ad1a
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40abb5
add eax, 2
sub ecx, 1
jne 0x40aba7
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40abe5
push ecx
push 0x434ecc
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
lea edx, [edi + 0xf30]
mov ecx, esi
lea eax, [esp + 0x230]
nop
cmp word [eax], 0
je 0x40abfe
add eax, 2
sub ecx, 1
jne 0x40abf0
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40ac24
push ecx
push edx
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
mov ecx, esi
lea eax, [esp + 0x230]
nop dword [eax]
cmp word [eax], 0
je 0x40ac3e
add eax, 2
sub ecx, 1
jne 0x40ac30
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40ac68
push ecx
push 0x434ed8
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40acee
add eax, 2
sub ecx, 1
jne 0x40ac71
jmp 0x40acee
cmp word [edi + 0x1130], 0
je 0x40ad1a
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40aca6
add eax, 2
sub ecx, 1
jne 0x40ac98
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40acd0
push ecx
push str.___video_password
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
mov ecx, esi
lea eax, [esp + 0x230]
nop dword [eax]
cmp word [eax], 0
je 0x40acee
add eax, 2
sub ecx, 1
jne 0x40ace0
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40ad1a
push ecx
lea eax, [edi + 0x1130]
mov edx, esi
push eax
push ecx
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
cmp word [edi + 0x730], 0
je 0x40adac
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40ad3f
add eax, 2
sub ecx, 1
jne 0x40ad31
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40ad69
push ecx
push 0x4343b0
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40ad80
add eax, 2
sub ecx, 1
jne 0x40ad72
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40adac
push ecx
lea eax, [edi + 0x730]
mov edx, esi
push eax
push ecx
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40adc3
add eax, 2
sub ecx, 1
jne 0x40adb5
mov eax, esi
mov ebx, ecx
sub eax, ecx
neg ebx
sbb ebx, ebx
and ebx, eax
test ecx, ecx
je 0x40aded
push ecx
push 0x4343b0
push ecx
mov edx, esi
lea ecx, [esp + 0x23c]
sub edx, ebx
lea ecx, [ecx + ebx*2]
call fcn.00401190
mov ecx, esi
lea eax, [esp + 0x230]
cmp word [eax], 0
je 0x40ae04
add eax, 2
sub ecx, 1
jne 0x40adf6
mov eax, esi
mov edx, ecx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
test ecx, ecx
je 0x40ae2f
push ecx
push dword [edi + 0x98]
sub esi, edx
push ecx
lea ecx, [esp + 0x23c]
lea ecx, [ecx + edx*2]
mov edx, esi
call fcn.00401190
lea esi, [edi + 0x38]
mov edx, 0x402ca0
push esi
sub esp, 8
lea eax, [esp + 0x24]
push edi
push ecx
push eax
lea ecx, [esp + 0x248]
call fcn.00410340
mov ebx, eax
mov dword [esi], 0
mov eax, dword [esp + 0x28]
add esp, 0x18
cmp eax, 0xffffffff
je 0x40ae69
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi + 0xa374], 0
jne 0x40aeb5
test ebx, ebx
je 0x40aeb5
mov eax, dword [edi + 0xa364]
test eax, eax
je 0x40aeb5
mov ecx, dword [edi + 0xa36c]
test ecx, ecx
je 0x40ae8e
cmp eax, ecx
jne 0x40aeb5
cmp dword [edi + 0x1748], 0
jne 0x40aeb5
cmp dword [edi + 0x1754], 0
jne 0x40aec0
push str.:stream
push dword [edi + 0x1738]
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x40aec0
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x1c]
push 0
push dword [edi + 0x1c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [sym.imp.USER32.dll_PostMessageW]
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi + 0xa374], 0
mov dword [edi + 0x20], 0
jne 0x40aefc
push 0
push 2
push 0x8008
push dword [edi + 8]
call ebx
mov ecx, dword [esp + 0x1234]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041bbdc
mov esp, ebp
pop ebp
ret