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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x54
call fcn.005dfa60
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x24], ecx
xor ebx, ebx
mov dword [ebp - 0x14], esi
push edi
mov dword [ebp - 0x10], ebx
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], 6
mov dword [ebp - 0x1c], 5
cmp eax, 0x17
jne 0x480489
mov eax, dword [esi + 0xc]
mov edx, ebx
and eax, 0x100
setne dl
test eax, 0x100
mov eax, 5
setne bl
mov dword [ebp - 0x10], ebx
lea edx, [edx*2 + 0xb]
jmp 0x4804bc
cmp eax, 0x18
jne 0x4808d3
test dword [esi + 0xc], 0x100
mov eax, 6
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x1c], eax
je 0x4804b7
mov ebx, 1
lea edx, [eax + 9]
mov dword [ebp - 0x10], ebx
jmp 0x4804bc
mov edx, 0xd
mov edi, dword [esi]
xorps xmm0, xmm0
mov ecx, dword [esi + 8]
xor esi, esi
mov dword [ebp - 8], edi
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x34], esi
movups xmmword [ebp - 0x54], xmm0
movups xmmword [ebp - 0x44], xmm0
cmp edi, edx
jl 0x4808d3
xor edx, edx
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x18], edx
nop dword [eax + eax]
test ebx, ebx
jne 0x480513
cmp edx, eax
jne 0x480513
mov al, byte [esi + ecx]
cmp al, 0x5a
je 0x480766
cmp al, 0x2b
je 0x480766
cmp al, 0x2d
je 0x480766
mov bl, byte [esi + ecx]
mov al, bl
sub al, 0x30
cmp al, 9
ja 0x4808d3
inc esi
movsx eax, bl
mov dword [ebp - 0x28], eax
cmp esi, edi
je 0x4808d3
mov bl, byte [esi + ecx]
mov al, bl
sub al, 0x30
cmp al, 9
ja 0x4808d3
mov eax, dword [ebp - 0x28]
inc esi
lea ecx, [eax + eax*4]
movsx eax, bl
lea ebx, [ecx - 0x108]
lea ebx, [eax + ebx*2]
mov dword [ebp - 0x2c], ebx
cmp esi, edi
je 0x4808d3
mov edi, dword [ebp - 0x14]
lea eax, [edx + 1]
mov ecx, dword [edi + 4]
cmp ecx, 0x17
mov edi, dword [ebp - 8]
cmovne eax, edx
cmp ebx, dword [eax*4 + 0x637524]
jl 0x4808d3
cmp ebx, dword [eax*4 + 0x637500]
jg 0x4808d3
cmp eax, 6
ja case.default.0x480593
jmp dword [eax*4 + 0x4808dc]
lea eax, [ebx - 0x13]
imul eax, eax, 0x64
mov dword [ebp - 0x40], eax
jmp case.default.0x480593
cmp ecx, 0x17
jne 0x4805c5
cmp ebx, 0x32
jge 0x4805bd
lea eax, [ebx + 0x64]
mov dword [ebp - 0x40], eax
jmp case.default.0x480593
mov dword [ebp - 0x40], ebx
jmp case.default.0x480593
add dword [ebp - 0x40], ebx
jmp case.default.0x480593
lea eax, [ebx - 1]
mov dword [ebp - 0x44], eax
jmp case.default.0x480593
mov ecx, dword [ebp - 0x44]
cmp ecx, 1
jne 0x480645
mov edi, dword [ebp - 0x40]
mov eax, 0x51eb851f
add edi, 0x76c
imul edi
mov ecx, edi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x190
sub ecx, eax
je 0x48063b
mov eax, 0x51eb851f
mov ecx, edi
imul edi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x64
sub ecx, eax
je 0x480631
and edi, reloc.WS2_32.dll_closesocket
jns 0x48062f
dec edi
or edi, 0xfffffffc
add edi, 1
je 0x48063b
mov ecx, dword [ebp - 0x44]
mov eax, 0x1c
jmp 0x48064c
mov ecx, dword [ebp - 0x44]
mov eax, 0x1d
jmp 0x48064c
mov eax, dword [ecx*4 + 0x637594]
cmp ebx, eax
jg 0x4808d3
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x48], ebx
add edi, 0x76c
add ebx, dword [ecx*4 + 0x6375c4]
lea eax, [ebx - 1]
mov dword [ebp - 0x38], eax
cmp ecx, 2
jl 0x4806da
mov eax, 0x51eb851f
mov ecx, edi
imul edi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x190
sub ecx, eax
je 0x4806cb
mov eax, 0x51eb851f
mov ecx, edi
imul edi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x64
sub ecx, eax
je 0x4806bb
mov eax, edi
and eax, reloc.WS2_32.dll_closesocket
jns 0x4806b9
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x4806cb
or eax, 0xffffffff
add eax, ebx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
add eax, 2
jmp 0x4806de
xor eax, eax
mov eax, ebx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
add eax, 2
jmp 0x4806de
dec edi
lea eax, [ecx + 0xe]
imul ecx, eax, 0xd
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
imul eax, ebx, 0xffffff9c
add edi, eax
mov eax, 0x66666667
imul ecx
mov dword [ebp - 0x28], edi
mov eax, ebx
sar edx, 1
mov edi, edx
shr edi, 0x1f
add edi, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add edi, eax
mov eax, dword [ebp - 0x28]
lea ecx, [eax + ebx*4]
cdq
and edx, 3
add ecx, ebx
add eax, edx
add ecx, edi
sar eax, 2
add eax, ecx
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 0x2c]
add ecx, 6
add eax, ecx
cdq
idiv dword [ebp - 0x30]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x18]
jmp case.default.0x480593
mov dword [ebp - 0x4c], ebx
jmp case.default.0x480593
mov dword [ebp - 0x50], ebx
jmp case.default.0x480593
mov dword [ebp - 0x54], ebx
mov ecx, dword [ebp - 0x20]
inc edx
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
cmp edx, dword [ebp - 0xc]
jl 0x4804f0
mov eax, dword [ebp - 0x14]
cmp dword [eax + 4], 0x18
jne 0x4807ae
cmp byte [esi + ecx], 0x2e
jne 0x4807ae
test ebx, ebx
jne 0x4808d3
inc esi
cmp esi, edi
je 0x4808d3
mov edx, esi
jge 0x4808d3
nop
mov al, byte [esi + ecx]
sub al, 0x30
cmp al, 9
ja 0x48079e
inc esi
cmp esi, edi
jl 0x480790
cmp edx, esi
je 0x4808d3
cmp esi, edi
je 0x4808d3
mov al, byte [esi + ecx]
mov byte [ebp - 1], al
cmp al, 0x5a
jne 0x4807c1
mov ebx, dword [ebp - 8]
inc esi
jmp 0x4808a7
test ebx, ebx
jne 0x4808d3
cmp al, 0x2b
je 0x4807d5
cmp al, 0x2d
jne 0x4808d3
inc esi
xor edi, edi
lea eax, [esi + 4]
cmp eax, dword [ebp - 8]
jne 0x4808d3
mov eax, dword [ebp - 0xc]
mov edx, eax
add eax, 2
mov dword [ebp - 0x2c], eax
nop
mov ah, byte [esi + ecx]
mov al, ah
sub al, 0x30
cmp al, 9
ja 0x4808d3
movsx eax, ah
mov dword [ebp - 0x30], eax
mov ah, byte [esi + ecx + 1]
mov al, ah
sub al, 0x30
cmp al, 9
ja 0x4808d3
mov ecx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x14]
movsx eax, ah
lea ecx, [ecx + ecx*4]
cmp dword [ebx + 4], 0x17
lea ecx, [ecx - 0x108]
mov ebx, dword [ebp - 8]
lea ecx, [eax + ecx*2]
lea eax, [edx + 1]
cmovne eax, edx
shl eax, 2
cmp ecx, dword [eax + 0x637524]
jl 0x4808d3
cmp ecx, dword [eax + 0x637500]
jg 0x4808d3
cmp dword [ebp - 0x24], 0
je 0x480876
mov eax, dword [ebp - 0xc]
cmp edx, eax
jne 0x480867
imul edi, ecx, 0xe10
jmp 0x480876
inc eax
cmp edx, eax
jne 0x480876
mov eax, ecx
shl eax, 4
sub eax, ecx
lea edi, [edi + eax*4]
mov ecx, dword [ebp - 0x20]
inc edx
add esi, 2
cmp edx, dword [ebp - 0x2c]
jl 0x4807f0
test edi, edi
je 0x4808a7
mov eax, edi
lea ecx, [ebp - 0x54]
neg eax
cmp byte [ebp - 1], 0x2d
cmove eax, edi
xor edx, edx
push eax
call fcn.004991d0
add esp, 4
test eax, eax
je 0x4808d3
cmp esi, ebx
jne 0x4808d3
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4808c7
movups xmm0, xmmword [ebp - 0x54]
mov ecx, dword [ebp - 0x34]
movups xmmword [eax], xmm0
movups xmm0, xmmword [ebp - 0x44]
movups xmmword [eax + 0x10], xmm0
mov dword [eax + 0x20], ecx
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret