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

Disassembly:
sub esp, 0x3c
mov eax, dword [esp + 0x40]
xor edx, edx
mov dword [esp + 0x10], edx
mov dword [esp + 4], edx
mov dword [esp + 0xc], edx
mov dword [esp], edx
mov dword [esp + 8], edx
cmp eax, edx
je 0x100138cc
mov ecx, dword [eax]
cmp ecx, edx
je 0x100138cc
mov eax, dword [eax + 4]
cmp eax, 0xa
push esi
lea esi, [eax + ecx]
mov dword [esp + 0x44], esi
jge 0x100134a4
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0x16
or eax, 0xffffffff
or edx, eax
pop esi
add esp, 0x3c
ret
xor eax, eax
push ebx
push ebp
push edi
mov ebx, eax
mov edi, eax
mov esi, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
movzx eax, byte [ecx]
lea ebp, [eax - 0x30]
cmp ebp, 9
ja case.0x10013603.44
lea edx, [edx + edx*4]
lea eax, [eax + edx*2 - 0x30]
inc ecx
mov dword [esp + 0x3c], eax
movzx edx, byte [ecx]
lea ebp, [edx - 0x30]
cmp ebp, 9
ja case.0x10013603.44
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x30]
inc ecx
mov dword [esp + 0x3c], eax
movzx edx, byte [ecx]
lea ebp, [edx - 0x30]
cmp ebp, 9
ja case.0x10013603.44
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x30]
inc ecx
mov dword [esp + 0x3c], eax
movzx edx, byte [ecx]
lea ebp, [edx - 0x30]
cmp ebp, 9
ja case.0x10013603.44
lea eax, [eax + eax*4]
lea edx, [edx + eax*2 - 0x30]
inc ecx
mov dword [esp + 0x3c], edx
movzx eax, byte [ecx]
lea edx, [eax - 0x30]
cmp edx, 9
ja case.0x10013603.44
lea edx, [esi + esi*4]
lea eax, [eax + edx*2 - 0x30]
inc ecx
mov dword [esp + 0x38], eax
movzx edx, byte [ecx]
lea esi, [edx - 0x30]
cmp esi, 9
ja case.0x10013603.44
lea eax, [eax + eax*4]
lea edx, [edx + eax*2 - 0x30]
inc ecx
mov dword [esp + 0x38], edx
movzx eax, byte [ecx]
lea edx, [eax - 0x30]
cmp edx, 9
ja case.0x10013603.44
lea edx, [edi + edi*4]
lea eax, [eax + edx*2 - 0x30]
inc ecx
mov dword [esp + 0x34], eax
movzx edx, byte [ecx]
lea esi, [edx - 0x30]
cmp esi, 9
ja case.0x10013603.44
lea eax, [eax + eax*4]
lea edx, [edx + eax*2 - 0x30]
inc ecx
mov dword [esp + 0x34], edx
movzx eax, byte [ecx]
lea edx, [eax - 0x30]
cmp edx, 9
ja case.0x10013603.44
lea edx, [ebx + ebx*4]
lea edx, [eax + edx*2 - 0x30]
inc ecx
mov dword [esp + 0x30], edx
movzx eax, byte [ecx]
lea esi, [eax - 0x30]
cmp esi, 9
ja case.0x10013603.44
mov edi, dword [esp + 0x50]
lea edx, [edx + edx*4]
inc ecx
lea ebx, [eax + edx*2 - 0x30]
mov dword [esp + 0x30], ebx
cmp ecx, edi
je 0x100137cc
movzx eax, byte [ecx]
lea edx, [eax - 0x2b]
cmp edx, 0x2f
ja case.0x10013603.44
movzx edx, byte [edx + 0x100138f4]
jmp dword [edx*4 + 0x100138e4]
add eax, 0xffffffd0
inc ecx
mov dword [esp + 0x2c], eax
cmp ecx, edi
je case.0x10013603.44
movzx edx, byte [ecx]
lea esi, [edx - 0x30]
cmp esi, 9
ja case.0x10013603.44
lea eax, [eax + eax*4]
inc ecx
lea edx, [edx + eax*2 - 0x30]
mov dword [esp + 0x2c], edx
cmp ecx, edi
je 0x100137cc
movzx eax, byte [ecx]
lea edx, [eax - 0x2b]
cmp edx, 0x2f
ja case.0x10013603.44
movzx edx, byte [edx + 0x10013934]
jmp dword [edx*4 + 0x10013924]
add eax, 0xffffffd0
inc ecx
mov dword [esp + 0x28], eax
cmp ecx, edi
je case.0x10013603.44
movzx edx, byte [ecx]
lea esi, [edx - 0x30]
cmp esi, 9
ja case.0x10013603.44
lea eax, [eax + eax*4]
inc ecx
lea edx, [edx + eax*2 - 0x30]
mov dword [esp + 0x28], edx
cmp ecx, edi
je 0x100137cc
movzx eax, byte [ecx]
sub eax, 0x2c
je 0x1001369a
sub eax, 2
jne 0x100136da
inc ecx
cmp ecx, edi
jae 0x100136da
mov ebp, dword [esp + 0x10]
movzx eax, byte [ecx]
cmp eax, 0x30
jl 0x100136de
cmp eax, 0x39
jg 0x100136de
lea edx, [ebp + ebp*4]
lea esi, [eax + edx*2 - 0x30]
mov eax, 0x66666667
imul esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebp
jne 0x100136d3
inc dword [esp + 0x18]
mov ebp, esi
inc ecx
cmp ecx, edi
jb 0x100136a3
jmp 0x100136de
mov ebp, dword [esp + 0x10]
cmp ecx, edi
je 0x100137d4
movzx eax, byte [ecx]
sub eax, 0x2b
je 0x10013711
sub eax, 2
je 0x10013711
sub eax, 0x2d
jne case.0x10013603.44
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], 1
jmp 0x100137d8
mov ebp, dword [esp + 0x10]
mov edx, edi
sub edx, ecx
cmp edx, 3
jl case.0x10013603.44
movzx eax, byte [ecx + 1]
inc ecx
lea edx, [eax - 0x30]
cmp edx, 9
ja case.0x10013603.44
movzx edx, byte [ecx + 1]
inc ecx
lea esi, [edx - 0x30]
cmp esi, 9
ja case.0x10013603.44
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x210]
xor edx, edx
inc ecx
cmp byte [ecx - 3], 0x2d
setne dl
lea edx, [edx + edx - 1]
mov esi, edx
mov edx, edi
sub edx, ecx
cmp edx, 2
jne 0x1001378e
movzx edx, byte [ecx]
lea edi, [edx - 0x30]
cmp edi, 9
ja case.0x10013603.44
movzx ecx, byte [ecx + 1]
lea edi, [ecx - 0x30]
cmp edi, 9
ja case.0x10013603.44
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*2 - 0x210]
jmp 0x1001379a
cmp edi, ecx
jne case.0x10013603.44
mov ecx, dword [esp + 0x20]
mov edx, eax
shl edx, 4
sub edx, eax
lea eax, [ecx + edx*4]
imul eax, esi
mov ecx, eax
shl ecx, 4
sub ecx, eax
add ecx, ecx
add ecx, ecx
mov dword [esp + 0x1c], 1
jmp 0x100137d8
mov ebp, dword [esp + 0x10]
mov ecx, ebp
mov dword [esp + 0x1c], 1
jmp 0x100137d8
mov ebp, dword [esp + 0x10]
mov ecx, ebp
jmp 0x100137d8
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
dec eax
cmp eax, 0xb
ja case.0x10013603.44
mov edx, dword [esp + 0x34]
dec edx
cmp edx, 0x1e
ja case.0x10013603.44
cmp ebx, 0x17
jg case.0x10013603.44
cmp dword [esp + 0x28], 0x3c
jg case.0x10013603.44
mov esi, dword [esp + 0x1c]
sub dword [esp + 0x3c], 0x76c
sub dword [esp + 0x28], ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x48], 0xffffffff
test esi, esi
je 0x10013830
lea eax, [esp + 0x28]
push eax
call fcn.10013360
jmp 0x1001383b
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.MSVCR90.dll__mktime64]
mov ecx, eax
and ecx, edx
add esp, 4
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], eax
cmp ecx, 0xffffffff
je case.0x10013603.44
mov ebx, dword [esp + 0x5c]
test ebx, ebx
je 0x100138ac
cmp dword [esp + 0x60], 0
je 0x10013897
test esi, esi
je 0x10013871
mov ecx, 9
lea esi, [esp + 0x28]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
jmp 0x100138ac
lea eax, [esp + 0x20]
call fcn.10013270
test eax, eax
jne 0x100138a4
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0x16
or eax, 0xffffffff
or edx, eax
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x3c
ret
lea eax, [esp + 0x20]
call fcn.10013240
test eax, eax
je case.0x10013603.44
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x54]
test ecx, ecx
je 0x100138b6
mov dword [ecx], ebp
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x1001388f
mov esi, dword [esp + 0x18]
pop edi
pop ebp
pop ebx
mov dword [ecx], esi
pop esi
add esp, 0x3c
ret
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0x16
or eax, 0xffffffff
or edx, eax
add esp, 0x3c
ret