Function at 0x30070b07
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
jne 0x30070b51
mov edi, 0x8007000e
jmp 0x30071102
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 0x3007108b
cmp ax, 0x25
mov edi, dword [ebp - 0x68]
jne 0x3007103e
inc edi
inc edi
movzx eax, word [edi]
movzx ecx, ax
add ecx, 0xffffffd0
cmp ecx, 9
ja 0x3007103e
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
jb 0x30070bae
cmp ax, 0x39
jbe 0x30070b90
cmp ecx, 1
jl 0x300710ae
cmp ecx, 0x63
jg 0x300710ae
dec ecx
cmp word [edi], 0x21
mov dword [ebp - 0x60], ecx
jne 0x30070fe6
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
jne 0x30070bf2
add edi, ecx
mov byte [ebp - 0x4d], 1
cmp word [edi], 0x30
jne 0x30070c13
mov byte [ebp - 0x61], 1
jmp 0x30070c11
cmp ax, 0x39
ja 0x30070c1c
imul edx, edx, 0xa
movzx eax, ax
lea edx, [edx + eax - 0x30]
mov dword [ebp - 0x58], edx
add edi, ecx
movzx eax, word [edi]
cmp ax, 0x30
jae 0x30070bfe
cmp word [edi], 0x2e
je 0x30070c3d
jmp 0x30070c48
cmp ax, 0x39
ja 0x30070c48
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
jae 0x30070c24
cmp edx, dword [ebp - 0x6c]
jge 0x30070c53
mov edx, dword [ebp - 0x6c]
mov dword [ebp - 0x58], edx
movzx eax, word [edi]
add edi, ecx
cmp word [edi], 0x21
mov dword [ebp - 0x78], eax
jne 0x30070fe0
add edi, ecx
cmp ax, 0x73
mov dword [ebp - 0x68], edi
jne 0x30070d97
test edx, edx
je 0x30070fe6
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 0x30070c9c
mov dword [ebp - 0x60], 0x30029df4
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x30070cab
cmp dword [ebp - 0x4c], eax
jle 0x30070cab
mov dword [ebp - 0x4c], eax
cmp byte [ebp - 0x4d], 0
je 0x30070cef
jmp 0x30070cf7
cmp esi, dword [ebp - 0x54]
jb 0x30070ce5
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 0x300710a7
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 0x30070cb3
xor edi, edi
cmp dword [ebp - 0x4c], edi
jle 0x30070d42
cmp esi, dword [ebp - 0x54]
jb 0x30070d30
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 0x300710a7
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 0x30070cfe
cmp byte [ebp - 0x4d], 0
jne 0x30070d89
jmp 0x30071079
cmp esi, dword [ebp - 0x54]
jb 0x30070d7f
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 0x300710a7
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 0x30071079
jmp 0x30070d4d
cmp byte [ebp - 0x61], 0
mov byte [ebp - 0x59], 0
je 0x30070da4
mov dword [ebp - 0x6c], edx
cmp ax, 0x64
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x4c], ecx
jne 0x30070df4
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x60]
mov eax, dword [eax + ecx*4]
test eax, eax
jne 0x30070dcb
lea eax, [ebp - 0x42]
mov word [ebp - 0x44], 0x30
mov dword [ebp - 0x4c], eax
jmp 0x30070e3e
jge 0x30070dd3
mov byte [ebp - 0x59], 1
neg eax
test eax, eax
jbe 0x30070e3e
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 0x30070dd7
mov edx, dword [ebp - 0x58]
jmp 0x30070e3e
cmp ax, 0x78
je 0x30070e00
cmp ax, 0x58
jne 0x30070e3e
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x60]
mov ecx, dword [eax + ecx*4]
test ecx, ecx
je 0x30070dbd
jbe 0x30070e3e
mov edi, dword [ebp - 0x4c]
mov eax, ecx
and eax, 0xf
shr ecx, 4
cmp eax, 9
jbe 0x30070e30
cmp word [ebp - 0x78], 0x78
jne 0x30070e2b
add eax, 0x57
jmp 0x30070e33
add eax, 0x37
jmp 0x30070e33
add eax, 0x30
add dword [ebp - 0x4c], 2
test ecx, ecx
mov word [edi], ax
ja 0x30070e0f
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x44]
sub eax, ecx
sar eax, 1
cmp byte [ebp - 0x59], 0
je 0x30070e4f
inc eax
mov ecx, dword [ebp - 0x6c]
xor edi, edi
cmp eax, ecx
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x60], edi
jge 0x30070e67
sub edx, ecx
sub ecx, eax
mov dword [ebp - 0x60], ecx
jmp 0x30070e6d
cmp eax, edx
jge 0x30070e70
sub edx, eax
mov dword [ebp - 0x58], edx
cmp byte [ebp - 0x4d], 0
jne 0x30070ebc
cmp dword [ebp - 0x58], edi
je 0x30070ebc
mov edi, 0x400
cmp esi, dword [ebp - 0x54]
jb 0x30070eae
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 0x300710a7
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 0x30070ec1
jmp 0x30070e80
mov edi, 0x400
cmp byte [ebp - 0x59], 0
je 0x30070efc
cmp esi, dword [ebp - 0x54]
jb 0x30070ef5
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 0x300710a7
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
cmp dword [ebp - 0x60], 0
je 0x30070f3c
cmp esi, dword [ebp - 0x54]
jb 0x30070f30
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 0x300710a7
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]
jne 0x30070f02
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x4c], eax
jbe 0x30070f88
sub dword [ebp - 0x4c], 2
cmp esi, dword [ebp - 0x54]
jb 0x30070f76
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 0x300710a7
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 - 0x4c]
mov cx, word [eax]
mov word [esi], cx
inc esi
lea ecx, [ebp - 0x44]
inc esi
cmp eax, ecx
ja 0x30070f44
cmp byte [ebp - 0x4d], 0
je 0x30071079
cmp dword [ebp - 0x58], 0
je 0x30071079
cmp esi, dword [ebp - 0x54]
jb 0x30070fce
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 0x300710a7
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 0x30071079
jmp 0x30070f9c
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x60]
mov edi, dword [eax + ecx*4]
test edi, edi
jne 0x30071036
mov edi, 0x30029df4
jmp 0x30071036
cmp esi, dword [ebp - 0x54]
jb 0x3007102c
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 0x300710a7
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 ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
cmp word [edi], 0
je 0x30071079
jmp 0x30070ffa
cmp esi, dword [ebp - 0x54]
jb 0x3007106c
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 0x300710a7
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 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 0x30070b6d
mov edi, dword [ebp - 0x48]
cmp esi, dword [ebp - 0x54]
jb 0x300710be
call fcn.300058b3
mov ecx, dword [eax]
add ebx, 0x400
push ebx
push edi
push eax
call dword [ecx + 0x10]
test eax, eax
jne 0x300710b5
mov edi, 0x8007000e
jmp 0x300710ed
mov edi, 0x80004005
jmp 0x300710ed
mov ecx, eax
sub ecx, edi
add esi, ecx
mov dword [ebp - 0x48], eax
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.30012d1d
mov edi, eax
test edi, edi
jl 0x300710ed
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 0x30071102
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