Function at 0x1005c8e0
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 0x1006917d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x60
mov eax, dword [0x1007c040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x58], edx
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x6c], ecx
mov dword [ebp - 0x70], eax
movq xmm0, qword [eax]
mov ecx, dword [eax + 8]
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov eax, dword [ebp - 0x24]
xorps xmm2, xmm2
mov esi, eax
movsd qword [ebp - 0x60], xmm0
sub esi, ecx
mov dword [ebp - 0x68], esi
cmp byte [eax], 0x2d
jne 0x1005c96f
inc eax
mov byte [ebp - 0x27], 1
mov dword [ebp - 0x24], eax
jmp 0x1005c973
mov byte [ebp - 0x27], 0
mov cl, byte [eax]
xor esi, esi
movlpd qword [ebp - 0x50], xmm0
mov byte [ebp - 0x25], 0
mov dword [ebp - 0x44], esi
cmp cl, 0x30
jne 0x1005c996
lea edi, [eax + 1]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x24], edi
jmp 0x1005ca55
cmp cl, 0x31
jl 0x1005d0ab
cmp cl, 0x39
jg 0x1005d0ab
lea edi, [eax + 1]
movsx ecx, cl
mov al, byte [edi]
sub ecx, 0x30
cmp byte [ebp - 0x27], 0
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x38], ecx
je 0x1005ca13
cmp al, 0x30
jl 0x1005ca55
mov edx, edi
cmp al, 0x39
ja 0x1005ca55
cmp ecx, 0xccccccc
jb 0x1005c9e1
jne 0x1005ca08
mov edx, edi
cmp al, 0x38
ja 0x1005ca08
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
lea edi, [edx + 1]
inc esi
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x44], esi
lea ecx, [eax + ecx*2]
mov al, byte [edi]
mov dword [ebp - 0x38], ecx
cmp al, 0x30
jl 0x1005ca55
mov edx, edi
cmp al, 0x39
jle 0x1005c9d1
jmp 0x1005ca55
mov dl, 1
mov eax, ecx
xor ecx, ecx
mov byte [ebp - 0x25], dl
jmp 0x1005ca5e
cmp al, 0x30
jl 0x1005ca55
mov edx, edi
cmp al, 0x39
jg 0x1005ca55
nop dword [eax]
cmp ecx, 0x19999999
jb 0x1005ca30
jne 0x1005ca08
mov edx, edi
cmp al, 0x35
jg 0x1005ca08
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
lea edi, [edx + 1]
inc esi
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x44], esi
lea ecx, [eax + ecx*2]
mov al, byte [edi]
mov dword [ebp - 0x38], ecx
cmp al, 0x30
jl 0x1005ca55
mov edx, edi
cmp al, 0x39
jle 0x1005ca20
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x4c]
mov dl, byte [ebp - 0x25]
xor dh, dh
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
mov byte [ebp - 0x26], dh
test dl, dl
je 0x1005cb97
mov dl, byte [edi]
cmp byte [ebp - 0x27], dh
je 0x1005cb1a
cmp dl, 0x30
jl 0x1005cb94
mov esi, edi
cmp dl, 0x39
jg 0x1005cb94
cmp ecx, 0xccccccc
jb 0x1005cab7
ja 0x1005caa1
cmp eax, 0xcccccccc
jb 0x1005cab7
cmp eax, 0xcccccccc
jne 0x1005cb04
cmp ecx, 0xccccccc
jne 0x1005cb04
mov esi, edi
cmp dl, 0x38
ja 0x1005cb04
shld ecx, eax, 2
lea edi, [esi + 1]
xor edx, edx
movsx esi, byte [esi]
shl eax, 2
sub esi, 0x30
add dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
adc dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x2c]
shld ecx, eax, 1
mov dword [ebp - 0x24], edi
add eax, eax
add eax, esi
mov dword [ebp - 0x30], eax
adc edx, ecx
inc dword [ebp - 0x44]
mov ecx, edx
mov dl, byte [edi]
mov dword [ebp - 0x2c], ecx
cmp dl, 0x30
jl 0x1005cb91
mov esi, edi
cmp dl, 0x39
jle 0x1005ca90
jmp 0x1005cb91
mov edx, ecx
mov ecx, eax
call fcn.10064f20
mov dh, 1
movaps xmm2, xmm0
mov byte [ebp - 0x26], dh
jmp 0x1005cb94
cmp dl, 0x30
jl 0x1005cb94
mov esi, edi
cmp dl, 0x39
jg 0x1005cb94
cmp ecx, 0x19999999
jb 0x1005cb4d
ja 0x1005cb37
cmp eax, 0x99999999
jb 0x1005cb4d
cmp eax, 0x99999999
jne 0x1005cb04
cmp ecx, 0x19999999
jne 0x1005cb04
mov esi, edi
cmp dl, 0x35
ja 0x1005cb04
shld ecx, eax, 2
lea edi, [esi + 1]
xor edx, edx
movsx esi, byte [esi]
shl eax, 2
sub esi, 0x30
add dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
adc dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x2c]
shld ecx, eax, 1
mov dword [ebp - 0x24], edi
add eax, eax
add eax, esi
mov dword [ebp - 0x30], eax
adc edx, ecx
inc dword [ebp - 0x44]
mov ecx, edx
mov dl, byte [edi]
mov dword [ebp - 0x2c], ecx
cmp dl, 0x30
jl 0x1005cb91
mov esi, edi
cmp dl, 0x39
jle 0x1005cb26
mov dh, byte [ebp - 0x26]
mov dl, byte [ebp - 0x25]
movsd xmm1, qword [0x100746f8]
test dh, dh
je 0x1005cbd8
mov al, byte [edi]
cmp al, 0x30
jl 0x1005cbd8
mov ecx, edi
nop dword [eax + eax]
cmp al, 0x39
ja 0x1005cbd5
movsx eax, byte [ecx]
lea edi, [ecx + 1]
sub eax, 0x30
mulsd xmm2, xmm1
mov ecx, edi
movd xmm0, eax
mov al, byte [edi]
cvtdq2pd xmm0, xmm0
addsd xmm2, xmm0
cmp al, 0x30
jge 0x1005cbb0
mov dword [ebp - 0x24], edi
mov cl, byte [edi]
mov dword [ebp - 0x3c], 0
cmp cl, 0x2e
jne 0x1005cbf1
inc edi
mov eax, edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x54], eax
jmp 0x1005cbf6
mov eax, edi
mov dword [ebp - 0x54], edi
cmp cl, 0x2e
jne 0x1005ccc8
mov cl, byte [eax]
cmp cl, 0x30
jl 0x1005ccb1
cmp cl, 0x39
jg 0x1005ccb1
mov cl, byte [ebp - 0x26]
mov esi, dword [ebp - 0x38]
test cl, cl
jne 0x1005cc45
test dl, dl
je 0x1005cc29
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
jmp 0x1005cc2d
mov ecx, esi
xor edx, edx
call fcn.10064f20
movsd xmm1, qword [0x100746f8]
movaps xmm2, xmm0
mov byte [ebp - 0x26], 1
mov eax, edi
jmp 0x1005cc48
mov byte [ebp - 0x26], cl
mov dl, byte [edi]
xorps xmm3, xmm3
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x54], eax
nop dword [eax]
mov ecx, dword [ebp - 0x54]
cmp dl, 0x39
jg 0x1005ccce
cmp edi, 0x11
jge 0x1005cc97
dec dword [ebp - 0x3c]
lea ecx, [eax + 1]
movsx eax, byte [eax]
mov edx, ecx
sub eax, 0x30
mulsd xmm2, xmm1
mov dword [ebp - 0x24], edx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm2, xmm0
comisd xmm2, xmm3
jbe 0x1005cca0
inc edi
jmp 0x1005cca0
mov ecx, dword [ebp - 0x64]
inc ecx
mov edx, ecx
mov dword [ebp - 0x24], edx
mov dl, byte [edx]
mov eax, ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x54], eax
cmp dl, 0x30
jge 0x1005cc60
jmp 0x1005ccce
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x34]
sub eax, esi
mov dword [ecx + 0x18], 0xe
mov dword [ecx + 0x1c], eax
jmp 0x1005d0ba
mov esi, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x54]
xor edi, edi
cmp byte [ecx], 0x65
je 0x1005ccde
cmp byte [ecx], 0x45
jne 0x1005cdac
cmp byte [ebp - 0x26], 0
lea edi, [ecx + 1]
mov dword [ebp - 0x24], edi
jne 0x1005cd08
cmp byte [ebp - 0x25], 0
je 0x1005ccf8
mov esi, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
jmp 0x1005ccfa
xor edx, edx
mov ecx, esi
call fcn.10064f20
movaps xmm2, xmm0
mov byte [ebp - 0x26], 1
mov cl, byte [edi]
xor dl, dl
cmp cl, 0x2b
je 0x1005cd18
cmp cl, 0x2d
jne 0x1005cd1f
mov dl, 1
mov cl, byte [edi + 1]
inc edi
mov dword [ebp - 0x24], edi
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x1005ce27
lea esi, [edi + 1]
movsx edi, cl
mov cl, byte [esi]
sub edi, 0x30
mov dword [ebp - 0x24], esi
mov byte [ebp - 0x3d], cl
test dl, dl
je 0x1005cdee
mov ecx, dword [ebp - 0x3c]
mov eax, 0x66666667
add ecx, 0x7ffffff7
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp byte [ebp - 0x3d], 0x30
mov dword [ebp - 0x4c], eax
jl 0x1005cdaa
mov al, byte [esi]
cmp al, 0x39
jg 0x1005cdaa
movsx eax, byte [esi]
lea ecx, [edi + edi*4]
lea edi, [ecx - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x24], edx
mov esi, edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x4c]
jle 0x1005cda4
mov al, byte [edx]
cmp al, 0x30
jl 0x1005cda4
mov ecx, edx
nop dword [eax]
cmp al, 0x39
ja 0x1005cda1
lea esi, [ecx + 1]
mov edx, esi
mov ecx, esi
mov al, byte [edx]
cmp al, 0x30
jge 0x1005cd90
mov dword [ebp - 0x24], edx
mov al, byte [edx]
cmp al, 0x30
jge 0x1005cd68
neg edi
mov edx, dword [ebp - 0x3c]
cmp byte [ebp - 0x26], 0
je 0x1005cedf
lea eax, [edi + edx]
cmp eax, 0xfffffecc
jge 0x1005ce3e
divsd xmm2, qword [0x10074740]
add eax, 0x134
cmp eax, 0xfffffecc
jl 0x1005ce66
shl eax, 3
mov ecx, 0x10073900
sub ecx, eax
movaps xmm0, xmm2
divsd xmm0, qword [ecx]
jmp 0x1005ce61
mov edx, dword [ebp - 0x3c]
mov eax, 0x134
sub eax, edx
mov dword [ebp - 0x4c], eax
cmp cl, 0x30
jl 0x1005cdaf
mov al, byte [esi]
cmp al, 0x39
jg 0x1005cdac
movsx eax, byte [esi]
lea ecx, [edi + edi*4]
lea edi, [ecx - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x24], edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x4c]
jg 0x1005ce75
mov al, byte [edx]
mov esi, edx
cmp al, 0x30
jge 0x1005ce02
jmp 0x1005cdac
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x34]
sub edi, esi
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x1c], edi
jmp 0x1005d0ba
lea ecx, [eax*8]
movaps xmm0, xmm2
test eax, eax
js 0x1005ce56
mulsd xmm0, qword [ecx + 0x10073900]
jmp 0x1005ce61
mov eax, 0x10073900
sub eax, ecx
divsd xmm0, qword [eax]
movsd qword [ebp - 0x60], xmm0
movsd xmm0, qword [ebp - 0x60]
comisd xmm0, xmmword [0x10074748]
jbe 0x1005ce8d
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x68]
mov dword [ecx + 0x18], 0xd
mov dword [ecx + 0x1c], eax
mov esi, dword [ebp - 0x34]
jmp 0x1005d0ba
cmp byte [ebp - 0x27], 0
je 0x1005ce9a
xorps xmm0, xmmword [0x10075880]
mov edi, dword [ebp - 0x6c]
movsd qword [ebp - 0x60], xmm0
mov eax, dword [edi + 0x28]
sub eax, dword [edi + 0x24]
cmp eax, 0x10
jge 0x1005ceb6
push ecx
lea ecx, [edi + 0x18]
call fcn.1005d2b0
mov ecx, dword [edi + 0x24]
xorps xmm0, xmm0
movsd xmm3, qword [ebp - 0x60]
mov esi, dword [ebp - 0x34]
lea eax, [ecx + 0x10]
mov dword [edi + 0x24], eax
mov eax, 0x216
movups xmmword [ecx], xmm0
mov word [ecx + 0xe], ax
movsd qword [ecx], xmm3
jmp 0x1005d0ba
mov edi, dword [ebp - 0x6c]
add edi, 0x18
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
cmp byte [ebp - 0x25], 0
je 0x1005d026
cmp byte [ebp - 0x27], 0
je 0x1005cfa7
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
neg esi
adc ecx, 0
neg ecx
mov dword [ebp - 0x2c], ecx
cmp eax, 0x10
jge 0x1005cf1f
push ecx
mov ecx, edi
call fcn.1005d2b0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [edi + 0xc]
xorps xmm0, xmm0
lea eax, [edx + 0x10]
mov dword [edi + 0xc], eax
mov eax, 0x96
movups xmmword [edx], xmm0
mov dword [edx], esi
mov dword [edx + 4], ecx
mov word [edx + 0xe], ax
test ecx, ecx
jl 0x1005cf7f
jg 0x1005cf46
test esi, esi
jb 0x1005cf7f
mov eax, 0x196
mov word [edx + 0xe], ax
mov edi, eax
xor eax, eax
or eax, ecx
jne 0x1005cf62
mov eax, 0x1d6
mov word [edx + 0xe], ax
mov edi, eax
and esi, 0x80000000
or esi, ecx
jne 0x1005ce85
mov esi, dword [ebp - 0x34]
or edi, 0x20
mov word [edx + 0xe], di
jmp 0x1005d0ba
cmp ecx, 0xffffffff
jl 0x1005ce85
jg 0x1005cf96
cmp esi, 0x80000000
jb 0x1005ce85
mov esi, dword [ebp - 0x34]
mov eax, 0xb6
mov word [edx + 0xe], ax
jmp 0x1005d0ba
cmp eax, 0x10
jge 0x1005cfb4
push ecx
mov ecx, edi
call fcn.1005d2b0
mov esi, dword [edi + 0xc]
xorps xmm0, xmm0
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
lea eax, [esi + 0x10]
mov dword [edi + 0xc], eax
mov eax, 0x116
mov edi, eax
movups xmmword [esi], xmm0
mov dword [esi], ecx
mov dword [esi + 4], edx
mov word [esi + 0xe], ax
test edx, edx
jl 0x1005cfee
jg 0x1005cfe3
test ecx, ecx
jb 0x1005cfee
mov eax, 0x196
mov word [esi + 0xe], ax
mov edi, eax
movzx eax, di
mov dword [ebp - 0x4c], eax
xor eax, eax
or eax, edx
jne 0x1005d006
or edi, 0x40
mov word [esi + 0xe], di
movzx eax, di
jmp 0x1005d009
mov eax, dword [ebp - 0x4c]
and ecx, 0x80000000
or ecx, edx
jne 0x1005ce85
or eax, 0x20
mov word [esi + 0xe], ax
mov esi, dword [ebp - 0x34]
jmp 0x1005d0ba
cmp byte [ebp - 0x27], 0
je 0x1005d06d
mov esi, dword [ebp - 0x38]
neg esi
cmp eax, 0x10
jge 0x1005d03e
push ecx
mov ecx, edi
call fcn.1005d2b0
mov ecx, dword [edi + 0xc]
xorps xmm0, xmm0
test esi, esi
lea eax, [ecx + 0x10]
mov dword [edi + 0xc], eax
mov eax, esi
mov esi, dword [ebp - 0x34]
cdq
movups xmmword [ecx], xmm0
mov dword [ecx], eax
mov eax, 0xb6
mov dword [ecx + 4], edx
mov edx, 0x1f6
cmovns eax, edx
mov word [ecx + 0xe], ax
jmp 0x1005d0ba
cmp eax, 0x10
jge 0x1005d07a
push ecx
mov ecx, edi
call fcn.1005d2b0
mov ecx, dword [edi + 0xc]
xorps xmm0, xmm0
mov esi, dword [ebp - 0x34]
lea eax, [ecx + 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x38]
movups xmmword [ecx], xmm0
mov dword [ecx], eax
shr eax, 0x1a
not eax
mov dword [ecx + 4], 0
and eax, 0x20
or eax, 0x1d6
mov word [ecx + 0xe], ax
jmp 0x1005d0ba
mov esi, dword [ebp - 0x34]
sub eax, esi
mov dword [edx + 0x18], 3
mov dword [edx + 0x1c], eax
mov eax, dword [ebp - 0x70]
movq xmm0, qword [ebp - 0x24]
movq qword [eax], xmm0
mov dword [eax + 8], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10064164
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8