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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x493bd0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2c], eax
movzx eax, word [ecx]
test ax, ax
push ebx
mov ebx, dword [ebp + 0x10]
je 0x40d8fc
push esi
push edi
jmp 0x40d3f2
mov ecx, dword [ebp - 0x34]
inc ecx
inc ecx
cmp ax, 0x25
mov dword [ebp - 0x34], ecx
je 0x40d403
push eax
jmp 0x40d7a1
and dword [ebp - 0x24], 0
and dword [ebp - 0x28], 0
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x34]
mov byte [ebp - 0x1a], 0
mov byte [ebp - 0x19], 0
mov dword [ebp - 0x38], 0x20
movzx edx, word [esi]
movzx eax, dx
inc esi
inc esi
mov ecx, eax
sub ecx, 0
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x34], esi
je 0x40d8fa
sub ecx, 0x2d
je 0x40d4df
dec ecx
je 0x40d4d6
sub ecx, 0x21
je 0x40d420
sub ecx, 0xc
je 0x40d4bb
lea ecx, [eax - 0x30]
cmp ecx, 0xa
jae 0x40d460
lea ecx, [eax - 0x30]
jmp 0x40d475
movzx ecx, word [0x495584]
sub eax, ecx
cmp eax, 0xa
jae 0x40d472
mov ecx, eax
jmp 0x40d475
or ecx, 0xffffffff
cmp ecx, 9
ja 0x40d4e8
test ecx, ecx
jne 0x40d495
mov eax, dword [edi + 4]
test eax, eax
jne 0x40d48e
mov dword [ebp - 0x38], 0x30
jmp 0x40d495
movzx eax, word [eax + 0x24]
mov dword [ebp - 0x38], eax
cmp byte [ebp - 0x19], 0
je 0x40d4ab
mov eax, dword [ebp - 0x28]
imul eax, eax, 0xa
add eax, ecx
mov dword [ebp - 0x28], eax
jmp 0x40d420
mov eax, dword [ebp - 0x24]
imul eax, eax, 0xa
add eax, ecx
mov dword [ebp - 0x24], eax
jmp 0x40d420
push 0x5d
push esi
call fcn.0045995e
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x40d420
inc esi
inc esi
jmp 0x40d420
mov byte [ebp - 0x19], 1
jmp 0x40d420
mov byte [ebp - 0x1a], 1
jmp 0x40d420
movzx eax, dx
xor esi, esi
xor cl, cl
cmp eax, 0x5a
mov dword [ebp - 0x30], esi
jg 0x40d65a
je 0x40d8eb
cmp eax, 0x49
jg 0x40d5d4
je 0x40d5c2
cmp eax, 0x42
jg 0x40d57d
je 0x40d569
test eax, eax
je 0x40d8fa
cmp eax, 0x2f
je 0x40d55f
cmp eax, 0x3a
je 0x40d54f
cmp eax, 0x41
jne 0x40d79e
mov eax, dword [ebx + 0x18]
cmp eax, 7
jge 0x40d8eb
mov edx, edi
mov eax, dword [edx + eax*4 + 0x88]
mov dword [ebp - 0x30], eax
jmp 0x40d7c7
mov eax, edi
mov eax, dword [eax + 0xb8]
mov dword [ebp - 0x30], eax
jmp 0x40d7d5
mov eax, edi
mov eax, dword [eax + 0xbc]
jmp 0x40d547
mov eax, dword [ebx + 0x10]
cmp eax, 0xc
jge 0x40d8eb
mov edx, edi
mov eax, dword [edx + eax*4 + 0x3c]
jmp 0x40d547
sub eax, 0x43
je 0x40d5ad
dec eax
je 0x40d596
sub eax, 4
jne 0x40d79e
mov esi, dword [ebx + 8]
jmp 0x40d7d5
push edi
push ebx
push str._m___d___y
push dword [ebp - 0x20]
call fcn.0040d3bc
add esp, 0x10
jmp 0x40d8eb
mov eax, dword [ebx + 0x14]
add eax, 0x76c
push 0x64
cdq
pop esi
idiv esi
mov esi, eax
jmp 0x40d7c7
mov eax, dword [ebx + 8]
dec eax
push 0xc
cdq
pop ecx
idiv ecx
mov esi, edx
inc esi
jmp 0x40d7d5
cmp eax, 0x55
jg 0x40d61d
je 0x40d610
sub eax, 0x4d
je 0x40d608
sub eax, 5
je 0x40d5ff
dec eax
je 0x40d5f8
dec eax
jne 0x40d79e
push edi
push ebx
push str._H_:_M_:_S
jmp 0x40d59d
mov esi, dword [ebx]
jmp 0x40d7d5
push edi
push ebx
push str._H_:_M
jmp 0x40d59d
mov esi, dword [ebx + 4]
jmp 0x40d7d5
mov eax, dword [ebx + 0x1c]
sub eax, dword [ebx + 0x18]
add eax, 7
push 7
jmp 0x40d5b7
sub eax, 0x57
je 0x40d649
dec eax
je 0x40d63a
dec eax
jne 0x40d79e
mov esi, dword [ebx + 0x14]
add esi, 0x76c
jmp 0x40d7c7
mov eax, edi
push eax
push ebx
push dword [eax + 0xa4]
jmp 0x40d59d
mov eax, dword [ebx + 0x18]
dec eax
cdq
push 7
pop esi
idiv esi
mov eax, dword [ebx + 0x1c]
sub eax, edx
jmp 0x40d616
cmp eax, 0x6d
jg 0x40d738
je 0x40d72c
cmp eax, 0x64
jg 0x40d6d7
je 0x40d724
sub eax, 0x5f
je 0x40d6c9
dec eax
dec eax
je 0x40d6b2
dec eax
je 0x40d706
dec eax
jne 0x40d79e
push edi
push ebx
push 0x484a9c
push dword [ebp - 0x20]
call fcn.0040d3bc
push edi
push ebx
push dword [edi + 0xc0]
push dword [ebp - 0x20]
call fcn.0040d3bc
add esp, 0x20
jmp 0x40d8eb
mov eax, dword [ebx + 0x18]
cmp eax, 7
jge 0x40d8eb
mov edx, edi
mov eax, dword [edx + eax*4 + 0x6c]
jmp 0x40d547
mov cl, 1
mov dword [ebp - 0x30], 0x484a98
jmp 0x40d7c7
sub eax, 0x65
je 0x40d71d
push 3
pop edx
sub eax, edx
je 0x40d706
dec eax
dec eax
jne 0x40d79e
cmp dword [ebp - 0x24], eax
jne 0x40d6fd
cmp byte [ebp - 0x1a], al
jne 0x40d6fd
cmp byte [ebp - 0x19], al
jne 0x40d6fd
mov dword [ebp - 0x28], edx
mov esi, dword [ebx + 0x1c]
inc esi
jmp 0x40d7c7
mov eax, dword [ebx + 0x10]
cmp eax, 0xc
jge 0x40d8eb
mov edx, edi
mov eax, dword [edx + eax*4 + 0xc]
jmp 0x40d547
mov dword [ebp - 0x24], 2
mov esi, dword [ebx + 0xc]
jmp 0x40d7c7
mov esi, dword [ebx + 0x10]
mov dword [ebp - 0x24], 2
jmp 0x40d700
cmp eax, 0x75
jg 0x40d793
je 0x40d784
sub eax, 0x6e
je 0x40d780
dec eax
dec eax
je 0x40d76b
dec eax
dec eax
je 0x40d75f
dec eax
dec eax
jne 0x40d79e
push 9
mov ecx, dword [ebp - 0x20]
call fcn.0040d389
jmp 0x40d7e6
push edi
push ebx
push str._I_:_M_:_S__p
jmp 0x40d59d
xor eax, eax
cmp dword [ebx + 8], 0xc
setge al
mov eax, dword [edi + eax*4 + 0xb0]
jmp 0x40d557
push 0xa
jmp 0x40d752
mov eax, dword [ebx + 0x18]
dec eax
push 7
cdq
pop esi
idiv esi
mov esi, edx
inc esi
jmp 0x40d7c3
sub eax, 0x77
je 0x40d7c0
dec eax
je 0x40d7b3
dec eax
je 0x40d7ae
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x20]
call fcn.0040d389
jmp 0x40d8eb
mov esi, dword [ebx + 0x14]
jmp 0x40d7c7
push edi
push ebx
push dword [edi + 0xa8]
jmp 0x40d59d
mov esi, dword [ebx + 0x18]
mov byte [ebp - 0x19], 1
cmp dword [ebx + 0x18], 0xffffffff
je 0x40d8eb
test cl, cl
je 0x40d7df
cmp dword [ebx + 8], 0xffffffff
je 0x40d8eb
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x40d850
cmp dword [ebp - 0x24], 0
jne 0x40d7ff
cmp byte [ebp - 0x1a], 0
jne 0x40d7ff
cmp byte [ebp - 0x19], 0
jne 0x40d7ff
mov dword [ebp - 0x28], 2
and word [ebp - 6], 0
mov eax, edi
movzx edi, word [eax + 0xc4]
lea ecx, [ebp - 6]
mov eax, esi
xor edx, edx
push 0xa
pop esi
div esi
dec ecx
dec ecx
add edx, edi
cmp dword [ebp - 0x28], 0
mov word [ecx], dx
mov esi, eax
jbe 0x40d82b
dec dword [ebp - 0x28]
test esi, esi
je 0x40d836
lea eax, [ebp - 0x18]
cmp ecx, eax
jne 0x40d810
mov eax, ecx
mov dword [ebp - 0x30], ecx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40d83e
sub eax, edx
sar eax, 1
mov esi, eax
jmp 0x40d875
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40d853
sub eax, edx
sar eax, 1
cmp dword [ebp - 0x28], 0
mov esi, eax
jbe 0x40d871
cmp esi, dword [ebp - 0x28]
jbe 0x40d871
mov esi, dword [ebp - 0x28]
and dword [ebp - 0x28], 0
cmp byte [ebp - 0x1a], 0
jne 0x40d893
cmp esi, dword [ebp - 0x24]
jae 0x40d893
sub dword [ebp - 0x24], esi
push dword [ebp - 0x38]
mov ecx, dword [ebp - 0x20]
call fcn.0040d389
dec dword [ebp - 0x24]
jne 0x40d883
cmp dword [ebp - 0x28], 0
jbe 0x40d8b1
mov eax, dword [ebp - 0x2c]
movzx eax, word [eax + 0xc4]
mov ecx, dword [ebp - 0x20]
push eax
call fcn.0040d389
dec dword [ebp - 0x28]
jne 0x40d899
test esi, esi
jbe 0x40d8ce
mov edi, dword [ebp - 0x30]
movzx eax, word [edi]
test ax, ax
je 0x40d8ce
mov ecx, dword [ebp - 0x20]
push eax
call fcn.0040d389
inc edi
inc edi
dec esi
jne 0x40d8b8
cmp byte [ebp - 0x1a], 0
je 0x40d8eb
cmp esi, dword [ebp - 0x24]
jae 0x40d8eb
sub dword [ebp - 0x24], esi
mov ecx, dword [ebp - 0x20]
push 0x20
call fcn.0040d389
dec dword [ebp - 0x24]
jne 0x40d8dc
mov eax, dword [ebp - 0x34]
movzx eax, word [eax]
test ax, ax
jne 0x40d3ef
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004533e4
leave
ret