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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10196cdd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
push esi
push edi
mov eax, dword [0x101f6e00]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x30], edi
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x54], ecx
movq xmm0, qword [ecx]
mov eax, dword [ecx + 8]
movq qword [ebp - 0x60], xmm0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 4], 0
xorps xmm1, xmm1
mov esi, dword [ebp - 0x60]
mov ecx, esi
sub ecx, eax
movsd qword [ebp - 0x50], xmm1
mov dword [ebp - 0x3c], ecx
cmp byte [esi], 0x2d
jne 0x1005b8ee
inc esi
mov dl, 1
mov dword [ebp - 0x60], esi
jmp 0x1005b8f0
xor dl, dl
mov al, byte [esi]
xorps xmm0, xmm0
mov byte [ebp - 0x13], dl
movlpd qword [ebp - 0x48], xmm0
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x24], 0
cmp al, 0x30
jne 0x1005b91e
lea edi, [esi + 1]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x60], edi
jmp 0x1005b9dc
cmp al, 0x31
jl 0x1005c042
cmp al, 0x39
jg 0x1005c042
movsx ecx, al
lea edi, [esi + 1]
mov al, byte [edi]
sub ecx, 0x30
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x2c], ecx
test dl, dl
je 0x1005b99a
cmp al, 0x30
jl 0x1005b9dc
mov esi, edi
mov edx, edi
cmp al, 0x39
ja 0x1005b9dc
cmp ecx, 0xccccccc
jb 0x1005b967
jne 0x1005b98f
mov edx, esi
cmp al, 0x38
ja 0x1005b98f
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
inc dword [ebp - 0x24]
lea edi, [edx + 1]
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x60], edi
lea ecx, [eax + ecx*2]
mov al, byte [edi]
mov dword [ebp - 0x2c], ecx
cmp al, 0x30
jl 0x1005b9dc
mov esi, edi
mov edx, edi
cmp al, 0x39
jle 0x1005b957
jmp 0x1005b9dc
mov dl, 1
mov eax, ecx
xor ecx, ecx
mov byte [ebp - 0x11], dl
jmp 0x1005b9e5
cmp al, 0x30
jl 0x1005b9dc
mov esi, edi
mov edx, edi
cmp al, 0x39
jg 0x1005b9dc
cmp ecx, 0x19999999
jb 0x1005b9b6
jne 0x1005b98f
mov edx, esi
cmp al, 0x35
jg 0x1005b98f
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
inc dword [ebp - 0x24]
lea edi, [edx + 1]
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x60], edi
lea ecx, [eax + ecx*2]
mov al, byte [edi]
mov dword [ebp - 0x2c], ecx
cmp al, 0x30
jl 0x1005b9dc
mov esi, edi
mov edx, edi
cmp al, 0x39
jle 0x1005b9a6
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
mov dl, byte [ebp - 0x11]
xor dh, dh
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 0x12], dh
test dl, dl
je 0x1005bb21
mov dl, byte [edi]
cmp byte [ebp - 0x13], dh
je 0x1005baa3
cmp dl, 0x30
jl 0x1005bb1e
mov esi, edi
cmp dl, 0x39
jg 0x1005bb1e
cmp ecx, 0xccccccc
jb 0x1005ba3e
ja 0x1005ba28
cmp eax, 0xcccccccc
jb 0x1005ba3e
cmp eax, 0xcccccccc
jne 0x1005ba8b
cmp ecx, 0xccccccc
jne 0x1005ba8b
mov esi, edi
cmp dl, 0x38
ja 0x1005ba8b
shld ecx, eax, 2
lea edi, [esi + 1]
xor edx, edx
movsx esi, byte [esi]
shl eax, 2
sub esi, 0x30
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
adc dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x1c]
shld ecx, eax, 1
mov dword [ebp - 0x60], edi
add eax, eax
add eax, esi
mov dword [ebp - 0x18], eax
adc edx, ecx
inc dword [ebp - 0x24]
mov ecx, edx
mov dl, byte [edi]
mov dword [ebp - 0x1c], ecx
cmp dl, 0x30
jl 0x1005bb1b
mov esi, edi
cmp dl, 0x39
jle 0x1005ba17
jmp 0x1005bb1b
mov edx, ecx
mov ecx, eax
call fcn.10195650
movaps xmm1, xmm0
mov dh, 1
movsd qword [ebp - 0x50], xmm1
mov byte [ebp - 0x12], dh
jmp 0x1005bb1e
cmp dl, 0x30
jl 0x1005bb1e
mov esi, edi
cmp dl, 0x39
jg 0x1005bb1e
nop
cmp ecx, 0x19999999
jb 0x1005bad7
ja 0x1005bac1
cmp eax, 0x99999999
jb 0x1005bad7
cmp eax, 0x99999999
jne 0x1005ba8b
cmp ecx, 0x19999999
jne 0x1005ba8b
mov esi, edi
cmp dl, 0x35
ja 0x1005ba8b
shld ecx, eax, 2
lea edi, [esi + 1]
xor edx, edx
movsx esi, byte [esi]
shl eax, 2
sub esi, 0x30
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
adc dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x1c]
shld ecx, eax, 1
mov dword [ebp - 0x60], edi
add eax, eax
add eax, esi
mov dword [ebp - 0x18], eax
adc edx, ecx
inc dword [ebp - 0x24]
mov ecx, edx
mov dl, byte [edi]
mov dword [ebp - 0x1c], ecx
cmp dl, 0x30
jl 0x1005bb1b
mov esi, edi
cmp dl, 0x39
jle 0x1005bab0
mov dh, byte [ebp - 0x12]
mov dl, byte [ebp - 0x11]
movsd xmm2, qword [0x101dd6a0]
test dh, dh
je 0x1005bb62
mov al, byte [edi]
cmp al, 0x30
jl 0x1005bb62
mov ecx, edi
cmp al, 0x39
ja 0x1005bb5a
movsx eax, byte [ecx]
lea edi, [ecx + 1]
sub eax, 0x30
mulsd xmm1, xmm2
mov ecx, edi
movd xmm0, eax
mov al, byte [edi]
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cmp al, 0x30
jge 0x1005bb35
mov dword [ebp - 0x60], edi
movsd qword [ebp - 0x50], xmm1
mov cl, byte [edi]
mov dword [ebp - 0x28], 0
cmp cl, 0x2e
jne 0x1005bb7b
inc edi
mov eax, edi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x34], eax
jmp 0x1005bb80
mov eax, edi
mov dword [ebp - 0x34], edi
cmp cl, 0x2e
jne 0x1005bc81
mov cl, byte [eax]
cmp cl, 0x30
jl 0x1005bc4a
cmp cl, 0x39
jg 0x1005bc4a
mov cl, byte [ebp - 0x12]
mov esi, dword [ebp - 0x2c]
test cl, cl
jne 0x1005bbd4
test dl, dl
je 0x1005bbb3
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
jmp 0x1005bbb7
mov ecx, esi
xor edx, edx
call fcn.10195650
movsd xmm2, qword [0x101dd6a0]
movaps xmm1, xmm0
movsd qword [ebp - 0x50], xmm0
mov eax, edi
mov byte [ebp - 0x12], 1
jmp 0x1005bbdc
movsd qword [ebp - 0x50], xmm1
mov byte [ebp - 0x12], cl
mov dl, byte [edi]
xorps xmm3, xmm3
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], eax
nop dword [eax]
mov ecx, dword [ebp - 0x38]
cmp dl, 0x39
jg 0x1005bc87
cmp edi, 0x11
jge 0x1005bc30
dec dword [ebp - 0x28]
lea ecx, [eax + 1]
movsx eax, byte [eax]
mov edx, ecx
sub eax, 0x30
mulsd xmm1, xmm2
mov dword [ebp - 0x60], edx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
comisd xmm1, xmm3
movsd qword [ebp - 0x50], xmm1
jbe 0x1005bc39
inc edi
jmp 0x1005bc39
mov ecx, dword [ebp - 0x34]
inc ecx
mov edx, ecx
mov dword [ebp - 0x60], edx
mov dl, byte [edx]
mov eax, ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], eax
cmp dl, 0x30
jge 0x1005bbf0
jmp 0x1005bc87
mov esi, dword [ebp - 0x30]
cmp dword [esi + 0x18], 0
je 0x1005bc6d
push 0x635
push 0x101d74f0
push str._HasParseError__
call fcn.101598d0
mov eax, dword [ebp - 0x34]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
sub eax, ecx
mov dword [esi + 0x18], 0xe
mov dword [esi + 0x1c], eax
jmp 0x1005c06e
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
xor edi, edi
cmp byte [ecx], 0x65
je 0x1005bc97
cmp byte [ecx], 0x45
jne 0x1005bd84
cmp byte [ebp - 0x12], 0
lea edi, [ecx + 1]
mov dword [ebp - 0x60], edi
jne 0x1005bcc6
cmp byte [ebp - 0x11], 0
je 0x1005bcb1
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
jmp 0x1005bcb3
xor edx, edx
mov ecx, esi
call fcn.10195650
movaps xmm1, xmm0
mov byte [ebp - 0x12], 1
movsd qword [ebp - 0x50], xmm1
mov cl, byte [edi]
xor dl, dl
cmp cl, 0x2b
je 0x1005bcd6
cmp cl, 0x2d
jne 0x1005bcdd
mov dl, 1
mov cl, byte [edi + 1]
inc edi
mov dword [ebp - 0x60], edi
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x1005be4c
lea esi, [edi + 1]
movsx edi, cl
sub edi, 0x30
mov dword [ebp - 0x60], esi
test dl, dl
je 0x1005bdf7
mov eax, dword [ebp - 0x28]
test eax, eax
jle 0x1005bd22
push 0x675
push 0x101d74f0
push str.expFrac___0
call fcn.101598d0
movsd xmm1, qword [ebp - 0x50]
add esp, 0xc
mov eax, dword [ebp - 0x28]
lea ecx, [eax + 0x7ffffff7]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp byte [esi], 0x30
mov dword [ebp - 0x44], eax
jl 0x1005bd82
mov al, byte [esi]
cmp al, 0x39
jg 0x1005bd82
movsx eax, byte [esi]
lea edi, [edi + edi*4]
lea edi, [edi - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x60], edx
mov esi, edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x44]
jle 0x1005bd7c
mov al, byte [edx]
cmp al, 0x30
jl 0x1005bd7c
mov ecx, edx
cmp al, 0x39
ja 0x1005bd79
lea esi, [ecx + 1]
mov edx, esi
mov ecx, esi
mov al, byte [edx]
cmp al, 0x30
jge 0x1005bd68
mov dword [ebp - 0x60], edx
mov al, byte [edx]
cmp al, 0x30
jge 0x1005bd43
neg edi
mov ecx, dword [ebp - 0x28]
cmp byte [ebp - 0x12], 0
je 0x1005bebe
lea eax, [edi + ecx]
cmp eax, 0xfffffecc
jge 0x1005bda3
divsd xmm1, qword [0x101dd6f0]
lea ecx, [eax + 0x134]
movaps xmm0, xmm1
cmovge ecx, eax
call fcn.1005a270
comisd xmm0, xmmword [0x101dd6f8]
jbe 0x1005be80
mov esi, dword [ebp - 0x30]
cmp dword [esi + 0x18], 0
je 0x1005bde2
push 0x6b9
push 0x101d74f0
push str._HasParseError__
call fcn.101598d0
add esp, 0xc
mov eax, dword [ebp - 0x3c]
mov dword [esi + 0x18], 0xd
mov dword [esi + 0x1c], eax
mov ecx, dword [ebp - 0x20]
jmp 0x1005c06e
mov ecx, dword [ebp - 0x28]
mov eax, 0x134
sub eax, ecx
cmp byte [esi], 0x30
mov dword [ebp - 0x44], eax
jl 0x1005bd87
mov al, byte [esi]
nop
cmp al, 0x39
jg 0x1005bd84
movsx eax, byte [esi]
lea edi, [edi + edi*4]
lea edi, [edi - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x60], edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x44]
jg 0x1005be3c
mov al, byte [edx]
mov esi, edx
cmp al, 0x30
jge 0x1005be10
jmp 0x1005bd84
mov esi, dword [ebp - 0x30]
cmp dword [esi + 0x18], 0
je 0x1005bde2
push 0x685
jmp 0x1005bdd0
mov esi, dword [ebp - 0x30]
cmp dword [esi + 0x18], 0
je 0x1005be6c
push 0x68a
push 0x101d74f0
push str._HasParseError__
call fcn.101598d0
add esp, 0xc
mov ecx, dword [ebp - 0x20]
sub edi, ecx
mov dword [esi + 0x18], 0xf
mov dword [esi + 0x1c], edi
jmp 0x1005c06e
cmp byte [ebp - 0x13], 0
je 0x1005be8d
xorps xmm0, xmmword [0x101df100]
push ecx
mov ecx, dword [ebx + 0xc]
movsd qword [ebp - 0x50], xmm0
lea ecx, [ecx + 0x18]
call fcn.1005c550
xorps xmm0, xmm0
mov ecx, 0x216
movups xmmword [eax], xmm0
mov word [eax + 0xe], cx
movsd xmm0, qword [ebp - 0x50]
mov ecx, dword [ebp - 0x20]
movsd qword [eax], xmm0
jmp 0x1005c06e
mov ecx, dword [ebx + 0xc]
add ecx, 0x18
cmp byte [ebp - 0x11], 0
push ecx
je 0x1005bfdc
cmp byte [ebp - 0x13], 0
je 0x1005bf6c
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
neg esi
adc edi, 0
neg edi
call fcn.1005c550
mov ecx, eax
xorps xmm0, xmm0
mov eax, 0x96
movups xmmword [ecx], xmm0
mov dword [ecx], esi
mov dword [ecx + 4], edi
mov word [ecx + 0xe], ax
test edi, edi
jl 0x1005bf44
jg 0x1005bf0b
test esi, esi
jb 0x1005bf44
mov eax, 0x196
mov word [ecx + 0xe], ax
mov edx, eax
xor eax, eax
or eax, edi
jne 0x1005bf27
mov eax, 0x1d6
mov word [ecx + 0xe], ax
mov edx, eax
and esi, 0x80000000
or esi, edi
jne 0x1005bdef
or edx, 0x20
mov word [ecx + 0xe], dx
mov ecx, dword [ebp - 0x20]
jmp 0x1005c06e
cmp edi, 0xffffffff
jl 0x1005bdef
jg 0x1005bf5b
cmp esi, 0x80000000
jb 0x1005bdef
mov eax, 0xb6
mov word [ecx + 0xe], ax
mov ecx, dword [ebp - 0x20]
jmp 0x1005c06e
call fcn.1005c550
mov edx, dword [ebp - 0x1c]
mov edi, eax
mov ecx, dword [ebp - 0x18]
xorps xmm0, xmm0
mov eax, 0x116
mov esi, eax
movups xmmword [edi], xmm0
mov dword [edi], ecx
mov dword [edi + 4], edx
mov word [edi + 0xe], ax
test edx, edx
jl 0x1005bfa4
jg 0x1005bf99
test ecx, ecx
jb 0x1005bfa4
mov eax, 0x196
mov word [edi + 0xe], ax
mov esi, eax
movzx eax, si
mov dword [ebp - 0x44], eax
xor eax, eax
or eax, edx
jne 0x1005bfbc
or esi, 0x40
mov word [edi + 0xe], si
movzx eax, si
jmp 0x1005bfbf
mov eax, dword [ebp - 0x44]
and ecx, 0x80000000
or ecx, edx
jne 0x1005bdef
mov ecx, dword [ebp - 0x20]
or eax, 0x20
mov word [edi + 0xe], ax
jmp 0x1005c06e
cmp byte [ebp - 0x13], 0
je 0x1005c014
mov edi, dword [ebp - 0x2c]
neg edi
call fcn.1005c550
mov esi, eax
xorps xmm0, xmm0
mov eax, edi
test edi, edi
cdq
mov ecx, 0xb6
movups xmmword [esi], xmm0
mov dword [esi], eax
mov eax, 0x1f6
cmovns ecx, eax
mov dword [esi + 4], edx
mov word [esi + 0xe], cx
mov ecx, dword [ebp - 0x20]
jmp 0x1005c06e
call fcn.1005c550
mov ecx, dword [ebp - 0x2c]
xorps xmm0, xmm0
movups xmmword [eax], xmm0
mov dword [eax], ecx
shr ecx, 0x1a
not ecx
mov dword [eax + 4], 0
and ecx, 0x20
or ecx, 0x1d6
mov word [eax + 0xe], cx
mov ecx, dword [ebp - 0x20]
jmp 0x1005c06e
cmp dword [edi + 0x18], 0
je 0x1005c05f
push 0x60a
push 0x101d74f0
push str._HasParseError__
call fcn.101598d0
add esp, 0xc
mov ecx, dword [ebp - 0x20]
sub esi, ecx
mov dword [edi + 0x18], 3
mov dword [edi + 0x1c], esi
mov eax, dword [ebx + 8]
movq xmm0, qword [ebp - 0x60]
movq qword [eax], xmm0
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8