Function at 0x409190
Capabilities:
Validate payment card number using luhn algorithm

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x710
mov eax, dword [0x43c040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x70c], edx
mov dword [ebp - 0x708], ecx
mov dword [ebp - 0x710], ebx
push esi
push edi
test ebx, ebx
je 0x4099c4
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
push 0x434c20
push edx
call edi
mov esi, eax
test esi, esi
je 0x40950e
push 0x434c38
add esi, 0x16
push esi
call edi
test eax, eax
je 0x409391
lea eax, [ebx + 0x10]
mov dword [ebx + 0x490], eax
lea eax, [ebx + 0x110]
push 0x25
push esi
mov dword [ebx + 0x494], eax
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov edi, eax
test edi, edi
je 0x4092ed
xor ecx, ecx
mov edx, esi
cmp esi, edi
je 0x4092ed
movzx eax, word [edx]
cmp eax, 0x30
jb 0x40922f
cmp eax, 0x39
jbe 0x409238
cmp eax, 0x2e
je 0x409238
xor ecx, ecx
jmp 0x40923d
test ecx, ecx
cmove ecx, edx
add edx, 2
cmp edx, edi
jne 0x409222
test ecx, ecx
je 0x4092ed
sub edi, ecx
add edi, 2
sar edi, 1
cmp edi, 1
jle 0x4092ed
lea eax, [edi + 1]
push eax
push ecx
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov edi, dword [ebp - 0x708]
cmp dword [edi + 0xa36c], 0
jne 0x409291
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
cmp eax, 0x64
ja 0x4092f3
mov dword [edi + 0xa368], eax
jmp 0x4092f3
push 0x20
push 0
lea eax, [ebx + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
mov edi, eax
mov ecx, edi
add edi, 2
test ecx, ecx
je 0x4092ed
push edi
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
push 0x2f
push edi
mov dword [ebp - 0x710], eax
call dword [sym.imp.SHLWAPI.dll_StrChrW]
test eax, eax
je 0x4092ed
lea ecx, [eax + 2]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
mov edi, dword [ebp - 0x708]
mov ecx, eax
test ecx, ecx
jle 0x4092f3
imul eax, dword [ebp - 0x710], 0x64
xor edx, edx
div ecx
mov dword [edi + 0xa368], eax
jmp 0x4092f3
mov edi, dword [ebp - 0x708]
cmp word [ebx + 0x390], 0
push ecx
push esi
push ecx
jne 0x409315
lea ecx, [ebx + 0x110]
mov edx, 0x80
call fcn.00401190
jmp 0x40992a
mov edx, 0x100
lea ecx, [ebp - 0x304]
call fcn.00401190
lea eax, [ebx + 0x390]
mov edx, 0x434c40
push eax
lea ecx, [ebp - 0x304]
call fcn.0040ec90
lea eax, [ebx + 0x3d0]
mov edx, 0x434c48
push eax
lea ecx, [ebp - 0x304]
call fcn.0040ec90
lea eax, [ebx + 0x410]
mov edx, 0x434c50
push eax
lea ecx, [ebp - 0x304]
call fcn.0040ec90
lea eax, [ebx + 0x450]
mov edx, 0x434c58
push eax
lea ecx, [ebp - 0x304]
call fcn.0040ec90
add esp, 0xc
lea eax, [ebp - 0x304]
push eax
push ecx
jmp 0x409300
push str.Destination:
push esi
call edi
mov dword [ebp - 0x710], eax
test eax, eax
je 0x4093e5
push str.Destination:
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x710]
mov edx, 0x104
mov ebx, dword [ebp - 0x708]
push ecx
add ebx, 0x328
lea eax, [ecx + eax*2]
push eax
push ecx
mov ecx, ebx
call fcn.00401190
push ebx
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
jmp 0x4099c4
push str.has_already_been_downloaded
push esi
call edi
test eax, eax
je 0x409475
sub eax, esi
sar eax, 1
cmp eax, 0x7ffffffe
jbe 0x40940b
xor eax, eax
mov word [ebp - 0x30c], ax
jmp 0x409448
lea ecx, [ebp - 0x30c]
mov edx, 0x104
lea edi, [eax - 0x104]
mov eax, ecx
sub esi, eax
lea eax, [edx + edi]
test eax, eax
je 0x40943b
movzx eax, word [ecx + esi]
test ax, ax
je 0x40943b
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x409420
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov esi, dword [ebp - 0x708]
lea eax, [ebp - 0x30c]
push ecx
push eax
push ecx
add esi, 0x328
mov edx, 0x104
mov ecx, esi
call fcn.00401190
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
jmp 0x4099c4
push str.Downloading_video
push esi
call edi
test eax, eax
je 0x409924
push ecx
lea esi, [ebx + 0x10]
mov dword [ebx + 0x494], 0
mov dword [ebx + 0x490], esi
cmp word [ebx + 0x390], 0
push eax
push ecx
jne 0x4094b6
mov edx, 0x80
mov ecx, esi
call fcn.00401190
jmp 0x409924
mov edx, 0x100
lea ecx, [ebp - 0x304]
call fcn.00401190
lea eax, [ebx + 0x310]
mov edx, str.Downloading_video
push eax
lea ecx, [ebp - 0x304]
call fcn.0040ec90
push 0x434cd8
mov edx, 0x434cdc
lea ecx, [ebp - 0x304]
call fcn.0040ec90
add esp, 4
lea eax, [ebp - 0x304]
mov edx, 0x80
push eax
push ecx
mov ecx, esi
call fcn.00401190
jmp 0x409924
mov esi, dword [ebp - 0x70c]
push str._hlsnative_
push esi
call edi
test eax, eax
je 0x40962b
push 0x2f
push 0
mov esi, eax
push esi
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
test eax, eax
je 0x409924
cmp eax, esi
je 0x409924
xor ecx, ecx
cmp word [eax + 2], 0x20
sete cl
lea edi, [ecx*2 + 2]
lea ecx, [eax - 2]
add edi, eax
cmp word [ecx], 0x20
jne 0x409564
cmp ecx, esi
je 0x409589
sub ecx, 2
cmp ecx, esi
je 0x409589
nop dword [eax + eax]
mov ax, word [ecx]
sub ax, 0x30
cmp ax, 9
ja 0x409586
sub ecx, 2
cmp ecx, esi
jne 0x409570
jmp 0x409589
add ecx, 2
mov ax, word [ecx]
sub ax, 0x30
cmp ax, 9
ja 0x409924
mov ax, word [edi]
sub ax, 0x30
cmp ax, 9
ja 0x409924
mov esi, dword [sym.imp.SHLWAPI.dll_StrToIntW]
push ecx
call esi
push edi
mov dword [ebp - 0x70c], eax
call esi
mov ecx, eax
test ecx, ecx
je 0x409924
push 0xa
push 0x40
lea eax, [ebp - 0x104]
xor edx, edx
push eax
imul eax, dword [ebp - 0x70c], 0x64
div ecx
movzx eax, ax
push eax
call fcn.0041eff8
add esp, 0x10
lea ecx, [ebp - 0x104]
mov edx, 0x40
push 0x434c1c
call fcn.00402a90
lea ecx, [ebx + 0x110]
mov edx, 0x80
lea eax, [ebx + 0x10]
mov dword [ebx + 0x494], ecx
mov dword [ebx + 0x490], eax
lea eax, [ebp - 0x104]
push ecx
push eax
push ecx
call fcn.00401190
jmp 0x409924
push str._ffmpeg_
push esi
call edi
test eax, eax
jne 0x4098a1
push str._merger_
push esi
call edi
test eax, eax
jne 0x4098a1
push str._ExtractAudio_
push esi
call edi
test eax, eax
jne 0x4098a1
push 0x434d74
push esi
call edi
test eax, eax
je 0x409829
cmp dword [ebx + 8], 0
je 0x40975b
mov esi, dword [sym.imp.SHLWAPI.dll_StrToIntW]
lea ebx, [eax + 0xa]
push ebx
call esi
add ebx, 6
movzx edi, ax
push ebx
call esi
movzx eax, ax
mov dword [ebp - 0x70c], eax
lea eax, [ebx + 6]
push eax
call esi
movzx edx, ax
mov eax, edi
mov ecx, edi
mov ebx, dword [ebp - 0x710]
shl ecx, 4
sub ecx, eax
mov edi, dword [ebp - 0x708]
mov eax, dword [ebp - 0x70c]
movzx eax, ax
push 0xa
push 0x40
lea eax, [eax + ecx*4]
mov ecx, eax
shl ecx, 4
sub ecx, eax
lea eax, [edx + ecx*4]
xor edx, edx
imul eax, eax, 0x64
lea ecx, [ebp - 0x84]
push ecx
div dword [ebx + 8]
push eax
mov dword [edi + 0xa368], eax
call fcn.0041eff8
add esp, 0x10
lea eax, [ebp - 0x84]
mov ecx, 0x40
cmp word [eax], 0
je 0x409702
add eax, 2
sub ecx, 1
jne 0x4096f4
mov edx, 0x40
mov esi, ecx
mov eax, edx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x40972e
push ecx
push 0x434c1c
push ecx
lea ecx, [ebp - 0x84]
sub edx, esi
lea ecx, [ecx + esi*2]
call fcn.00401190
lea ecx, [ebx + 0x110]
mov edx, 0x80
lea eax, [ebx + 0x10]
mov dword [ebx + 0x494], ecx
mov dword [ebx + 0x490], eax
lea eax, [ebp - 0x84]
push ecx
push eax
push ecx
call fcn.00401190
jmp 0x40992a
push ecx
push esi
push ecx
mov edx, 0x100
lea ecx, [ebp - 0x704]
call fcn.00401190
movzx edx, word [ebp - 0x704]
lea esi, [ebp - 0x504]
xor eax, eax
lea ecx, [ebp - 0x704]
mov word [ebp - 0x504], ax
mov eax, edx
test ax, ax
je 0x4097ca
mov edi, edx
cmp di, 0x20
jne 0x4097b4
cmp dx, di
je 0x4097bc
lea eax, [ebp - 0x704]
mov edx, 0x20
cmp ecx, eax
je 0x4097b4
cmp word [ecx - 2], 0x3d
je 0x4097bc
xor edx, edx
mov word [esi], di
add esi, 2
movzx eax, word [ecx + 2]
add ecx, 2
mov edi, eax
test ax, ax
jne 0x409793
xor eax, eax
mov edx, 0x100
push ecx
mov word [esi], ax
lea eax, [ebp - 0x504]
push eax
push ecx
lea ecx, [ebp - 0x704]
call fcn.00401190
push 0x4343b0
mov edx, str._q_1.0
lea ecx, [ebp - 0x704]
call fcn.0040ec90
lea eax, [ebx + 0x10]
mov edx, 0x80
mov dword [ebx + 0x490], eax
lea ecx, [ebx + 0x110]
lea eax, [ebp - 0x704]
mov dword [ebx + 0x494], ecx
push eax
push ecx
call fcn.00401190
jmp 0x409924
push str.Duration:
push esi
call edi
test eax, eax
je 0x409924
mov esi, dword [sym.imp.SHLWAPI.dll_StrToIntW]
lea ebx, [eax + 0x14]
push ebx
call esi
add ebx, 6
movzx edi, ax
push ebx
call esi
movzx eax, ax
mov dword [ebp - 0x70c], eax
lea eax, [ebx + 6]
push eax
call esi
movzx edx, ax
mov eax, edi
mov ecx, edi
mov ebx, dword [ebp - 0x710]
mov edi, dword [ebp - 0x708]
shl ecx, 4
sub ecx, eax
mov eax, dword [ebp - 0x70c]
movzx eax, ax
lea ecx, [eax + ecx*4]
mov eax, ecx
shl eax, 4
sub eax, ecx
lea eax, [edx + eax*4]
test eax, eax
je 0x40992a
mov dword [ebx + 8], eax
mov dword [edi + 0x1754], eax
jmp 0x40992a
push str.Destination:
push esi
call edi
mov dword [ebp - 0x70c], eax
test eax, eax
je 0x4098c9
push str.Destination:
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x70c]
lea eax, [ecx + eax*2]
jmp 0x4098e5
push str.Merging_formats_into
push esi
call edi
mov esi, eax
test esi, esi
je 0x40990e
push str.Merging_formats_into
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esi + eax*2]
mov esi, dword [ebp - 0x708]
mov edx, 0x104
push ecx
push eax
push ecx
add esi, 0x328
mov ecx, esi
call fcn.00401190
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
lea eax, [ebx + 0x210]
mov dword [ebx + 0x494], 0
mov dword [ebx + 0x490], eax
mov edi, dword [ebp - 0x708]
push ecx
push dword [ebx + 0x490]
add edi, 0x1330
mov edx, 0x100
push ecx
mov ecx, edi
call fcn.00401190
cmp dword [ebx + 0x494], 0
je 0x4099c4
mov ecx, 0x100
mov eax, edi
cmp word [eax], 0
je 0x409962
add eax, 2
sub ecx, 1
jne 0x409954
mov edx, 0x100
mov esi, ecx
mov eax, edx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x40998d
push ecx
push 0x4343b0
push ecx
sub edx, esi
lea ecx, [edi + esi*2]
call fcn.00401190
mov edx, 0x100
mov ecx, 0x100
mov eax, edi
cmp word [eax], 0
je 0x4099a2
add eax, 2
sub ecx, 1
jne 0x409994
mov eax, edx
mov esi, ecx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x4099c4
push ecx
push dword [ebx + 0x494]
sub edx, esi
push ecx
lea ecx, [edi + esi*2]
call fcn.00401190
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041bbdc
mov esp, ebp
pop ebp
ret 0xc