Function at 0x30099ae8
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]
push ebx
push edi
mov dword [ebp - 0x6c], eax
mov ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push 0
push eax
call dword [ecx + 0x10]
mov edi, eax
mov dword [ebp - 0x48], edi
test edi, edi
jne 0x30099b26
mov edi, 0x8007000e
jmp 0x3009a0e2
lea eax, [edi + 0x400]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
push esi
lea esi, [edi + 4]
test ax, ax
je 0x3009a06a
mov edi, dword [ebp + 0xc]
cmp ax, 0x25
jne 0x3009a01d
inc edi
inc edi
movzx eax, word [edi]
movzx ecx, ax
add ecx, 0xffffffd0
cmp ecx, 9
ja 0x3009a01d
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
jb 0x30099b83
cmp ax, 0x39
jbe 0x30099b65
cmp ecx, 1
jl 0x3009a08d
cmp ecx, 0x63
jg 0x3009a08d
dec ecx
cmp word [edi], 0x21
mov dword [ebp - 0x60], ecx
jne 0x30099fc5
xor edx, edx
mov dword [ebp - 0x58], edi
inc edi
inc edi
cmp word [edi], 0x2d
mov byte [ebp - 0x49], 0
mov byte [ebp - 0x61], 0
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x68], edx
jne 0x30099bc4
inc edi
inc edi
mov byte [ebp - 0x49], 1
push 0x30
pop ecx
cmp word [edi], cx
jne 0x30099be7
mov byte [ebp - 0x61], 1
jmp 0x30099be5
cmp ax, 0x39
ja 0x30099bef
imul edx, edx, 0xa
movzx eax, ax
lea edx, [edx + eax - 0x30]
mov dword [ebp - 0x54], edx
inc edi
inc edi
movzx eax, word [edi]
cmp ax, cx
jae 0x30099bd2
cmp word [edi], 0x2e
jne 0x30099c20
inc edi
inc edi
movzx eax, word [edi]
cmp ax, cx
jb 0x30099c20
cmp ax, 0x39
ja 0x30099c20
mov ecx, dword [ebp - 0x68]
imul ecx, ecx, 0xa
movzx eax, ax
inc edi
lea eax, [ecx + eax - 0x30]
inc edi
mov dword [ebp - 0x68], eax
movzx eax, word [edi]
cmp ax, 0x30
jae 0x30099bff
cmp edx, dword [ebp - 0x68]
jge 0x30099c2b
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x54], edx
movzx eax, word [edi]
inc edi
inc edi
cmp word [edi], 0x21
mov dword [ebp - 0x70], eax
jne 0x30099fbf
inc edi
inc edi
mov dword [ebp + 0xc], edi
cmp ax, 0x73
jne 0x30099d7c
test edx, edx
je 0x30099fc5
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 0x30099c74
mov dword [ebp - 0x60], 0x300214f8
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x30099c83
cmp dword [ebp - 0x58], eax
jle 0x30099c83
mov dword [ebp - 0x58], eax
cmp byte [ebp - 0x49], 0
je 0x30099cc8
jmp 0x30099cd0
cmp esi, dword [ebp - 0x50]
jb 0x30099cbd
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 0x3009a086
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 0x30099c8b
xor edi, edi
cmp dword [ebp - 0x58], edi
jle 0x30099d1b
cmp esi, dword [ebp - 0x50]
jb 0x30099d09
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 0x3009a086
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 0x30099cd7
cmp byte [ebp - 0x49], 0
je 0x3009a058
mov eax, dword [ebp - 0x58]
cmp dword [ebp - 0x54], eax
jle 0x3009a058
cmp esi, dword [ebp - 0x50]
jb 0x30099d63
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 0x3009a086
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 0x3009a058
jmp 0x30099d31
cmp byte [ebp - 0x61], 0
mov byte [ebp - 0x59], 0
je 0x30099d89
mov dword [ebp - 0x68], edx
lea edi, [ebp - 0x44]
mov dword [ebp - 0x58], edi
cmp ax, 0x64
jne 0x30099dd2
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov eax, dword [eax + ecx*4]
test eax, eax
jne 0x30099dae
push 0x30
pop eax
mov word [ebp - 0x44], ax
lea edi, [ebp - 0x42]
jmp 0x30099e17
jge 0x30099db6
mov byte [ebp - 0x59], 1
neg eax
test eax, eax
jbe 0x30099e1a
xor edx, edx
push 0xa
pop ecx
div ecx
add edx, 0x30
mov word [edi], dx
inc edi
inc edi
test eax, eax
ja 0x30099dba
mov edx, dword [ebp - 0x54]
jmp 0x30099e17
cmp ax, 0x78
je 0x30099dde
cmp ax, 0x58
jne 0x30099e1a
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov ecx, dword [eax + ecx*4]
test ecx, ecx
je 0x30099da2
jbe 0x30099e1a
mov eax, ecx
and eax, 0xf
shr ecx, 4
cmp eax, 9
jbe 0x30099e0b
cmp word [ebp - 0x70], 0x78
jne 0x30099e06
add eax, 0x57
jmp 0x30099e0e
add eax, 0x37
jmp 0x30099e0e
add eax, 0x30
mov word [edi], ax
inc edi
inc edi
test ecx, ecx
ja 0x30099ded
mov dword [ebp - 0x58], edi
mov eax, edi
lea ecx, [ebp - 0x44]
sub eax, ecx
sar eax, 1
cmp byte [ebp - 0x59], 0
je 0x30099e2a
inc eax
mov ecx, dword [ebp - 0x68]
xor edi, edi
cmp eax, ecx
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x60], edi
jge 0x30099e42
sub edx, ecx
sub ecx, eax
mov dword [ebp - 0x60], ecx
jmp 0x30099e48
cmp eax, edx
jge 0x30099e4b
sub edx, eax
mov dword [ebp - 0x54], edx
cmp byte [ebp - 0x49], 0
jne 0x30099e98
cmp dword [ebp - 0x54], edi
je 0x30099e98
mov edi, 0x400
cmp esi, dword [ebp - 0x50]
jb 0x30099e89
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 0x3009a086
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 0x30099e9d
jmp 0x30099e5b
mov edi, 0x400
cmp byte [ebp - 0x59], 0
je 0x30099ed9
cmp esi, dword [ebp - 0x50]
jb 0x30099ed1
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 0x3009a086
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 0x30099f1a
cmp esi, dword [ebp - 0x50]
jb 0x30099f0d
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 0x3009a086
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 0x30099edf
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x58], eax
jbe 0x30099f66
sub dword [ebp - 0x58], 2
cmp esi, dword [ebp - 0x50]
jb 0x30099f54
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 0x3009a086
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 0x30099f22
cmp byte [ebp - 0x49], 0
je 0x3009a058
cmp dword [ebp - 0x54], 0
je 0x3009a058
cmp esi, dword [ebp - 0x50]
jb 0x30099fac
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 0x3009a086
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 0x3009a058
jmp 0x30099f7a
mov eax, dword [ebp - 0x58]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov edi, dword [eax + ecx*4]
test edi, edi
jne 0x3009a015
mov edi, 0x300214f8
jmp 0x3009a015
cmp esi, dword [ebp - 0x50]
jb 0x3009a00b
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 0x3009a086
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 ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
cmp word [edi], 0
je 0x3009a058
jmp 0x30099fd9
cmp esi, dword [ebp - 0x50]
jb 0x3009a04b
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 0x3009a086
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 ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
mov dword [ebp + 0xc], edi
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
test ax, ax
jne 0x30099b42
mov edi, dword [ebp - 0x48]
cmp esi, dword [ebp - 0x50]
jb 0x3009a09d
call fcn.30005f5a
mov ecx, dword [eax]
add ebx, 0x400
push ebx
push edi
push eax
call dword [ecx + 0x10]
test eax, eax
jne 0x3009a094
mov edi, 0x8007000e
jmp 0x3009a0cd
mov edi, 0x80004005
jmp 0x3009a0cd
mov ecx, eax
sub ecx, edi
add esi, ecx
mov dword [ebp - 0x48], eax
xor eax, eax
mov word [esi], ax
inc esi
inc esi
sub esi, dword [ebp - 0x48]
sar esi, 1
add esi, 0xfffffffd
push esi
push dword [ebp - 0x6c]
call fcn.3000da3e
mov edi, eax
test edi, edi
jl 0x3009a0cd
mov eax, dword [ebp - 0x48]
push esi
add eax, 4
push eax
mov eax, dword [ebp - 0x6c]
push dword [eax]
call fcn.3000da9d
cmp dword [ebp - 0x48], 0
pop esi
je 0x3009a0e2
call fcn.30005f5a
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.30002772
leave
ret 0xc