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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50ebad
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x30], ebx
mov eax, dword [ecx + 4]
mov edi, dword [ecx]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], ecx
fldz
mov ecx, edi
mov dl, byte [edi]
sub ecx, eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x3c], ecx
fst qword [ebp - 0x44]
fld st(0)
cmp dl, 0x2d
jne 0x43faa8
mov dl, byte [edi + 1]
inc edi
mov dh, 1
jmp 0x43faaa
xor dh, dh
xor ecx, ecx
mov byte [ebp - 0xf], dh
xor esi, esi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], esi
mov eax, edi
mov byte [ebp - 0xe], cl
mov dword [ebp - 0x24], ecx
cmp dl, 0x30
jne 0x43fad1
xor ebx, ebx
lea edi, [eax + 1]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x50], edi
jmp 0x43fb48
cmp dl, 0x31
jl 0x4402da
cmp dl, 0x39
jg 0x4402da
lea edi, [eax + 1]
movsx ebx, dl
mov al, byte [edi]
sub ebx, 0x30
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x28], ebx
test dh, dh
je 0x43fc91
cmp al, 0x30
jl 0x43fb48
mov edx, edi
cmp al, 0x39
ja 0x43fb48
mov ecx, edi
cmp ebx, 0xccccccc
jb 0x43fb20
jne 0x43fc7e
mov edx, ecx
cmp al, 0x38
ja 0x43fc7e
movsx eax, byte [edx]
lea ebx, [ebx + ebx*4]
inc dword [ebp - 0x24]
lea edi, [edx + 1]
lea ebx, [ebx - 0x18]
mov dword [ebp - 0x50], edi
lea ebx, [eax + ebx*2]
mov al, byte [edi]
mov dword [ebp - 0x28], ebx
cmp al, 0x30
jl 0x43fb46
mov ecx, edi
mov edx, edi
cmp al, 0x39
jle 0x43fb08
xor ecx, ecx
xor ah, ah
mov byte [ebp - 0xd], ah
cmp byte [ebp - 0xe], ah
je 0x43fbe9
mov al, byte [edi]
cmp byte [ebp - 0xf], ah
je 0x43fd2d
cmp al, 0x30
jl 0x43fbe9
mov edx, edi
cmp al, 0x39
jg 0x43fbe9
cmp ecx, 0xccccccc
jb 0x43fba3
ja 0x43fb81
cmp esi, 0xcccccccc
jb 0x43fba3
cmp esi, 0xcccccccc
jne 0x43fcfa
cmp ecx, 0xccccccc
jne 0x43fcfa
mov edx, edi
cmp al, 0x38
ja 0x43fcfa
mov eax, dword [ebp - 0x20]
lea edi, [edx + 1]
movsx esi, byte [edx]
xor edx, edx
shld ecx, eax, 2
sub esi, 0x30
mov dword [ebp - 0x50], edi
shl eax, 2
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
adc dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x1c]
shld ecx, eax, 1
add eax, eax
add esi, eax
mov al, byte [edi]
mov dword [ebp - 0x20], esi
adc ecx, edx
inc dword [ebp - 0x24]
mov dword [ebp - 0x1c], ecx
cmp al, 0x30
jl 0x43fbe6
mov edx, edi
cmp al, 0x39
jle 0x43fb6f
mov ah, byte [ebp - 0xd]
fld qword [0x51ffc0]
test ah, ah
je 0x43fc2e
mov al, byte [edi]
cmp al, 0x30
jl 0x43fc2e
mov edx, edi
cmp al, 0x39
ja 0x43fc28
movsx eax, byte [edx]
lea ecx, [edx + 1]
sub eax, 0x30
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x34], eax
mov edx, ecx
fild dword [ebp - 0x34]
fstp qword [ebp - 0x38]
fld qword [ebp - 0x38]
fxch st(2)
mov edi, dword [ebp - 0x50]
fmul st(1)
mov al, byte [edi]
faddp st(2)
cmp al, 0x30
jge 0x43fbfb
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x14], eax
mov al, byte [edi]
mov dword [ebp - 0x2c], 0
cmp al, 0x2e
jne 0x43fc3f
inc edi
mov dword [ebp - 0x50], edi
mov ecx, edi
cmp al, 0x2e
jne 0x43febb
mov al, byte [ecx]
cmp al, 0x30
jl 0x43fe9e
cmp al, 0x39
jg 0x43fe9e
mov al, byte [ebp - 0xd]
mov edx, dword [ebp - 0x1c]
test al, al
jne 0x43fe22
fstp st(1)
cmp byte [ebp - 0xe], al
je 0x43fde7
mov dword [ebp - 0x14], esi
mov eax, edx
jmp 0x43fdec
mov esi, ebx
mov byte [ebp - 0xe], 1
xor ecx, ecx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], ecx
jmp 0x43fb48
cmp al, 0x30
jl 0x43fb48
mov al, byte [edi]
mov edx, edi
cmp al, 0x39
jg 0x43fb48
mov ecx, edi
cmp ebx, 0x19999999
jb 0x43fcb7
jne 0x43fce7
mov edx, ecx
cmp al, 0x35
jg 0x43fce7
movsx eax, byte [edx]
lea ebx, [ebx + ebx*4]
inc dword [ebp - 0x24]
lea edi, [edx + 1]
lea ebx, [ebx - 0x18]
mov dword [ebp - 0x50], edi
lea ebx, [eax + ebx*2]
mov al, byte [edi]
mov dword [ebp - 0x28], ebx
cmp al, 0x30
jl 0x43fb46
mov ecx, edi
mov edx, edi
cmp al, 0x39
jg 0x43fb46
jmp 0x43fca7
xor ecx, ecx
mov dword [ebp - 0x20], ebx
mov esi, ebx
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 0xe], 1
jmp 0x43fb48
mov eax, ecx
mov dword [ebp - 0x38], esi
and eax, 0x7fffffff
fstp st(0)
mov dword [ebp - 0x34], eax
and ecx, 0x80000000
fild qword [ebp - 0x38]
mov dword [ebp - 0x34], ecx
mov ah, 1
mov dword [ebp - 0x38], 0
mov byte [ebp - 0xd], ah
fild qword [ebp - 0x38]
fchs
faddp st(1)
jmp 0x43fbe9
cmp al, 0x30
jl 0x43fbe9
mov edx, edi
cmp al, 0x39
jg 0x43fbe9
cmp ecx, 0x19999999
jb 0x43fd67
ja 0x43fd51
cmp esi, 0x99999999
jb 0x43fd67
cmp esi, 0x99999999
jne 0x43fdb4
cmp ecx, 0x19999999
jne 0x43fdb4
mov edx, edi
cmp al, 0x35
ja 0x43fdb4
mov eax, dword [ebp - 0x20]
lea edi, [edx + 1]
movsx esi, byte [edx]
xor edx, edx
shld ecx, eax, 2
sub esi, 0x30
mov dword [ebp - 0x50], edi
shl eax, 2
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
adc dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x1c]
shld ecx, eax, 1
add eax, eax
add esi, eax
mov al, byte [edi]
mov dword [ebp - 0x20], esi
adc ecx, edx
inc dword [ebp - 0x24]
mov dword [ebp - 0x1c], ecx
cmp al, 0x30
jl 0x43fbe6
mov edx, edi
cmp al, 0x39
jg 0x43fbe6
jmp 0x43fd3f
mov eax, ecx
mov dword [ebp - 0x38], esi
and eax, 0x7fffffff
fstp st(0)
mov dword [ebp - 0x34], eax
and ecx, 0x80000000
fild qword [ebp - 0x38]
mov dword [ebp - 0x34], ecx
mov ah, 1
mov dword [ebp - 0x38], 0
mov byte [ebp - 0xd], ah
fild qword [ebp - 0x38]
fchs
faddp st(1)
jmp 0x43fbe9
mov dword [ebp - 0x14], ebx
xor eax, eax
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x18], esi
mov esi, eax
mov dword [ebp - 0x34], eax
and esi, 0x7fffffff
mov dword [ebp - 0x14], esi
and eax, 0x80000000
fild qword [ebp - 0x18]
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], 0
fild qword [ebp - 0x38]
mov byte [ebp - 0xd], 1
fchs
faddp st(1)
jmp 0x43fe27
mov byte [ebp - 0xd], al
fxch st(1)
mov eax, ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x14], ecx
mov cl, byte [edi]
mov byte [ebp - 0x10], cl
cmp byte [ebp - 0x10], 0x39
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x28]
jg 0x43fe94
mov edx, dword [ebp - 0x24]
cmp edx, 0x11
jge 0x43fe76
dec dword [ebp - 0x2c]
lea ecx, [eax + 1]
movsx eax, byte [eax]
sub eax, 0x30
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x34], eax
fild dword [ebp - 0x34]
fstp qword [ebp - 0x38]
fld qword [ebp - 0x38]
fxch st(1)
fmul st(2)
faddp st(1)
fcomi st(2)
jbe 0x43fe71
inc edx
mov dword [ebp - 0x24], edx
mov edi, dword [ebp - 0x50]
jmp 0x43fe7f
mov edi, dword [ebp - 0x34]
inc edi
mov dword [ebp - 0x50], edi
mov ecx, edi
mov dl, byte [edi]
mov eax, ecx
mov byte [ebp - 0x10], dl
cmp dl, 0x30
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x14], eax
jge 0x43fe34
mov eax, dword [ebp - 0x4c]
fstp st(1)
mov dword [ebp - 0x14], eax
jmp 0x43fec0
mov eax, dword [ebp - 0x30]
fstp st(1)
mov edx, dword [ebp - 0x14]
fstp st(0)
sub ecx, edx
fstp st(0)
mov dword [eax + 0x18], 0xe
mov dword [eax + 0x1c], ecx
jmp 0x4400f6
mov edx, dword [ebp - 0x1c]
fstp st(0)
xor eax, eax
fstp st(1)
cmp byte [ecx], 0x65
je 0x43fed2
cmp byte [ecx], 0x45
jne 0x43ffd7
lea edi, [ecx + 1]
mov ecx, edi
cmp byte [ebp - 0xd], al
jne 0x43ff16
fstp st(0)
cmp byte [ebp - 0xe], al
je 0x43fee7
mov eax, esi
jmp 0x43feeb
mov eax, ebx
xor edx, edx
mov dword [ebp - 0x38], eax
mov eax, edx
and edx, 0x7fffffff
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x34], edx
and eax, 0x80000000
fild qword [ebp - 0x38]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], 0
fild qword [ebp - 0x38]
fchs
faddp st(1)
mov dl, byte [ecx]
xor dh, dh
cmp dl, 0x2b
je 0x43ff26
cmp dl, 0x2d
jne 0x43ff2e
mov dh, 1
mov dl, byte [ecx + 1]
lea edi, [ecx + 1]
mov ecx, edi
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x44005a
lea edi, [ecx + 1]
movsx eax, dl
mov dl, byte [edi]
sub eax, 0x30
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x10], dl
test dh, dh
je 0x440008
mov ecx, dword [ebp - 0x2c]
mov eax, 0x66666667
lea ecx, [ecx + 0x7ffffff7]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp byte [ebp - 0x10], 0x30
mov dword [ebp - 0x34], eax
jl 0x43ffd2
mov al, byte [edi]
mov edx, edi
mov ebx, dword [ebp - 0x24]
cmp al, 0x39
jg 0x43ffc9
movsx eax, byte [edx]
lea ebx, [ebx + ebx*4]
lea ebx, [ebx - 0x18]
lea edi, [edx + 1]
mov dword [ebp - 0x50], edi
mov edx, edi
lea ebx, [eax + ebx*2]
cmp ebx, dword [ebp - 0x34]
jle 0x43ffc3
mov al, byte [edi]
cmp al, 0x30
jl 0x43ffc3
mov ecx, edi
mov dword [ebp - 0x24], edi
mov esi, edi
mov edx, ecx
cmp al, 0x39
ja 0x43ffc3
mov al, byte [esi + 1]
lea edi, [esi + 1]
mov dword [ebp - 0x50], edi
mov ecx, edi
mov edx, edi
mov esi, edi
cmp al, 0x30
jge 0x43ffaa
mov al, byte [edi]
cmp al, 0x30
jge 0x43ff80
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x24], ebx
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
neg eax
cmp byte [ebp - 0xd], 0
je 0x440111
add eax, dword [ebp - 0x2c]
cmp eax, 0xfffffecc
jge 0x440081
fdiv qword [0x51ffe0]
add eax, 0x134
cmp eax, 0xfffffecc
jge 0x440073
fstp st(0)
jmp 0x4400a0
mov ecx, 0x134
sub ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x34], ecx
cmp dl, 0x30
jl 0x43ffd7
mov cl, byte [edi]
mov edx, edi
cmp cl, 0x39
jg 0x43ffd7
lea ecx, [eax + eax*4]
movsx eax, byte [edx]
lea edi, [edx + 1]
mov dword [ebp - 0x50], edi
lea eax, [eax + ecx*2]
add eax, 0xffffffd0
cmp eax, dword [ebp - 0x34]
jg 0x440043
mov cl, byte [edi]
mov edx, edi
cmp cl, 0x30
jl 0x43ffd7
jmp 0x44001c
mov eax, dword [ebp - 0x30]
fstp st(0)
mov ecx, dword [ebp - 0x3c]
mov dword [eax + 0x18], 0xd
mov dword [eax + 0x1c], ecx
jmp 0x4400f3
mov eax, dword [ebp - 0x30]
fstp st(0)
mov edx, dword [ebp - 0x14]
sub ecx, edx
mov dword [eax + 0x18], 0xf
mov dword [eax + 0x1c], ecx
jmp 0x4400f6
shl eax, 3
mov ecx, 0x51e018
sub ecx, eax
fdiv qword [ecx]
jmp 0x44009d
lea ecx, [eax*8]
test eax, eax
js 0x440094
fmul qword [ecx + 0x51e018]
jmp 0x44009d
mov eax, 0x51e018
sub eax, ecx
fdiv qword [eax]
fstp qword [ebp - 0x44]
fld qword [0x51ffe8]
fld qword [ebp - 0x44]
fcomi st(1)
fstp st(1)
ja 0x440043
cmp byte [ebp - 0xf], 0
je 0x4400b7
fchs
mov esi, dword [ebp + 0xc]
fst qword [ebp - 0x44]
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp eax, 0x10
jge 0x4400d7
push 1
lea ecx, [esi + 0x18]
fstp st(0)
call fcn.00413c90
fld qword [ebp - 0x44]
mov ecx, dword [esi + 0x24]
lea eax, [ecx + 0x10]
mov dword [esi + 0x24], eax
xor eax, eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov eax, 0x216
fstp qword [ecx]
mov word [ecx + 0xe], ax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [eax], edi
pop edi
pop esi
mov dword [eax + 4], edx
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp + 0xc]
fstp st(0)
add edx, 0x18
cmp byte [ebp - 0xe], 0
mov dword [ebp - 0x3c], edx
je 0x440253
mov eax, dword [edx + 0x10]
sub eax, dword [edx + 0xc]
cmp byte [ebp - 0xf], 0
je 0x4401d1
mov ebx, dword [ebp - 0x1c]
neg esi
adc ebx, 0
neg ebx
cmp eax, 0x10
jge 0x440151
push 1
mov ecx, edx
call fcn.00413c90
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx + 0xc]
lea eax, [ecx + 0x10]
mov dword [edx + 0xc], eax
xor eax, eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov eax, 0x96
mov dword [ecx], esi
mov dword [ecx + 4], ebx
mov word [ecx + 0xe], ax
test ebx, ebx
jl 0x4401b0
jg 0x44017a
test esi, esi
jb 0x4401b0
mov eax, 0x196
mov word [ecx + 0xe], ax
mov edx, eax
xor eax, eax
or eax, ebx
jne 0x440196
mov eax, 0x1d6
mov word [ecx + 0xe], ax
mov edx, eax
and esi, 0x80000000
or esi, ebx
jne 0x4400f3
or edx, 0x20
mov word [ecx + 0xe], dx
jmp 0x4400f3
cmp ebx, 0xffffffff
jl 0x4400f3
jg 0x4401c7
cmp esi, 0x80000000
jb 0x4400f3
mov eax, 0xb6
jmp 0x4400ef
cmp eax, 0x10
jge 0x4401e2
push 1
mov ecx, edx
call fcn.00413c90
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx + 0xc]
lea eax, [ecx + 0x10]
mov dword [edx + 0xc], eax
xor eax, eax
mov edx, dword [ebp - 0x1c]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov eax, 0x116
mov dword [ecx], esi
mov ebx, eax
mov dword [ecx + 4], edx
mov word [ecx + 0xe], ax
test edx, edx
jl 0x44021b
jg 0x440210
test esi, esi
jb 0x44021b
mov eax, 0x196
mov word [ecx + 0xe], ax
mov ebx, eax
movzx eax, bx
mov dword [ebp + 0xc], eax
xor eax, eax
or eax, edx
jne 0x440233
or ebx, 0x40
mov word [ecx + 0xe], bx
movzx eax, bx
jmp 0x440236
mov eax, dword [ebp + 0xc]
and esi, 0x80000000
or esi, edx
mov edx, dword [ebp - 0x14]
jne 0x4400f6
or eax, 0x20
mov word [ecx + 0xe], ax
jmp 0x4400f6
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp byte [ebp - 0xf], 0
je 0x44029f
neg ebx
cmp eax, 0x10
jge 0x440272
push 1
mov ecx, edx
call fcn.00413c90
mov ecx, dword [esi + 0x24]
lea eax, [ecx + 0x10]
mov dword [esi + 0x24], eax
xor eax, eax
mov dword [ecx + 8], eax
test ebx, ebx
mov dword [ecx + 0xc], eax
mov eax, ebx
cdq
mov dword [ecx], eax
mov eax, 0xb6
mov dword [ecx + 4], edx
mov edx, 0x1f6
cmovns eax, edx
jmp 0x4400ef
cmp eax, 0x10
jge 0x4402ad
push 1
mov ecx, edx
call fcn.00413c90
mov ecx, dword [esi + 0x24]
lea eax, [ecx + 0x10]
mov dword [esi + 0x24], eax
xor eax, eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx], ebx
shr ebx, 0x1a
not ebx
mov dword [ecx + 4], eax
and ebx, 0x20
or ebx, 0x1d6
mov word [ecx + 0xe], bx
jmp 0x4400f3
mov edx, dword [ebp - 0x14]
fstp st(0)
sub eax, edx
mov dword [ebx + 0x18], 3
fstp st(0)
mov dword [ebx + 0x1c], eax
jmp 0x4400f6