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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
xor esi, esi
push ebx
xor ebx, ebx
sub esp, 0x6c
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x3c], ecx
mov eax, dword [ebp - 0x3c]
lea edx, [eax + 1]
mov dword [ebp - 0x3c], edx
mov al, byte [eax]
test al, al
je 0x77a03b
cmp al, 0x25
je 0x779bc7
cmp dword [ebp - 0x50], ebx
jbe 0x779cbb
mov edi, dword [ebp - 0x4c]
mov byte [edi + ebx], al
jmp 0x779cbb
lea eax, [esi + 1]
mov edi, esi
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x3c]
mov byte [ebp - 0x5a], 0
cmp byte [eax], 0x2d
jne 0x779be3
inc eax
mov byte [ebp - 0x5a], 1
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
movsx edx, byte [eax]
mov ecx, edx
mov byte [ebp - 0x59], dl
sub edx, 0x30
cmp edx, 9
ja 0x779c28
cmp cl, 0x30
je 0x779bff
mov byte [ebp - 0x59], 0x20
lea edx, [ebp - 0x3c]
call fcn.00779a14
mov dword [ebp - 0x64], eax
test edx, edx
je 0x779c33
push edx
push edx
push 0x63e8
push 0xb
call fcn.007799eb
add esp, 0x10
mov dword [ebp - 0x64], 0xffffffff
jmp 0x779c33
mov byte [ebp - 0x59], 0x20
mov dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x3c]
cmp byte [eax], 0x2e
jne 0x779c3f
inc eax
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
or eax, 0xffffffff
movsx edx, byte [ecx]
sub edx, 0x30
cmp edx, 9
ja 0x779c72
lea edx, [ebp - 0x3c]
mov eax, ecx
call fcn.00779a14
test edx, edx
je 0x779c72
push eax
push eax
push 0x63e8
push 0xb
call fcn.007799eb
add esp, 0x10
or eax, 0xffffffff
mov ecx, dword [ebp - 0x3c]
cmp byte [ecx], 0x24
lea edx, [ecx + 1]
jne 0x779c89
mov edi, dword [ebp - 0x64]
mov dword [ebp - 0x3c], edx
dec edi
jmp 0x779bcf
mov dword [ebp - 0x3c], edx
mov dl, byte [ecx]
cmp dl, 0x6c
jne 0x779caa
lea edx, [ecx + 2]
mov dword [ebp - 0x3c], edx
mov dl, byte [ecx + 1]
cmp dl, 0x6c
jne 0x779caa
lea edx, [ecx + 3]
mov dword [ebp - 0x3c], edx
mov dl, byte [ecx + 2]
cmp dl, 0x25
jne 0x779cc4
cmp dword [ebp - 0x50], ebx
jbe 0x779cbb
mov eax, dword [ebp - 0x4c]
mov byte [eax + ebx], 0x25
inc ebx
mov dword [ebp - 0x6c], esi
jmp 0x77a033
mov esi, dword [ebp + 8]
cmp dword [esi + 0x104], edi
jbe 0x77a033
mov ecx, dword [esi + 0x100]
cmp dl, 0x70
mov esi, dword [ecx + edi*8]
mov edi, dword [ecx + edi*8 + 4]
je 0x779d26
jg 0x779d05
cmp dl, 0x63
je 0x779f10
jg 0x779d00
cmp dl, 0x43
je 0x779f26
cmp dl, 0x58
jmp 0x779d1f
cmp dl, 0x64
jmp 0x779d1f
cmp dl, 0x73
je 0x779fa4
cmp dl, 0x72
jle 0x77a027
cmp dl, 0x75
je 0x779d47
cmp dl, 0x78
je 0x779d47
jmp 0x77a027
cmp dword [ebp - 0x50], ebx
jbe 0x779d32
mov eax, dword [ebp - 0x4c]
mov byte [eax + ebx], 0x30
lea eax, [ebx + 1]
cmp dword [ebp - 0x50], eax
jbe 0x779d42
mov eax, dword [ebp - 0x4c]
mov byte [eax + ebx + 1], 0x78
add ebx, 2
mov dl, 0x78
mov al, dl
and eax, 0xffffffdf
cmp al, 0x58
sete al
movzx eax, al
dec eax
and eax, 0xfffffffa
add eax, 0x10
test edi, edi
jns 0x779d64
cmp dl, 0x64
je 0x779d69
lea ecx, [ebp - 0x38]
jmp 0x779d77
neg esi
adc edi, 0
mov byte [ebp - 0x38], 0x2d
neg edi
lea ecx, [ebp - 0x37]
mov dword [ebp - 0x60], ecx
cmp eax, 0x10
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 0x68], ecx
jne 0x779e2c
cmp dl, 0x78
sete al
dec eax
and eax, 0xffffffe0
add eax, 0x57
mov cl, al
mov edx, esi
and edx, 0xf
cmp edx, 9
lea eax, [edx + 0x30]
jbe 0x779da9
mov al, cl
add eax, edx
inc dword [ebp - 0x68]
mov edx, dword [ebp - 0x68]
shrd esi, edi, 4
shr edi, 4
mov byte [edx - 1], al
mov eax, edi
or eax, esi
jne 0x779d98
jmp 0x779e76
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x54]
add dword [ebp - 0x58], eax
adc dword [ebp - 0x54], edx
cmp dword [ebp - 0x74], 0
jns 0x779ddf
mov eax, dword [ebp - 0x58]
or eax, 1
mov dword [ebp - 0x58], eax
add esi, esi
mov eax, dword [ebp - 0x78]
adc edi, edi
add dword [ebp - 0x78], eax
mov edx, dword [ebp - 0x74]
mov eax, 9
adc dword [ebp - 0x74], edx
cmp eax, dword [ebp - 0x58]
mov eax, 0
sbb eax, dword [ebp - 0x54]
jae 0x779e10
mov eax, esi
or eax, 1
add dword [ebp - 0x58], 0xfffffff6
adc dword [ebp - 0x54], 0xffffffff
mov esi, eax
mov eax, ecx
dec eax
mov ecx, eax
jne 0x779dc4
inc dword [ebp - 0x68]
mov dl, byte [ebp - 0x58]
mov eax, dword [ebp - 0x68]
add edx, 0x30
mov byte [eax - 1], dl
mov eax, edi
or eax, esi
je 0x779e76
mov eax, 0xfffffffe
cmp eax, esi
mov eax, 0
sbb eax, edi
jb 0x779e57
mov eax, esi
xor edx, edx
mov esi, 0xa
mov dword [ebp - 0x54], 0
div esi
mov esi, eax
mov dword [ebp - 0x58], edx
xor edi, edi
jmp 0x779e17
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x74], edi
mov ecx, 0x41
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
xor esi, esi
xor edi, edi
jmp 0x779e10
mov eax, dword [ebp - 0x68]
mov byte [eax], 0
mov eax, dword [ebp - 0x60]
cmp byte [eax], 0
je 0x779e87
inc eax
jmp 0x779e7f
dec eax
cmp dword [ebp - 0x60], eax
jae 0x779e9f
mov edi, dword [ebp - 0x60]
mov cl, byte [eax]
inc dword [ebp - 0x60]
dec eax
mov dl, byte [edi]
mov byte [edi], cl
mov byte [eax + 1], dl
jmp 0x779e88
lea eax, [ebp - 0x38]
mov ecx, dword [ebp - 0x68]
sub ecx, eax
xor eax, eax
cmp dword [ebp - 0x64], ecx
jbe 0x779eb3
mov eax, dword [ebp - 0x64]
sub eax, ecx
cmp byte [ebp - 0x5a], 0
jne 0x779ed3
add eax, ebx
cmp ebx, eax
je 0x779ed0
cmp dword [ebp - 0x50], ebx
jbe 0x779ecd
mov edi, dword [ebp - 0x4c]
mov cl, byte [ebp - 0x59]
mov byte [edi + ebx], cl
inc ebx
jmp 0x779ebb
or eax, 0xffffffff
lea edx, [ebp - 0x38]
mov cl, byte [edx]
test cl, cl
je 0x779eeb
inc edx
cmp dword [ebp - 0x50], ebx
jbe 0x779ee8
mov edi, dword [ebp - 0x4c]
mov byte [edi + ebx], cl
inc ebx
jmp 0x779ed6
add eax, ebx
cmp byte [ebp - 0x5a], 0
je 0x77a033
cmp ebx, eax
je 0x77a033
cmp dword [ebp - 0x50], ebx
jbe 0x779f0d
mov edi, dword [ebp - 0x4c]
mov cl, byte [ebp - 0x59]
mov byte [edi + ebx], cl
inc ebx
jmp 0x779ef7
cmp dword [ebp - 0x50], ebx
jbe 0x77a032
mov ecx, dword [ebp - 0x4c]
mov eax, esi
mov byte [ecx + ebx], al
jmp 0x77a032
cmp esi, 0x7f
jbe 0x779f4e
cmp esi, 0x7ff
jbe 0x779f54
cmp esi, 0xffff
jbe 0x779f60
cmp esi, 0x10ffff
jbe 0x779f6c
xor eax, eax
xor ecx, ecx
mov esi, 0x3f
jmp 0x779f76
xor eax, eax
xor ecx, ecx
jmp 0x779f76
mov eax, 0xc0
mov ecx, 6
jmp 0x779f76
mov eax, 0xe0
mov ecx, 0xc
jmp 0x779f76
mov eax, 0xf0
mov ecx, 0x12
cmp dword [ebp - 0x50], ebx
jbe 0x779f87
mov edx, esi
shr edx, cl
or eax, edx
mov edi, dword [ebp - 0x4c]
mov byte [edi + ebx], al
sub ecx, 6
inc ebx
test ecx, ecx
js 0x77a033
cmp dword [ebp - 0x50], ebx
jbe 0x779f87
mov eax, esi
shr eax, cl
and eax, 0x3f
or eax, 0xffffff80
jmp 0x779f81
mov ecx, edi
mov edx, 0x6411
or ecx, esi
je 0x779fb1
mov edx, esi
xor ecx, ecx
cmp eax, ecx
je 0x779fc0
cmp byte [edx + ecx], 0
je 0x779fc0
inc ecx
jmp 0x779fb3
xor esi, esi
cmp dword [ebp - 0x64], ecx
jbe 0x779fce
mov eax, dword [ebp - 0x64]
sub eax, ecx
mov esi, eax
cmp byte [ebp - 0x5a], 0
jne 0x779fee
add esi, ebx
cmp ebx, esi
je 0x779feb
cmp dword [ebp - 0x50], ebx
jbe 0x779fe8
mov edi, dword [ebp - 0x4c]
mov al, byte [ebp - 0x59]
mov byte [edi + ebx], al
inc ebx
jmp 0x779fd6
or esi, 0xffffffff
add ecx, ebx
sub edx, ebx
cmp ebx, ecx
je 0x77a007
cmp dword [ebp - 0x50], ebx
jbe 0x77a004
mov edi, dword [ebp - 0x4c]
mov al, byte [edx + ebx]
mov byte [edi + ebx], al
inc ebx
jmp 0x779ff2
cmp byte [ebp - 0x5a], 0
mov ebx, ecx
je 0x77a033
lea ebx, [esi + ecx]
cmp ecx, ebx
je 0x77a033
cmp dword [ebp - 0x50], ecx
jbe 0x77a024
mov edi, dword [ebp - 0x4c]
mov al, byte [ebp - 0x59]
mov byte [edi + ecx], al
inc ecx
jmp 0x77a012
cmp dword [ebp - 0x50], ebx
jbe 0x77a032
mov eax, dword [ebp - 0x4c]
mov byte [eax + ebx], dl
inc ebx
mov esi, dword [ebp - 0x6c]
jmp 0x779b9c
cmp dword [ebp - 0x50], ebx
mov eax, dword [ebp - 0x4c]
jbe 0x77a049
mov byte [eax + ebx], 0
jmp 0x77a050
mov edi, dword [ebp - 0x50]
mov byte [eax + edi], 0
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret