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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x3003fd00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x70], eax
mov ebx, 0x400
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push 0
push eax
call dword [ecx + 0x10]
mov edi, eax
test edi, edi
mov dword [ebp - 0x48], edi
je 0x3005634c
lea eax, [edi + 0x400]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x68]
movzx eax, word [eax]
test ax, ax
push esi
lea esi, [edi + 4]
je 0x3001c6d0
cmp ax, 0x25
mov edi, dword [ebp - 0x68]
jne 0x3001c6a8
inc edi
inc edi
movzx eax, word [edi]
movzx ecx, ax
add ecx, 0xffffffd0
cmp ecx, 9
ja 0x3001c6a8
xor ecx, ecx
imul ecx, ecx, 0xa
movzx eax, ax
inc edi
inc edi
lea ecx, [ecx + eax - 0x30]
movzx eax, word [edi]
cmp ax, 0x30
mov dword [ebp - 0x68], edi
jae 0x3001c89b
cmp ecx, 1
jl 0x3001c8b5
cmp ecx, 0x63
jg 0x3001c8b5
dec ecx
cmp word [edi], 0x21
mov dword [ebp - 0x60], ecx
je 0x3001c747
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x60]
mov edi, dword [eax + ecx*4]
test edi, edi
je 0x300566a7
cmp word [edi], 0
je 0x3001c6be
cmp esi, dword [ebp - 0x54]
jae 0x300566b1
mov ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
jmp 0x3001c5f1
cmp esi, dword [ebp - 0x54]
jae 0x300566df
mov ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
mov dword [ebp - 0x68], edi
mov eax, dword [ebp - 0x68]
movzx eax, word [eax]
test ax, ax
jne 0x3001c581
mov edi, dword [ebp - 0x48]
cmp esi, dword [ebp - 0x54]
jae 0x3005670d
and word [esi], 0
inc esi
inc esi
sub esi, dword [ebp - 0x48]
sar esi, 1
add esi, 0xfffffffd
push esi
push dword [ebp - 0x74]
call fcn.3000dcdf
mov edi, eax
test edi, edi
jl 0x3001c708
mov eax, dword [ebp - 0x48]
push esi
add eax, 4
push eax
mov eax, dword [ebp - 0x74]
push dword [eax]
call fcn.3000dd36
cmp dword [ebp - 0x48], 0
pop esi
je 0x3001c71d
call fcn.300058b3
push dword [ebp - 0x48]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.300023ac
leave
ret 0xc
push 2
pop ecx
mov dword [ebp - 0x68], edi
xor edx, edx
add edi, ecx
cmp word [edi], 0x2d
mov byte [ebp - 0x4d], 0
mov byte [ebp - 0x61], 0
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x6c], edx
je 0x30056356
cmp word [edi], 0x30
je 0x30056361
movzx eax, word [edi]
cmp ax, 0x30
jb 0x3001c786
cmp ax, 0x39
jbe 0x30056367
cmp word [edi], 0x2e
je 0x30056398
cmp edx, dword [ebp - 0x6c]
jl 0x300563a9
movzx eax, word [edi]
add edi, ecx
cmp word [edi], 0x21
mov dword [ebp - 0x78], eax
jne 0x3001c8aa
add edi, ecx
cmp ax, 0x73
mov dword [ebp - 0x68], edi
je 0x300563b4
cmp byte [ebp - 0x61], 0
mov byte [ebp - 0x59], 0
jne 0x300564d7
cmp ax, 0x64
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x4c], ecx
jne 0x300564fb
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x60]
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x300564df
jl 0x300564f0
test eax, eax
jbe 0x3001c80e
xor edx, edx
push 0xa
pop ecx
div ecx
mov ecx, dword [ebp - 0x4c]
add dword [ebp - 0x4c], 2
add edx, 0x30
test eax, eax
mov word [ecx], dx
ja 0x3001c7f3
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x44]
sub eax, ecx
sar eax, 1
cmp byte [ebp - 0x59], 0
jne 0x30056553
mov ecx, dword [ebp - 0x6c]
xor edi, edi
cmp eax, ecx
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x60], edi
jl 0x30056559
cmp eax, edx
jl 0x30056562
cmp byte [ebp - 0x4d], 0
jne 0x3001c84c
cmp dword [ebp - 0x58], edi
jne 0x3005656c
mov edi, 0x400
cmp byte [ebp - 0x59], 0
jne 0x300565b1
cmp dword [ebp - 0x60], 0
jne 0x300565eb
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x4c], eax
jbe 0x3001c88c
sub dword [ebp - 0x4c], 2
cmp esi, dword [ebp - 0x54]
jae 0x3005662b
mov eax, dword [ebp - 0x4c]
mov cx, word [eax]
mov word [esi], cx
inc esi
lea ecx, [ebp - 0x44]
inc esi
cmp eax, ecx
ja 0x3001c86d
cmp byte [ebp - 0x4d], 0
je 0x3001c6be
jmp 0x30056659
cmp ax, 0x39
ja 0x3001c5c0
jmp 0x3001c5a4
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x68], eax
jmp 0x3001c5e0
mov edi, 0x80004005
jmp 0x3001c708
mov edi, 0x8007000e
jmp 0x3001c71d
add edi, ecx
mov byte [ebp - 0x4d], 1
jmp 0x3001c769
mov byte [ebp - 0x61], 1
jmp 0x30056374
imul edx, edx, 0xa
movzx eax, ax
lea edx, [edx + eax - 0x30]
mov dword [ebp - 0x58], edx
add edi, ecx
jmp 0x3001c773
cmp ax, 0x39
ja 0x3001c790
mov ecx, dword [ebp - 0x6c]
imul ecx, ecx, 0xa
movzx eax, ax
lea eax, [ecx + eax - 0x30]
push 2
mov dword [ebp - 0x6c], eax
pop ecx
add edi, ecx
movzx eax, word [edi]
cmp ax, 0x30
jb 0x3001c790
jmp 0x3005637b
mov edx, dword [ebp - 0x6c]
mov dword [ebp - 0x58], edx
jmp 0x3001c799
test edx, edx
je 0x3001c5e0
mov ecx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x70]
mov edi, dword [eax + ecx*4]
push edi
mov dword [ebp - 0x60], edi
call fcn.30005465
test edi, edi
mov dword [ebp - 0x4c], eax
jne 0x300563dc
mov dword [ebp - 0x60], 0x30029df4
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x300563eb
cmp dword [ebp - 0x4c], eax
jle 0x300563eb
mov dword [ebp - 0x4c], eax
cmp byte [ebp - 0x4d], 0
je 0x3005642f
jmp 0x30056437
cmp esi, dword [ebp - 0x54]
jb 0x30056425
add ebx, 0x400
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
mov word [esi], 0x20
inc esi
inc esi
dec dword [ebp - 0x58]
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x4c]
jg 0x300563f3
xor edi, edi
cmp dword [ebp - 0x4c], edi
jle 0x30056482
cmp esi, dword [ebp - 0x54]
jb 0x30056470
add ebx, 0x400
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
mov eax, dword [ebp - 0x60]
mov ax, word [eax + edi*2]
mov word [esi], ax
inc esi
inc esi
inc edi
cmp edi, dword [ebp - 0x4c]
jl 0x3005643e
cmp byte [ebp - 0x4d], 0
jne 0x300564c9
jmp 0x3001c6be
cmp esi, dword [ebp - 0x54]
jb 0x300564bf
add ebx, 0x400
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
mov word [esi], 0x20
inc esi
inc esi
dec dword [ebp - 0x58]
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x4c]
jle 0x3001c6be
jmp 0x3005648d
mov dword [ebp - 0x6c], edx
jmp 0x3001c7c8
lea eax, [ebp - 0x42]
mov word [ebp - 0x44], 0x30
mov dword [ebp - 0x4c], eax
jmp 0x3001c80e
mov byte [ebp - 0x59], 1
neg eax
jmp 0x3001c7ef
cmp ax, 0x78
je 0x3005650b
cmp ax, 0x58
jne 0x3001c80e
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x60]
mov ecx, dword [eax + ecx*4]
test ecx, ecx
je 0x300564df
jbe 0x3001c80e
mov edi, dword [ebp - 0x4c]
mov eax, ecx
and eax, 0xf
shr ecx, 4
cmp eax, 9
jbe 0x3005653f
cmp word [ebp - 0x78], 0x78
jne 0x3005653a
add eax, 0x57
jmp 0x30056542
add eax, 0x37
jmp 0x30056542
add eax, 0x30
add dword [ebp - 0x4c], 2
test ecx, ecx
mov word [edi], ax
jbe 0x3001c80e
jmp 0x3005651e
inc eax
jmp 0x3001c822
sub edx, ecx
sub ecx, eax
mov dword [ebp - 0x60], ecx
jmp 0x30056564
sub edx, eax
mov dword [ebp - 0x58], edx
jmp 0x3001c83d
mov edi, 0x400
cmp esi, dword [ebp - 0x54]
jb 0x3005659f
add ebx, edi
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
mov word [esi], 0x20
inc esi
inc esi
dec dword [ebp - 0x58]
je 0x3001c851
jmp 0x30056571
cmp esi, dword [ebp - 0x54]
jb 0x300565df
add ebx, edi
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
mov word [esi], 0x2d
inc esi
inc esi
jmp 0x3001c85b
cmp esi, dword [ebp - 0x54]
jb 0x30056619
add ebx, edi
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
mov word [esi], 0x30
inc esi
inc esi
dec dword [ebp - 0x60]
je 0x3001c865
jmp 0x300565eb
add ebx, edi
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
jmp 0x3001c87a
cmp dword [ebp - 0x58], 0
je 0x3001c6be
cmp esi, dword [ebp - 0x54]
jb 0x30056695
add ebx, 0x400
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
mov word [esi], 0x20
inc esi
inc esi
dec dword [ebp - 0x58]
je 0x3001c6be
jmp 0x30056663
mov edi, 0x30029df4
jmp 0x3001c5f1
add ebx, 0x400
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
jmp 0x3001c604
add ebx, 0x400
call fcn.300058b3
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x30056724
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x54], ecx
jmp 0x3001c6b1
call fcn.300058b3
mov ecx, dword [eax]
add ebx, 0x400
push ebx
push edi
push eax
call dword [ecx + 0x10]
test eax, eax
jne 0x3005672e
mov edi, 0x8007000e
jmp 0x3001c708
mov ecx, eax
sub ecx, edi
add esi, ecx
mov dword [ebp - 0x48], eax
jmp 0x3001c6d9