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

Disassembly:
push 0xffffffffffffffff
push 0x43d6b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x10]
xor ebx, ebx
call sub.MFC42.DLL_CString::CString_4
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x48], ebx
cmp eax, 0xb
je 0x406631
cmp eax, 0x12
mov ebx, 7
je 0x406631
cmp eax, 0xc
je 0x406602
cmp eax, 0x13
je 0x406602
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffff6
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ecx, ebp
call fcn.00406880
lea ecx, [esp + 0x10]
mov esi, eax
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, esi
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, dword [ebp + 0xc]
add eax, ebx
mov dl, byte [eax + 3]
mov al, byte [eax + 4]
movsx ecx, dl
movsx esi, al
lea ecx, [ecx + ecx*4]
lea ecx, [esi + ecx*2 - 0x210]
mov esi, dword [0x45db60]
cmp esi, ecx
je 0x406697
movsx eax, al
movsx ecx, dl
push eax
lea edx, [ebx + 5]
push ecx
lea eax, [ebx + 4]
push edx
push eax
push esi
lea ecx, [esp + 0x24]
push str.Different:_week_is__02d_but_barcode__d__d_digit._were__c_c
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x1c
lea edx, [esp + 0x10]
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [0x48f9c8]
call fcn.00439080
mov eax, dword [ebp + 0xc]
xor edx, edx
mov esi, 0xa
mov cl, byte [ebx + eax + 2]
mov eax, dword [0x45db64]
div esi
movsx eax, cl
sub eax, 0x30
cmp edx, eax
je 0x406718
movsx ecx, cl
add ebx, 3
push ecx
push ebx
push edx
lea edx, [esp + 0x1c]
push str.Different:_year_is__d_but_barcode__d_digit._was__c
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x14
lea eax, [esp + 0x10]
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [0x48f9c8]
call fcn.00439080
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffffed
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ecx, ebp
call fcn.00409600
test al, al
jne 0x40674c
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffffb
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov edx, dword [ebp + 0xc]
lea ecx, [esp + 0x18]
lea esi, [ebx + edx]
mov edx, 4
lea eax, [esi + 0xa]
movsx edi, byte [eax]
sub edi, 0x30
dec eax
mov dword [ecx], edi
add ecx, 4
dec edx
jne 0x40675e
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
movsx eax, byte [esi + 5]
mov dword [0x45db50], eax
mov dword [0x45e350], eax
mov dword [0x45eb50], eax
mov eax, dword [ebp + 0xc]
movsx eax, byte [ebx + eax + 6]
mov dword [0x45db54], eax
mov dword [0x45e354], eax
mov dword [0x45eb54], eax
xor eax, eax
cmp eax, 9
mov dword [esp + 0x14], eax
jge 0x4067ec
mov edi, 9
lea ecx, [esp + 0x3c]
sub edi, eax
mov eax, dword [ecx]
lea edx, [eax + eax*4]
mov eax, dword [ecx - 4]
lea esi, [eax + edx*2]
mov eax, esi
cdq
and edx, 0xf
add eax, edx
sar eax, 4
and esi, 0x8000000f
mov dword [ecx], eax
jns 0x4067df
dec esi
or esi, 0xfffffff0
inc esi
mov dword [ecx - 4], esi
add ecx, 0xfffffffc
dec edi
jne 0x4067ba
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 9
mov dword [esp + 0x14], eax
jl 0x4067af
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
and edx, 0xf
shl ecx, 4
and ecx, 0xf0
or ecx, edx
mov dword [0x45db58], ecx
mov dword [0x45e358], ecx
mov dword [0x45eb58], ecx
mov ecx, dword [esp + 0x20]
shl eax, 4
and eax, 0xf0
and ecx, 0xf
or eax, ecx
inc ebx
push ebx
push 0xa
mov ecx, ebp
mov dword [0x45db5c], eax
mov dword [0x45e35c], eax
mov dword [0x45eb5c], eax
call fcn.00407490
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x3c
ret