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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x3003a2ac]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x70], eax
mov eax, dword [eax]
push ebx
push esi
mov ebx, 0x400
test eax, eax
jne 0x30051173
xor esi, esi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push esi
push eax
call dword [ecx + 0x10]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x3005117b
lea esi, [eax + 4]
add eax, 0x400
push edi
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
test ax, ax
je 0x3001baf4
mov edi, dword [ebp + 0xc]
cmp ax, 0x25
je 0x3001b9ff
cmp esi, dword [ebp - 0x50]
jae 0x30051586
mov ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
mov dword [ebp + 0xc], edi
jmp 0x3001b9cf
inc edi
inc edi
movzx eax, word [edi]
movzx ecx, ax
add ecx, 0xffffffd0
cmp ecx, 9
ja 0x3001b9e7
xor ecx, ecx
imul ecx, ecx, 0xa
movzx eax, ax
inc edi
inc edi
lea ecx, [ecx + eax - 0x30]
movzx eax, word [edi]
mov dword [ebp + 0xc], edi
cmp ax, 0x30
jae 0x3001bb44
cmp ecx, 1
jl 0x3001bb5e
cmp ecx, 0x63
jg 0x3001bb5e
dec ecx
cmp word [edi], 0x21
mov dword [ebp - 0x60], ecx
jne 0x3001bac4
push 2
pop ecx
mov dword [ebp - 0x58], edi
xor edx, edx
add edi, ecx
cmp word [edi], 0x2d
mov byte [ebp - 0x49], 0
mov byte [ebp - 0x61], 0
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x68], edx
je 0x30051185
cmp word [edi], 0x30
je 0x30051190
movzx eax, word [edi]
cmp ax, 0x30
jb 0x3001ba88
cmp ax, 0x39
jbe 0x30051196
cmp word [edi], 0x2e
je 0x300511c7
cmp edx, dword [ebp - 0x68]
jl 0x300511d8
movzx eax, word [edi]
add edi, ecx
cmp word [edi], 0x21
mov dword [ebp - 0x6c], eax
jne 0x3001bb53
add edi, ecx
mov dword [ebp + 0xc], edi
cmp ax, 0x73
jne 0x3005130b
test edx, edx
jne 0x300511e3
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov edi, dword [eax + ecx*4]
test edi, edi
je 0x3005154e
cmp word [edi], 0
je 0x3001b9cf
cmp esi, dword [ebp - 0x50]
jae 0x30051558
mov ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
jmp 0x3001bad5
cmp esi, dword [ebp - 0x50]
jae 0x300515b4
mov ecx, dword [ebp - 0x48]
xor eax, eax
mov word [esi], ax
mov eax, dword [ebp - 0x70]
sub esi, ecx
inc esi
inc esi
sar esi, 1
sub esi, 3
push esi
lea edx, [ecx + 4]
push eax
mov dword [eax], edx
call fcn.30005ecd
mov esi, eax
test esi, esi
jl 0x3001bb27
and dword [ebp - 0x48], 0
pop edi
cmp dword [ebp - 0x48], 0
jne 0x300515e6
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.30002772
leave
ret 0xc
cmp ax, 0x39
ja 0x3001ba2d
jmp 0x3001ba11
mov eax, dword [ebp - 0x58]
mov dword [ebp + 0xc], eax
jmp 0x3001bac4
mov esi, 0x80004005
jmp 0x3001bb27
lea esi, [eax - 4]
jmp 0x3001b9ab
mov esi, 0x8007000e
jmp 0x3001bb28
add edi, ecx
mov byte [ebp - 0x49], 1
jmp 0x3001ba6b
mov byte [ebp - 0x61], 1
jmp 0x300511a3
imul edx, edx, 0xa
movzx eax, ax
lea edx, [edx + eax - 0x30]
mov dword [ebp - 0x54], edx
add edi, ecx
jmp 0x3001ba75
cmp ax, 0x39
ja 0x3001ba92
mov ecx, dword [ebp - 0x68]
imul ecx, ecx, 0xa
movzx eax, ax
lea eax, [ecx + eax - 0x30]
push 2
mov dword [ebp - 0x68], eax
pop ecx
add edi, ecx
movzx eax, word [edi]
cmp ax, 0x30
jb 0x3001ba92
jmp 0x300511aa
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x54], edx
jmp 0x3001ba9b
mov ecx, dword [ebp - 0x60]
mov eax, dword [ebp + 0x10]
mov edi, dword [eax + ecx*4]
push edi
mov dword [ebp - 0x60], edi
call fcn.30005ae2
mov dword [ebp - 0x58], eax
test edi, edi
jne 0x30051203
mov dword [ebp - 0x60], 0x300214f8
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x30051212
cmp dword [ebp - 0x58], eax
jle 0x30051212
mov dword [ebp - 0x58], eax
cmp byte [ebp - 0x49], 0
je 0x30051257
jmp 0x3005125f
cmp esi, dword [ebp - 0x50]
jb 0x3005124c
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x20
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x58]
jg 0x3005121a
xor edi, edi
cmp dword [ebp - 0x58], edi
jle 0x300512aa
cmp esi, dword [ebp - 0x50]
jb 0x30051298
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], 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 - 0x58]
jl 0x30051266
cmp byte [ebp - 0x49], 0
je 0x3001b9cf
mov eax, dword [ebp - 0x58]
cmp dword [ebp - 0x54], eax
jle 0x3001b9cf
cmp esi, dword [ebp - 0x50]
jb 0x300512f2
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x20
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x58]
jle 0x3001b9cf
jmp 0x300512c0
cmp byte [ebp - 0x61], 0
mov byte [ebp - 0x59], 0
je 0x30051318
mov dword [ebp - 0x68], edx
lea edi, [ebp - 0x44]
mov dword [ebp - 0x58], edi
cmp ax, 0x64
jne 0x30051361
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov eax, dword [eax + ecx*4]
test eax, eax
jne 0x3005133d
push 0x30
pop eax
mov word [ebp - 0x44], ax
lea edi, [ebp - 0x42]
jmp 0x300513a6
jge 0x30051345
mov byte [ebp - 0x59], 1
neg eax
test eax, eax
jbe 0x300513a9
xor edx, edx
push 0xa
pop ecx
div ecx
add edx, 0x30
mov word [edi], dx
inc edi
inc edi
test eax, eax
ja 0x30051349
mov edx, dword [ebp - 0x54]
jmp 0x300513a6
cmp ax, 0x78
je 0x3005136d
cmp ax, 0x58
jne 0x300513a9
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov ecx, dword [eax + ecx*4]
test ecx, ecx
je 0x30051331
jbe 0x300513a9
mov eax, ecx
and eax, 0xf
shr ecx, 4
cmp eax, 9
jbe 0x3005139a
cmp word [ebp - 0x6c], 0x78
jne 0x30051395
add eax, 0x57
jmp 0x3005139d
add eax, 0x37
jmp 0x3005139d
add eax, 0x30
mov word [edi], ax
inc edi
inc edi
test ecx, ecx
ja 0x3005137c
mov dword [ebp - 0x58], edi
mov eax, edi
lea ecx, [ebp - 0x44]
sub eax, ecx
sar eax, 1
cmp byte [ebp - 0x59], 0
je 0x300513b9
inc eax
mov ecx, dword [ebp - 0x68]
xor edi, edi
cmp eax, ecx
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x60], edi
jge 0x300513d1
sub edx, ecx
sub ecx, eax
mov dword [ebp - 0x60], ecx
jmp 0x300513d7
cmp eax, edx
jge 0x300513da
sub edx, eax
mov dword [ebp - 0x54], edx
cmp byte [ebp - 0x49], 0
jne 0x30051427
cmp dword [ebp - 0x54], edi
je 0x30051427
mov edi, 0x400
cmp esi, dword [ebp - 0x50]
jb 0x30051418
add ebx, edi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x20
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x54]
je 0x3005142c
jmp 0x300513ea
mov edi, 0x400
cmp byte [ebp - 0x59], 0
je 0x30051468
cmp esi, dword [ebp - 0x50]
jb 0x30051460
add ebx, edi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x2d
pop eax
mov word [esi], ax
inc esi
inc esi
cmp dword [ebp - 0x60], 0
je 0x300514a9
cmp esi, dword [ebp - 0x50]
jb 0x3005149c
add ebx, edi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x30
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x60]
jne 0x3005146e
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x58], eax
jbe 0x300514f5
sub dword [ebp - 0x58], 2
cmp esi, dword [ebp - 0x50]
jb 0x300514e3
add ebx, edi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp - 0x58]
mov cx, word [eax]
mov word [esi], cx
inc esi
lea ecx, [ebp - 0x44]
inc esi
cmp eax, ecx
ja 0x300514b1
cmp byte [ebp - 0x49], 0
je 0x3001b9cf
cmp dword [ebp - 0x54], 0
je 0x3001b9cf
cmp esi, dword [ebp - 0x50]
jb 0x3005153b
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x20
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x54]
je 0x3001b9cf
jmp 0x30051509
mov edi, 0x300214f8
jmp 0x3001bad5
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
jmp 0x3001bae8
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x300515cd
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
jmp 0x3001b9f0
call fcn.30005f5a
mov ecx, dword [eax]
add ebx, 0x400
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
jne 0x300515d7
mov esi, 0x8007000e
jmp 0x3001bb27
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
jmp 0x3001bafd
call fcn.30005f5a
push dword [ebp - 0x48]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
jmp 0x3001bb32