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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, ecx
push ebx
sub esp, 0x24c
test edx, edx
jle 0x4075a5
mov al, byte [ecx]
lea edx, [eax - 0x2b]
and dl, 0xfd
jne 0x4075a5
fld1
cmp al, 0x2d
mov byte [ebp - 0x235], 1
mov ebx, 1
fld1
fchs
fcmovne st(0), st(1)
fstp st(1)
jmp 0x4075b0
mov byte [ebp - 0x235], 0
fld1
xor ebx, ebx
cmp ebx, 1
sbb eax, eax
add eax, 3
cmp eax, edi
jl 0x4075d3
mov dword [ebp - 0x224], 0xffffffff
cmp ebx, edi
jge 0x4076d4
jmp 0x4076b5
mov al, byte [esi + ebx]
mov edx, ebx
mov ecx, eax
and ecx, 0xffffffdf
cmp cl, 0x4e
je 0x4075e8
cmp al, 0x49
jne 0x40765a
jmp 0x40765e
fstp st(0)
mov al, byte [esi + ebx + 1]
and eax, 0xffffffdf
cmp al, 0x41
jne 0x407b75
mov al, byte [esi + ebx + 2]
and eax, 0xffffffdf
cmp al, 0x4e
jne 0x407b75
add ebx, 3
cmp ebx, edi
jge 0x407638
mov al, byte [esi + edx + 3]
mov edx, eax
and edx, 0xffffffdf
sub edx, 0x41
cmp dl, 0x19
jbe 0x407b75
lea edx, [eax - 0x30]
cmp dl, 9
jbe 0x407b75
cmp al, 0x5f
je 0x407b75
fld qword [0x44b958]
mov eax, dword [ebp + 8]
fmul st(0)
fstp dword [ebp - 0x220]
fld dword [ebp - 0x220]
fldz
fmulp st(1)
fstp qword [eax]
jmp 0x407b8d
cmp al, 0x69
jne 0x4076b5
mov al, byte [esi + ebx + 1]
and eax, 0xffffffdf
cmp al, 0x4e
jne 0x407b5b
mov al, byte [esi + ebx + 2]
and eax, 0xffffffdf
cmp al, 0x46
jne 0x407b5f
add ebx, 3
cmp ebx, edi
jge 0x4076ac
mov al, byte [esi + edx + 3]
mov edx, eax
and edx, 0xffffffdf
sub edx, 0x41
cmp dl, 0x19
jbe 0x407b63
lea edx, [eax - 0x30]
cmp dl, 9
jbe 0x407b67
cmp al, 0x5f
je 0x407b6b
fld1
fldz
jmp 0x407980
mov dword [ebp - 0x224], 0xffffffff
movsx eax, byte [esi + ebx]
lea edx, [eax - 0x30]
cmp dl, 9
ja 0x4076d4
sub eax, 0x30
mov dword [ebp - 0x224], eax
xor eax, eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x234], eax
cmp ebx, edi
jge 0x40785a
mov cl, byte [esi + ebx]
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x407760
imul eax, dword [ebp - 0x21c], 0xa
inc dword [ebp - 0x234]
mov dword [ebp - 0x228], eax
mov eax, 0xa
mul dword [ebp - 0x220]
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x220], eax
mov eax, dword [ebp - 0x228]
add dword [ebp - 0x21c], eax
movsx eax, cl
sub eax, 0x30
cdq
add eax, dword [ebp - 0x220]
adc edx, dword [ebp - 0x21c]
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], edx
inc ebx
cmp ebx, edi
jge 0x40785a
cmp byte [esi + ebx], 0x5f
je 0x40774f
jmp 0x4076e8
cmp byte [esi + ebx], 0x2e
jne 0x40785a
mov dword [ebp - 0x22c], 0
inc ebx
cmp dword [ebp - 0x234], 0
jne 0x40779f
cmp ebx, edi
jge 0x40779f
cmp byte [esi + ebx], 0x30
jne 0x407b79
inc dword [ebp - 0x22c]
inc ebx
cmp ebx, edi
jge 0x40779f
cmp byte [esi + ebx], 0x5f
je 0x407792
jmp 0x40777e
cmp dword [ebp - 0x224], 0xffffffff
jne 0x4077cb
cmp ebx, edi
jge 0x4077cb
mov dword [ebp - 0x224], 0xffffffff
movsx eax, byte [esi + ebx]
lea edx, [eax - 0x30]
cmp dl, 9
ja 0x4077cb
sub eax, 0x30
mov dword [ebp - 0x224], eax
xor ecx, ecx
mov dword [ebp - 0x228], ecx
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x228]
add eax, ecx
mov dword [ebp - 0x230], eax
cmp ebx, edi
jge 0x407868
mov cl, byte [esi + ebx]
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x407868
imul eax, dword [ebp - 0x21c], 0xa
inc dword [ebp - 0x228]
mov dword [ebp - 0x230], eax
mov eax, 0xa
mul dword [ebp - 0x220]
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x220], eax
mov eax, dword [ebp - 0x230]
add dword [ebp - 0x21c], eax
movsx eax, cl
sub eax, 0x30
cdq
add eax, dword [ebp - 0x220]
adc edx, dword [ebp - 0x21c]
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], edx
inc ebx
cmp ebx, edi
jge 0x4077d3
cmp byte [esi + ebx], 0x5f
je 0x40784a
jmp 0x4077d3
xor edx, edx
mov dword [ebp - 0x230], edx
mov dword [ebp - 0x228], edx
mov eax, dword [ebp - 0x234]
mov ecx, dword [ebp - 0x228]
add eax, ecx
mov dword [ebp - 0x23c], eax
jne 0x407898
test ebx, ebx
je 0x407b8b
cmp ebx, 1
jne 0x407898
cmp byte [ebp - 0x235], 0
jne 0x407b6f
lea eax, [ebx + 1]
cmp eax, edi
jge 0x40790e
mov dl, byte [esi + ebx]
and edx, 0xffffffdf
cmp dl, 0x45
jne 0x40790e
mov dl, byte [esi + eax]
lea ecx, [edx - 0x2b]
and cl, 0xfd
jne 0x4078c7
cmp dl, 0x2d
setne dl
add ebx, 2
movzx edx, dl
lea edx, [edx + edx - 1]
jmp 0x4078ce
mov ebx, eax
mov edx, 1
mov al, byte [esi + ebx]
sub eax, 0x30
cmp al, 9
ja 0x407b73
xor eax, eax
cmp ebx, edi
jge 0x407915
mov cl, byte [esi + ebx]
mov byte [ebp - 0x22c], cl
sub ecx, 0x30
cmp cl, 9
ja 0x407915
imul eax, eax, 0xa
movsx ecx, byte [ebp - 0x22c]
lea eax, [eax + ecx - 0x30]
inc ebx
cmp ebx, edi
jge 0x407915
cmp byte [esi + ebx], 0x5f
je 0x407901
jmp 0x4078de
mov edx, 1
xor eax, eax
imul eax, edx
mov edi, dword [ebp - 0x230]
sub eax, edi
mov dword [ebp - 0x22c], eax
neg eax
cmovs eax, dword [ebp - 0x22c]
mov dword [ebp - 0x230], eax
cmp eax, 0x3e7
jg 0x407947
cmp dword [ebp - 0x23c], 0xf
jg 0x407987
jmp 0x4079a1
cmp dword [ebp - 0x21c], 0
fldz
jne 0x40795f
cmp dword [ebp - 0x220], 0
fld st(0)
je 0x407972
fstp st(0)
cmp dword [ebp - 0x22c], 0
js 0x40796e
fld1
fxch st(1)
jmp 0x407980
fmulp st(1)
jmp 0x407976
fstp st(1)
fstp st(1)
mov eax, dword [ebp + 8]
fstp qword [eax]
jmp 0x407b8d
fdivp st(1)
jmp 0x407a0e
cmp dword [ebp - 0x224], 8
jg 0x407a63
cmp dword [ebp - 0x23c], 0x10
jne 0x407a67
cmp dword [ebp - 0x230], 0x16
jle 0x4079d3
mov ecx, dword [ebp - 0x234]
mov eax, 0xf
sub eax, ecx
mov ecx, dword [ebp - 0x228]
sub eax, ecx
mov ecx, dword [ebp - 0x230]
lea edx, [eax + 0x16]
cmp edx, ecx
jge 0x407a1c
fstp st(0)
jmp 0x407a6d
fild qword [ebp - 0x220]
cmp dword [ebp - 0x21c], 0
jns 0x4079e8
fadd dword [0x44b960]
fstp qword [ebp - 0x220]
fld qword [ebp - 0x220]
mov eax, dword [ebp - 0x230]
cmp dword [ebp - 0x22c], 0
fmulp st(1)
fld qword [eax*8 + 0x44b700]
js 0x407a15
fxch st(1)
fmulp st(1)
jmp 0x407976
fdivp st(1)
jmp 0x407976
cmp dword [ebp - 0x22c], 0
js 0x407a6b
fild qword [ebp - 0x220]
cmp dword [ebp - 0x21c], 0
jns 0x407a3a
fadd dword [0x44b960]
mov edx, dword [ebp - 0x230]
fstp qword [ebp - 0x220]
fld qword [ebp - 0x220]
sub edx, eax
fmulp st(1)
fmul qword [eax*8 + 0x44b700]
fmul qword [edx*8 + 0x44b700]
jmp 0x407976
fstp st(0)
jmp 0x407a6d
fstp st(0)
jmp 0x407a6d
fstp st(0)
lea eax, [ebp - 0x20c]
mov edx, 0x1f4
call fcn.00403b1a
xor eax, eax
test ebx, ebx
jle 0x407a8b
xor eax, eax
cmp byte [esi], 0x2e
sete al
xor ecx, ecx
lea edx, [ecx + 1]
mov dword [ebp - 0x220], edx
cmp ebx, eax
jle 0x407ab9
mov dl, byte [esi + eax]
mov edi, edx
mov byte [ebp - 0x224], dl
lea edx, [edi - 0x2b]
mov edi, edx
cmp dl, 0xe
ja 0x407ab9
mov edx, 0x7fe5
bt edx, edi
jb 0x407b25
mov eax, dword [ebp - 0x22c]
mov edi, dword [ebp - 0x220]
mov esi, 0xa
mov byte [ebp + ecx - 0x20c], 0x45
sar eax, 0x1f
and eax, 2
add eax, 0x2b
mov byte [ebp + edi - 0x20c], al
mov eax, dword [ebp - 0x230]
cdq
idiv esi
add edx, 0x30
mov byte [ebp + ecx - 0x208], dl
cdq
idiv esi
add eax, 0x30
add edx, 0x30
mov byte [ebp + ecx - 0x20a], al
xor eax, eax
mov dword [esp + 4], eax
lea eax, [ebp - 0x20c]
mov dword [esp], eax
mov byte [ebp + ecx - 0x209], dl
call fcn.00440990
jmp 0x407976
cmp ecx, 0x1ed
jg 0x407b40
mov dl, byte [ebp - 0x224]
mov byte [ebp + ecx - 0x20c], dl
mov ecx, dword [ebp - 0x220]
inc eax
cmp ebx, eax
jle 0x407a8d
mov dl, byte [esi + eax]
cmp dl, 0x2e
je 0x407b40
cmp dl, 0x5f
je 0x407b40
jmp 0x407a8d
fstp st(0)
jmp 0x407b75
fstp st(0)
jmp 0x407b75
fstp st(0)
jmp 0x407b75
fstp st(0)
jmp 0x407b75
fstp st(0)
jmp 0x407b75
fstp st(0)
jmp 0x407b75
fstp st(0)
xor ebx, ebx
jmp 0x407b8d
cmp dword [ebp - 0x224], 0xffffffff
jne 0x4077cb
jmp 0x4077ac
fstp st(0)
add esp, 0x24c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 4